# Segger J-Link GDB-Server / STM32100B-EVAL / Debugging hangs at first instruction

I'm using a J-Link and the corresponding Linux GDB-Server from Segger. When I start debugging with Eclipse the program is automatically halted at the first instruction in the startup assembler code. When I try to step i never get to the next line. Instead I see the GDB-Server output filling up with these messages.

Performing single step...
...Target halted (PC = 0x080005A4)
Performing single step...
...Target halted (PC = 0x080005A4)
Performing single step...
...Target halted (PC = 0x080005A4)
Performing single step...
...Target halted (PC = 0x080005A4)


Using the command line I have a similar issue. It seems that somehow the PC is not advanced after the instruction.

Any hints why I might be getting this kind of behavior?

• Posting some disassembly of the affected region might help. Is the instruction immediately below this a HALT instruction? – Brian Drummond Apr 10 '13 at 6:56
• The instruction writes zero into r0. The next instruction branches (b) to a loop label that initializes BSS. I'm currently not at home but I will post the startup sequence as soon as I can. I'm pretty sure its a configuration or linker-script problem. And I was hoping someone has had the same problem / behavior before. – everclear Apr 10 '13 at 10:35
• I'm sorry for not posting this earlier. The solution wasthat I simply choose the wrong 'flash device' in the gdb monitor settings. I gave the whole device 'stm32f100vbt6b' while I should have given 'stm32f100vb'. Unfortunately the server does not report unknown device names. – everclear Apr 18 '13 at 15:39