d0miller wrote on Thursday, January 11, 2018:
Can anyone explain to me why the tp/R05 register is initialized to 0x55555555 for newly created tasks, by pxPortInitialiseStack() in port.c in Source\portable\IAR\V850ES (9.0.0)?
Is there any reason tasks should use a different tp value than that initialized at system startup?
After considerable experimenting and tweaking, I got multitasking working with the original value initialized for new processes. I then added Bull’s Eye Coverage, which reads word values from memory based on tp. Since tp is odd, it generates a Misalignment exception and crashes multitasking.
I commented out the instruction that sets tp in portRESTORE_CONTEXT, so that tasks keep the same tp as system, to test. Multitasking is again functioning properly, but I’m concerned that there may have been a reason to use different tp for tasks.