ZA-YA / P-OS

MIT License
5 stars 0 forks source link

Context Switching is not working with high code optimization (-o3) for ARMCC #58

Open p-os opened 8 years ago

p-os commented 8 years ago

Context Optimization works well with level 0 (-o0) code optimization but if we increase to level 2 or 3, it does not work and even kernel is not able to switch to first task.

It can be about SVC and PendSV ISRs and compile may optimize this functions and this optimizations may break somethings. We are testing it using ARMCC compiler using Keil uVision IDE. ARM GCC compilers suggests to add an attribute to discards optimization on SVC and PendSV handlers but we could not see any similar comment for ARMCC.

Also, a thread is opened in ARM forums to discuss root cause of this issue : http://www.keil.com/forum/61416/#/msg200731