Application with ST self tests added throws Hard fault exception when Code optimization level is set to Medium/High(Balanced) in IAR workbench for ARM v8.22.3. Same application works for Medium/High(Balanced) optimization without ST self tests.
We are using STM32F405RG controller for our project and using ST self tests library for RAM, Flash and clock test.
Currently we are trying to use code optimization option from IAR workbench functional safety version 8.22.3 and optimize code at medium/High(balanced) level. With this change in optimization level system fails to work and throws Hard fault exception when ran along with ST self tests.
but when we remove ST self tests from application and run application with medium/High(balanced) optimization, system works appropriately without any issues.
please verify these details and let us know why with ST self tests and higher level of optimizations, system fails to work fine? and why without self tests it works appropriately without any issue.
