This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Cortex M3 goes into osRtxIdleThread when jumping to __main

I am using cortexM3 with a bootloader and an app that initialises the hardware and toggles led. 

Currently, the bootloader is located at address 0x0800 0000 and doesn't have RTX and the app is at 0x0800 4000 and runs the RTOS.

I have confirmed that the control jumps from boot to App. Next, the control jumps to SystemInit to perform powerup initialisation but, when branching to  __main, it suddenly jumps to osRtxIdleThread with osRtxErrorClibMutex(5) with object_id "0x2001A914". Attached is the snapshot of registers and os_cb_sections and fault report

     

Could anyone please help me

Parents
  • I realised that the SCB->VTOR ( vector relocation) wasn't set to the correct location. App is located at 0x0800 4000, and first 256 bytes are header info, so the vector table is located at 0x4100 offset. It fixes the issue.

    However, later the app crashes due to a memory fault, but I assume that must be a completely separate issue. 

Reply
  • I realised that the SCB->VTOR ( vector relocation) wasn't set to the correct location. App is located at 0x0800 4000, and first 256 bytes are header info, so the vector table is located at 0x4100 offset. It fixes the issue.

    However, later the app crashes due to a memory fault, but I assume that must be a completely separate issue. 

Children
No data