Description
Hi
i am using MBED to implement a bootloader based application on NUCLEO_091RC board and STM32F030CC controller also.
The application works correctly when i do not use RTOS in my main application.
When i include RTOS in my application,after program jump the kernel hangs
If i do not perform any program jumps then RTOS works well in the bootloader application also
using GDB i found that program enters WWDG_IRQHandler () just after execution of the below function __svcKernelStart () at /mnt/hgfs/repos/mbed/libraries/rtos/rtx/TARGET_CORTEX_M/rt_CMSIS.c:414
__svcKernelStart () calls the svcKernelStart () function in privileged mode
and code for that is found at line 198 of mbed/libraries/rtos/rtx/TARGET_CORTEX_M/rt_CMSIS.c file
define SVC_Call(f) \
__asm volatile
(
"ldr r7,="#f"\n\t"
"mov r12,r7\n\t"
"svc 0"
: "=r" (__r0), "=r" (__r1), "=r" (__r2), "=r" (__r3)
: "r" (__r0), "r" (__r1), "r" (__r2), "r" (__r3)
: "r7", "r12", "lr", "cc"
);
below is a test program to simulate the issue :
i jump to the same default program address 0x08000000 in and RTOS thread
https://gist.github.com/pi19404/928e024cd8008e814357738877cfd67e