diff --git a/bin/nrf52-console.sh b/bin/nrf52-console.sh index c7ad903c1..55c586b8c 100755 --- a/bin/nrf52-console.sh +++ b/bin/nrf52-console.sh @@ -1 +1,4 @@ -JLinkRTTViewer + + +# JLinkRTTViewer +JLinkRTTClient \ No newline at end of file diff --git a/bin/nrf52-gdbserver.sh b/bin/nrf52-gdbserver.sh new file mode 100644 index 000000000..15fb8fbff --- /dev/null +++ b/bin/nrf52-gdbserver.sh @@ -0,0 +1,3 @@ + + +JLinkGDBServerCLExe -if SWD -select USB -port 2331 -device NRF52840_XXAA diff --git a/docs/hardware/nrf52/nrf52-programming.png b/docs/hardware/nrf52/nrf52-programming.png new file mode 100644 index 000000000..b99a2691c Binary files /dev/null and b/docs/hardware/nrf52/nrf52-programming.png differ diff --git a/gdbinit b/gdbinit index 977bed518..bb3458136 100644 --- a/gdbinit +++ b/gdbinit @@ -6,9 +6,14 @@ # mon exec SetMonModeDebug=1 # mon exec SetMonModeVTableAddr=0x26000 +echo setting RTTAddr +eval "monitor exec SetRTTAddr %p", &_SEGGER_RTT + # the jlink debugger seems to want a pause after reset before we tell it to start running define restart + echo Restarting monitor reset shell sleep 1 cont end + diff --git a/platformio.ini b/platformio.ini index d06a02f5e..61d69d3e0 100644 --- a/platformio.ini +++ b/platformio.ini @@ -142,6 +142,9 @@ monitor_port = /dev/ttyACM1 debug_extra_cmds = source gdbinit +; after programming the flash, reset the initial PC +; debug_load_cmds = load + ; Set initial breakpoint (defaults to main) debug_init_break = ;debug_init_break = tbreak loop