Find two software_init_hook () and __wrap_main ()

When mbed-os OS5 is built with STM32CubeIDE, an error occurs because the functions are said to be duplicated.

There are functions in the following two files.

mbed-os / platform / mbed_sdk_boot.c

mbed-os / rtos / TARGET_CORTEX / TOOLCHAIN_GCC_ARM / mbed_boot_gcc_arm.c

The contents are a little different.

Which function should be used for each?
Please tell me why.

void software_init_hook (void)
{
mbed_copy_nvic ();
mbed_sdk_init ();
software_init_hook_rtos ();
}

void software_init_hook (void)
{
mbed_stack_isr_start = (unsigned char *) & __ StackLimit;
mbed_stack_isr_size = (uint32_t) & __ StackTop-(uint32_t) & __ StackLimit;
mbed_heap_start = (unsigned char *) & __ end__;
mbed_heap_size = (uint32_t) & __ HeapLimit-(uint32_t) & __ end__;

mbed_init ();
mbed_rtos_start ();

}

int __wrap_main (void)
{
mbed_main ();
return __real_main ();
}

int __wrap_main (void)
{
/ * For backwards compatibility * /
return __real_main ();
}

Thank you.