fritzprix/TachyOS

System Fault when optimization applied to compile

Closed this issue · 1 comments

When -O1 flag used in compile, hardware fault arised.

  • occurrence : Supervisor call return of Idle Thread
  • detail :
    when stack frame of Supervisor call popped, program counter of stack is abnormal (NULL)

this bug was due to stack alignment of thread and resolved by following change(s)

  • force initial stack pointer to 8 bytes aligned