Page 1 of 1

RT-STM32F407-DISCOVERY-MEMS -O2 -O0 Issue

Posted: Mon Jun 22, 2015 7:02 am
by fallentemplar
I was trying to run RT-STM32F407-DISCOVERY-MEMS demo on my ST Discovery board. If I modify the make file to -O0 from -O2, the board mems demo program fails to run. After setting it back to O2, the program runs again. Does anyone have any idea of why this is?

Re: RT-STM32F407-DISCOVERY-MEMS -O2 -O0 Issue

Posted: Mon Jun 22, 2015 8:19 am
by Giovanni
Hi,

Probably because a stack overflow, when compiling with -O0 the program takes a lot more space in stack frames.

Try increasing stack sizes if you need -O0.

Giovanni