cancel
Showing results for 
Search instead for 
Did you mean: 

Debbuger stuck on while loop while using only generated code

fernandapdv
Associate

I'm using a Nucleo-F401RE board that used to work a month ago. Now, when I create a project and debug the generated code, the debugger gets stuck in a while loop, and no errors appear on the debugger console. 

Capture d'écran 2024-10-09 190648.png

I guess this could be a memory problem, but I have no idea how to solve it.

Thanks in advance!!

 

3 REPLIES 3
Richard Li
Senior

Your code is empty dead loop without user code.

Andrew Neil
Evangelist III

@fernandapdv wrote:

the debugger gets stuck in a while loop, and no errors appear on the debugger console. 


because that's  exactly what your code says to do!

As @Richard Li said, you have coded an empty while loop - so this is exactly the behaviour you have coded!

AndrewNeil_0-1728553291321.png

 


@fernandapdv wrote:

I guess this could be a memory problem


You forgot to add any code to the loop!

 

PS:

In general, please post source code as text, not image:

https://community.st.com/t5/community-guidelines/how-to-write-your-question-to-maximize-your-chances-to-find-a/ta-p/575228


@fernandapdv wrote:

I'm using a Nucleo-F401RE board that used to work a month ago.


Define "used to work". What did it do? Did it come flashed with a blinky program? Whatever firmware it had is now overwritten with your new firmware.


@fernandapdv wrote:

the debugger gets stuck in a while loop, and no errors appear on the debugger console. 

I guess this could be a memory problem


It's not "stuck". It's looping. Look at the disassembly. There is no memory issue.

Kudo posts if you have the same problem and kudo replies if the solution works.
Click "Accept as Solution" if a reply solved your problem. If no solution was posted please answer with your own.