Archive for August, 2006


Saturday, August 26th, 2006


The assembler that comes with the GCC tool chain is generalized against itself and therefor can not be used to assemble code written for atmels native assembler. When working with new processors this is problematic since the code samples are often the best points of reference. There is good news and bad news here.

The good news

The good news is that there is an assembler avra that is in the public domain that assembles the atmel source. (

The bad news

The bad news is that the last stable version is missing most of the new parts and the developers are in the middle of retooling big chunks of the code.

The ugly

Last fall I blew up the last of the tiny 15s that I sampled a few years ago. When I went to order replacements the tiny45s were cheaper and they had more features. In order to get this to work I had to add the parts to both avrdude and avra. The avra source had not been generalized very well and there were some major annoyances but the resulting code worked. Once I moved from the tiny15 to the 45 I was able to program in C (footnote 1) so I didnt think much about it.

Six Months Later.

At some point in december I built avr from the latest source and it threw a bunch of buss errors. I didnt care (because my patched/stable version “Worked for me”) until I started working with putting together a complete tool chain for the AVR on OSX . At this point I looked at the best way to get all of the current devices into the stable branch of the assembler. Looking at the Partsdescriptionsfiles directory I discovered that I could parse the XML files and create the appropriate device_list table for device.c I wrote a php (cause thats what I was working in) and a tcl parser because some of the other tools that need to be created shoudl be written in tcl.

The resulting device.c file has been roled into a the stable branch of the avra assembler and a new(old) version was created 1.0.2 and I have been invited to help with the development of the current branch.


  1. (and when I found that I had to patch that chain as well boy howdy I was pissed).

Atmel (why avr)

Tuesday, August 22nd, 2006

Atmel (

I came across atmel because they made an inexpensive flash based 8051 product which could be programmed in circuit. It had been about 10 years since I had done anything with microcontrollers but I knew the intel 48/51 family pretty well. I had built a bunch of drawing robots around the chips when I started having a fight with the SDCC compilers optimizer (evelyn). I Decided at that point I wasnt going to use anything that wasnt supported by the gcc chain. A few months later I was using the AVRs. The chips are easy to use full of features and fairly inexpensive.

Avr Studio.

Like most manufacturers of microntrollers Atmel provides a relatively comprehensive set of tools on for free. Also like most manufactures these are only avalible on Windows. The development community has responded by creating several tools in the public domain. Examples of these include the gnu compiler chain (avr-binutils, avr-gcc, and avr-libc), several programming systems (avrdude, and uisp), and two compatible assemblers (avra and tavrasm).

There are a few pieces that are however trapped within the Avr Studio which would make life possible without windows.


Part Description XML Files

Appnotes / Device specific include files.


August Release

Sunday, August 20th, 2006

Download Package (PPC)

It contains a meta package containing the following:

* avr-gcc 3.4.5 (+ may 06 newdevices patch)
* avr-binutils (+ may 06 newdevices patch)
* libc 1.4.4
* avrdude 5.1
* avra 1.0.2
* mfile
* Xcode templates