The task’s stack’s simulation pushing
before pushing, we have the stack is :
in the pushing, my bugging function using:
to first change the
ptos
to increase(as the stack grow down, so the increase actually means decline).CONTEXT_STACK_SIZE
is 16(=16*4B = 64B = 0x40)the erratic global var OS_IS_RUNNING
this time it’s false, from address: 0x20000454, this is in the task create process for task idle(as you should notice the prio is 63).
this time it’s wrong with the same address: 0x2000454
seems it have been free.
I figure out it’s due to my bug of the task area, the task should grow down, which means we should pass the ptos like:
we used to pass it with
OS_TASK_IDLE_STK[0]