diff --git a/Makefile b/Makefile index 4b41a0a34..fc7a21292 100644 --- a/Makefile +++ b/Makefile @@ -121,6 +121,14 @@ jlink-flash-firmware-btc: | build JLinkExe -if SWD -device ATSAMD51J20 -speed 4000 -autoconnect 1 -CommanderScript ./build/scripts/firmware-btc.jlink jlink-flash-factory-setup: | build JLinkExe -if SWD -device ATSAMD51J20 -speed 4000 -autoconnect 1 -CommanderScript ./build/scripts/factory-setup.jlink +jlink-flash-firmware-debug: | build + JLinkExe -if SWD -device ATSAMD51J20 -speed 4000 -autoconnect 1 -CommanderScript ./build-debug/scripts/firmware.jlink +jlink-gdb-server: + JLinkGDBServer -nogui 1 -if SWD -device ATSAMD51J20 -speed 4000 -autoconnect 1 +rtt-client: + telnet localhost 19021 +run: + arm-none-eabi-gdb -x scripts/jlink.gdb build-debug/bin/firmware.elf dockerinit: ./scripts/container.sh build --pull --force-rm --no-cache -t shiftcrypto/firmware_v2:$(shell cat .containerversion) . dockerpull: diff --git a/scripts/jlink.gdb b/scripts/jlink.gdb new file mode 100644 index 000000000..132a8331b --- /dev/null +++ b/scripts/jlink.gdb @@ -0,0 +1,11 @@ +# Connect to jlink gdb server +target extended-remote :2331 + +# load the firmware into ROM +load + +# Reset the CPU +monitor reset + +# start running +continue