1# CM4 port 2target remote:3333 3 4# Open all memory 5set mem inaccessible-by-default off 6 7# Target acquisition timeout 8set remotetimeout 15 9 10# Enable semihosting 11monitor arm semihosting enable 12 13# Load the executable 14# load <LOCATION OF ELF FILE> 15 16# Reset device 17monitor reset init 18 19# Halt device 20monitor halt 21 22# Synchronize client and server 23flushregs 24mon gdb_sync 25stepi 26 27# Set temporary breakpoint at main 28tbreak main 29 30# Print registers 31monitor reg 32 33# Continue program execution 34continue