AT91SAM7S

The AT91SAM7S is an ARM processor manufactured by Atmel.

Programming

Forth

Download pfarm.hex for the AT91SAM7S256. Flash it into address 0x108000 and run it at that address too. Press ENTER once you're connected to start it.

Debugging

In-circuit debugging using the JTAG interface and the on-chip EmbeddedICE module is possible using the following tools:

If you don't like packages, you can just download the Slackware package (for example, to /tmp) then install as:

sudo su  # Become root
cd /     # Go to top-level directory
tar -xzf /tmp/openocd-1.0-i386-1.tgz  # Extract files

If the above binary packages don't work for you, you can compile and configure OpenOCD from source. To use the ARM-JTAG parallel port programmer, try the following (or read the official instructions:

# Download the latest OpenOCD SVN code
svn checkout svn://svn.berlios.de/openocd/trunk
cd trunk
./bootstrap
./configure --enable-parport --enable-parport_ppdev
make
su -c "make install"

If you have the Olimex ARM-USB-JTAG programmer you will need to configure OpenOCD to access the FT2232 device on the programmer. Download the FTD2XX libraries from FTDI (local copy of version 0.4.13). Extract the files and read/follow instructions in README.dat. Then, go back to the OpenOCD source directory. Replace the ./configure line above with:

./configure --enable-parport --enable-parport_ppdev --enable-ft2232_ftd2xx --with-ftd2xx=/usr/local/lib

Once you have a configuration file (see above for an ARM-JTAG configuration file) you can run the OpenOCD server as follows (either make sure you're root or set the permissions on the parallel port device properly):

openocd -f openocd_pp.cfg # For parallel port access
        OR
openocd -f openocd_usb.cfg # For Olimex USB device

You can then use GDB to connect to this server:

(gdb) target remote localhost:3333
(gdb) monitor arm7_9 sw_bkpts enable
(gdb) monitor poll

Microcontroller

AT91SAM7S Development Kit

AT91SAM7SE Development Kit

The Atmel AT91SAM7SE development kit costs $200 instead of the $100 kit described above, but additionaly has 32MB of external DRAM, 256MB of external FLASH, a stereo audio DAC, and a joystick.

Buy the AT91SAM7SE-EK from:

Other Evaluation Kits

Even though the Atmel kit is recommended, there are other (cheaper) development boards that should do just as well (no guarantees, unless otherwise indicated for each product):

Linux USB Programming -- Sam_I_Am

Linux USB Programming -- sam7_pgm

AT91SAM7S Evaluation Board Examples

ARM Gotchas

  1. LDM instructions that load user-mode registers must be followed by a NOP if the next instruction uses a banked register. See, for example, the code in Section 9.6.5 of the ARM Architecture Reference Manual.

AT91SAM7S Gotchas

  1. READ THE ERRATA IN THE DATASHEET!!!

ARM-GCC Gotchas

  1. The compiler is not above suspicion, especially the relatively-new GCC 4.x series. Some students have found that overly-long functions cause incorrect behavior, and even adding or removing comments can change the code! Try refactoring your code (smaller functions) or using a more stable compiler such as GCC 3.4.6.

AT91SAM7S (last edited 2009-07-09 17:40:02 by 148)