Skip to main content
Visitor II
February 8, 2024
Question

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

  • February 8, 2024
  • 2 replies
  • 1129 views

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.

    This topic has been closed for replies.

    2 replies

    Graduate II
    February 8, 2024

    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.

    AastikAuthor
    Visitor II
    February 8, 2024

    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".

    Graduate II
    February 9, 2024

    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.