FreeRTOS osKernelStart returns osErrorISR when debugged with ST-Link
We created the project for the M4 with CubeMX. We use FreeRTOS with CMSIS_V2 and OpenAMP as Middleware.
We assigned TIM1, TIM2 and TIM3 to the M4 and use TIM1 as SYS Timebase Source.
The program runs fine if started with fw_cortex_m4.sh or with the SW4STM32 menu "Run As".
But if we try to debug with "Debug As", osKernelStart returns osErrorISR in both Engineering and Production mode.
But osKernelStart is in the main function. Also if we create a Mutex it returns NULL. Both functions "fail" on IS_IRQ.
This is a very similar question. From there i used the code to read the IPSR, it is already 41 at the beginning of the main function.
If i don't initialize TIM1 so that no interrupts from TIM1 can occur IPSR is 14 at the start of main.
If i apply the "patch" from this question IPSR is 0 but the creation of RPMsg channels with VIRT_UART_Init fails with:
[ 3044.562749] virtio_rpmsg_bus virtio0: creating channel rpmsg-tty-channel addr 0x0
[ 3044.568797] virtio_rpmsg_bus virtio0: channel rpmsg-tty-channel:ffffffff:0 already exist
[ 3044.576934] virtio_rpmsg_bus virtio0: rpmsg_create_channel failedIs there a problem with the ISR handling while debugging, so that IPSR is not cleared in main?
Does the "patch" in the second link goes in the right direction or do we have a other problem here?
