Why programs on stm32 can only be debugged to run?

849 views Asked by At

I use armclang build my program,and the progarm will let LED on in board.But when I downlaod program to stm32f407 by st-link, the LED is not on.So I run the program in debug mode by st-link, zhe LED will ON,it mean that the program is running.

I found that the program can run in O3 optimization, and can't run in O2 optimization.

why?

I use armcc build the program,everything is ok.So is the problem with armclang or am I overlooking some configuration.

Please enlighten me, thank you

1

There are 1 answers

0
Camilo On

To run the program in the board without debug mode, you should reset the board with the black button.