Using eLua with the AT91SAM7X CPUs from Atmel

Atmel is a company that doesn't need any kind of introduction :) Their huge product range include some quite nice ARM7TDMI core implementations. Among them are the AT91SAM7X256 and AT91SAM7X512 CPUs. The only difference between them is the ammount of internal memory (256k Flash+64k RAM for AT91SAM7X256 vs. 512k Flash+128k RAM for AT91SAM7X512). Loaded with peripherals, and accompanied by a good support package, they make a perfect host for eLua. For this tutorial I'm going to use the SAM7-EX256 development board from Olimex. It's quite a decent board, and also reasonably priced, although it lacks a proper documentation package in my oppinion. It is equipped with an AT91SAM7X256 CPU. As much as I'd like to get my hands on a board with a AT91SAM7X512 CPU, this didn't happen so far, so I'm going to stick with AT91SAM7X256. Of course, you can still try this tutorial if you have a different AT91SAM7X256 development board. Plus, the instructions should be quite similar for AT91SAM7X512 CPUs.

Prerequisites

Before you'll be able to use eLua on the AT91SAM7X256 CPU, make sure that:

Programming eLua on the SAM7-EX256 board

This involves some jumper tricks, but it's still easy enough to do. We'll need to play with four jumpers: the "USB/EXT" jumper (located to the right of the USB connector from the bottom left part of the board in its close proximity), the "ERASE" jumper (located at the right of the "UEXT" header connector in the top-left part of the board, right ahead the quartz), and the block of two jumpers located right under the "RS232" connector on the board (the one that is adjacent to the Ethernet connector on its right side, NOT the one labeled "CAN" that is closer to the right edge of the board).

That's it! A bit tricky, but eLua is now programmed in the CPU, so you can start your terminal emulator and enjoy it, as described in using eLua.