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
Your application seems to hit a breakpoint according to the value in the DFSR register. Does it stop at a BKPT 0xAB instruction? If yes, please read this knowledgebase article:
https://developer.arm.com/documentation/ka002219/latest
This problem might also be related to the way your bootloader calls your application. Some registers need to be set to a reset value. Please see this knowledgebase article on what needs to be considered:
https://developer.arm.com/documentation/ka002218/latest
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.