# -*- conf -*- # This configuration file reflects my current setup which might be a # bit specific. Adapt to your needs. # Setup consists of OpenOCD, Olimex ARM-OCD-USB, Atmel AT91SAM7S-EK. # This GDB command scripts connects to OpenOCD which is started using # the following script and associated OpenOCD config file: # http://zwizwa.be/darcs/pool/bin/ocd.SAM7-H256 # http://zwizwa.be/darcs/pool/bin/ocd.SAM7-H256.cfg define connect # "openocd" resoves to the host that runs the gdbserver target remote openocd:3333 monitor poll monitor jtag_fast end # Work-around to restart OpenOCD from inside gdb in case it gets # confused. My guess is that sometimes the HW breakpoints get # garbled. This needs OpenOCD in a "while sleep 1; do ...; done" # loop. define remon echo -- Shutting down OpenOCD...\n monitor shutdown echo -- Temporarily connect to sim target to disconnect...\n target sim echo -- Waiting a bit for OpenOCD restart...\n shell sleep 3 echo -- Reconnecting...\n connect shell sleep 1 monitor jtag_fast end # In light of not being able to reset into halt using "reset init", it # seems better to use soft_reset_halt to restart the SAM7. define reset monitor soft_reset_halt end define rload echo -- reset, load\n reset load end define go thbreak $arg0 continue end # Run up to user application entry point. define cyg_user_start thbreak cyg_user_start continue end connect