# ---------------------------------------------------- # # ---------------------------------------------------- source [find interface/open-jtag.cfg] # ---------------------------------------------------- # # ---------------------------------------------------- #gdb_flash_program disable # ---------------------------------------------------- # # ---------------------------------------------------- source [find target/lpc1768.cfg] # Set telnet port... telnet_port 4444 # Set GDB port... gdb_port 3333 # ---------------------------------------------------- # Set event handlers... # ---------------------------------------------------- # This function is called when GDB attaches to OpenOCD. proc attach_proc { } { echo "GDB attached to OpenOCD..." reset halt } lpc1768.cpu configure -event gdb-attach attach_proc proc halt_proc { } { echo "Target halted..." } lpc1768.cpu configure -event halted halt_proc # ---------------------------------------------------- # Other procedures... # ---------------------------------------------------- # Load the program in flash proc load_sw { } { halt sleep 1000 flash write_image erase unlock "y:\lpc1768.elf" }