First go here if you have no idea what I am talking about.
Step 1 Get the Make controller kit ;) Get the power supply too, it's more convenient than connecting the USB cable.
Step 2 Get the Olimex jtag-usb-tiny from Sparkfun Electronics . It's the cheapest way to get started, trust me! Also get a USB cable A to B while you are there. You will thank me later.
Step 3 Install libftdi . On gentoo, it's as easy as
emerge libftdi
Step 4 Install OpenOCD. They have a weird development cycle going on and things go and come a bit more oddly then they usually would. So, you better listen to me and install revision 948, nothing else!
svn co -r 948 svn://svn.berlios.de/openocd/trunk
Make sure that you enable libftdi during configure
./configure --enable-ft2232_libftdi
Step 5 Get the config files from here . Also get the target binary and the elf for gdb from here if you haven't yet compiled your own images.
Step 6 Test if everything's ok. Extract the target binary to your home directory and cd to $HOME. Run openocd as
openocd -f scripts/olimex-jtag-tiny-a.cfg -f scripts/sam7x256.cfg
assuming that you copied over the config files to the directory "script" in your home. If all's well, opeocd should spew out that it's using the default port 4444 for telnet, 3333 for gdb and 6666 for tcl.
Step 7 Test if flashing works. telnet to localhost at port 4444 from a separate terminal and run reset init . Let it write the flash image, and then powercycle the board, restart openocd and also restart telnet. Run the following command
halt at91sam7 gpnvm 0 2 set
This sets the controller to boot from flash. Again power cycle the board and you should see the blinking green led. yipeee!
Step 8 If you are brave enough, compile your own toolchain or go the easy way and get it from here. Copy it over to your home directory and set $PATH accordingly.
Step 9 Repeat step 6 and then from a separate terminal, run
arm-elf-gdb rtosdemo.elf target remote localhost:3333 monitor gdb_breakpoint_override hard /* debugging from flash! */
You are all set! Just remember that you can set only two breakpoints at a time when debugging from flash.
Step 10 Happy Making things. Go to Making Things documentation for reference.