When I'm using FreeRTOS with cortex R52, in optimization level O0, it works fine. context swithing is also fine.
But when i use optimization level O3, there are so many issues and they are very random. My question is ..whether there is a problem with FreeRTOS in optimization level O3?
Any small suggestion will mean so much to me.
Thanks & Regards,
Hard to answer without any specifics - do you see issues on other optimization levels or only O3?Also which compiler version are you using?
Jahnavi_Guvvala said:Any small suggestion will mean so much
Almost always, if increasing optimisation breaks your code, that is due to flaws in your code - usually, relying upon things which are not guaranteed by the language.
A common one is omitting to use volatile where it's necessary.
Try googling "optimisation breaks my code", or similar ...
Jahnavi_Guvvala said:whether there is a problem with FreeRTOS in optimization level O3?
You would have to ask the FreeRTOS people if there are any known specific issues - but it's rather unlikely.
I see issues with O1, O2 as well
Andy Neil said:A common one is omitting to use volatile where it's necessary
Another is reliance on code that gets optimised away; for example, only yesterday:
View all questions in Arm Compilers forum