It looks fine to me. Comparing the VM and F20 compiled versions, they have the same sp, and the critical saved state on the stack is the same (pc, flags, etc). They also have no pending interrupt on return from the svc, so there's no interrupt chaining - it looks to me like it should just return to the svc caller.tobias wrote:Yeah, this is all strange. Does it mean that the stack has been corrupted maybe?
But the point of the svc is to kick off the scheduler, and that's what happens on the VM-compiled version - it never returns from the svc and all the threads fire up, etc. So I need to dig in more and understand how FreeRTOS is using the Cortex M3 exception machinery, because there's clearly something I don't understand here.
Thanks, J