Skip to main content
troy1818
Associate III
April 3, 2016
Question

debugger, what is it really doing

  • April 3, 2016
  • 3 replies
  • 650 views
Posted on April 03, 2016 at 23:20

Hi everyone,

I wonder exactly what the debugger is doing when I attach it with gdb. What is the big difference between running with debugger and without debugger?

Does it use its own startup code ?

Does it do stuff with clock registers ?

Different entry point ?

Etc...

I have st-link v2 debugger and the reason for asking is that my sdram stops working when outside debugger (attach it once in gdb and just quit gdb makes the board restart and then makes the sdram work as well).

Regards,

Troy1818

    This topic has been closed for replies.

    3 replies

    Radosław
    Associate II
    April 3, 2016
    Posted on April 03, 2016 at 23:32

    1. Not GDB but OpenOCD,

    2. Usualy in cfg file are implemented enabling HSI.

    3. In step mode debugging OCD disable/enables interrupt.

    4 In connection debugger checks rev id and so on.

    I newer have problems likes yours. 

    troy1818
    troy1818Author
    Associate III
    April 4, 2016
    Posted on April 04, 2016 at 21:49

    Thanks for answering.

    I figured out what the problem was.

    It seems that the debugger (or software controlling debugger) is turning on clock for gpio port C (stm32f756xx). My code did not properly activate the clock for this particular port at the time the sdram was configured. For me this meant that FMC_SDNE0 and FMC_SDCKE0 was set to input pins when the sdcard was configured. This is of course not a good thing and lead to an uninitialized sdram in the case where the debugger was not used.

    Regards,

    Mathias
    Radosław
    Associate II
    April 5, 2016
    Posted on April 05, 2016 at 09:09

    Debuger DON'T do anything with ports.

    Check program. Do not trust ST.