Lately I spent a lot of time developing drivers and other software for ARM-based systems running Linux. ARM is a very comfortable platform — megabytes of RAM, megabytes of Flash, Linux with glibc, bash and all those user friendly goodies. Not far from the Linux most of you know from your servers and desktops. ARM is actually so comfortable that it’s a bit boring.
I felt it was time to dive a bit deeper into the embedded waters and got hold of an Arduino Duemilanove board with Atmel AVR ATmega328P CPU micro-controller. See how it compares with ARM:
| Architecture | ARM | AVR |
| Vendor | Samsung | Atmel |
| Model | S3C2410 | ATmega328P |
| Clock | 266MHz | 16MHz |
| Flash | 32MB | 32kB |
| RAM | 32MB | 2kB |
| Operating System | Linux | what?! |
In order to build binaries for AVR CPUs you need an AVR C/C++ cross-compiler called avr-gcc. If you are an OpenSUSE user (like I am) first of all add a package repository CrossToolchain:AVR using YaST or Zypper and then install cross-avr-gcc43 package from there. The cross-avr-gcc package that is available in the default OpenSUSE 11.0/11.1 OSS repositories is too old and doesn’t have support for Atmel ATmega328P cores. Users of other distributions will have to find the cross compiler packages in their respective package repositories.
Arduino with 7-segment LED display and shift-register on a breadboard.
The Arduino project provides a nice free IDE for Linux, Mac OS-X and Windows that you can use to build programs for these boards. Installation is straightforward — simply unpack the distribution tarball to /opt/arduino-0017 (for Arduino IDE v17) and run ./arduino executable from there. You will be presented with a simple editor where you can develop your programs in C++ (although for some reason the files’ extension will be .pde instead of a more common .cpp). When you’re done compile and upload your project with a single mouse click.

Arduino IDE — program (aka sketch) uploaded to the board
Comments
Best canon Coffee Mugs! Funny, Cute, & Humorous Unique designs. Also find Travel Mugs, Coffee Cups also, or Create Photo Personalized Mugs & Drinkware