cancel
Showing results for 
Search instead for 
Did you mean: 

debugger, what is it really doing

troy1818
Senior
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

3 REPLIES 3
Radosław
Senior
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
Senior
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
Senior
Posted on April 05, 2016 at 09:09

Debuger DON'T do anything with ports.

Check program. Do not trust ST.