Hang Starting nRF52840 Feather Express Under Segger Debugger

If it is useful for you, I’ve made a little workaround for this (it started happening to me again).

It is a little gdbinit script that adds a “restart” command. I run this after start and all is well for nicely hitting only the breakpoints I set. A side benefit, I can run “restart” if I want to restart my load without having to rebuild/flash.

gdbinit:

# the jlink debugger seems to want a pause after reset before we tell it to start running
define restart
  monitor reset 
  shell sleep 1
  cont 
end

And in my platformio.ini:

debug_tool = jlink
build_type = debug ; I'm debugging with ICE a lot now
debug_extra_cmds =
  source gdbinit
1 Like