cancel
Showing results for 
Search instead for 
Did you mean: 

my code stop at for (DataIdx = 0; DataIdx < len; DataIdx++)

Aastik
Associate

Screenshot 2024-02-05 204813.png

This is my code and when I click the step-over button it will go to the below section and then it will not go further I am using STM32F407G-DISC1 board please help me regarding this.

Screenshot 2024-02-05 204859.png

This printf is working fine wile i just print the Printf("Hello World\n"); like this but while i want to print value it will stop at this point if you have any suggestion regarding this please help me.

3 REPLIES 3

That's your code, look at what the MCU is actually executing. Check a listing or disassembly.

Check what ITM_SendChar() is doing / checking. Assume there is optimization, inlining, expectations that the ITM unit is configured on the debugger's side.

That SWD/SWO/PB3 is connected to the ST-LINK, and there isn't a open solder bridge.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Aastik
Associate

thanks for the replay

but i have doubt that why it is creating issue while i need to print numbers it works fine while i print the string "Hello World".

It's not clear how it's called, nor what works and what does not. Only that you have it stop at the loop.

You'll need to look at the code the MCU is running, the registers, and see what's problematic with that.

If you can only deal with the C level, perhaps turn-off optimization, so it might be more apparent specifically what is happening. If you want others to debug it, show them what they are asking for.

Realistically it's not the code you're showing, the loop doesn't look to be problematic, so you'll need to move beyond that and dig deeper.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..