diff --git a/00-README-DEBUG b/00-README-DEBUG new file mode 100644 index 00000000..d6ee689b --- /dev/null +++ b/00-README-DEBUG @@ -0,0 +1,15 @@ +Run OpenCD: +~/install/bin/openocd -s ~/install/share/openocd/scripts/ -f interface/cmsis-dap.cfg -f target/at32f4xx.cfg + +In another window, run GDB (note elf image name is hardcoded in the script): +gdb-multiarch -x scripts/gdb-commands + +Telnet commands: +telnet localhost 4444 +mdb 0x1fffc000 512 # Read USD on 435 +mdb 0x1ffff800 512 # Read USD on 415 +at32f4xx mass_erase +at32f4xx usd_erase # NB. Enables RDP! +at32f4xx usd_write 0 0xa5 # Disable RDP +flash write_image [erase] flashfloppy/out/at32f435/debug/floppy/target.hex +reset run|halt|init diff --git a/scripts/gdb-commands b/scripts/gdb-commands new file mode 100644 index 00000000..c2fb16eb --- /dev/null +++ b/scripts/gdb-commands @@ -0,0 +1,6 @@ +file /home/keir/flashfloppy/out/at32f435/debug/floppy/target.elf +target extended-remote localhost:3333 +# Reset the target and call its init script +monitor reset init +# Halt the target. The init script should halt the target, but just in case +monitor halt