User Manual
7/08/12 11:41 PM
Page 12 of 16http://www.rchacker.com/diy/simonk-esc-firmware-flashing?tmpl=%2Fsystem%2Fapp%2Ftemplates%2Fprint%2F&showPrintDialog=1
First you are going to need an AVR assembly compiler. This will take the .asm and .inc files and
make them into a .hex file. ie turn assembly code into machine code.
Simon uses avra on linux. Avra is open source and they say is almost 100% compatible with
avrasm2 (Atmels compiler).
Gurus can go ahead and compile avra from source (it might already be on your linux box). I am
going to use avrasm2 which is a little easier to install. In fact it is just one standalone executable, no
installer, no dlls.
Unfortunately you cannot simply download avrasm2 from Atmel. In their wisdom it only comes with
the monstrous (1 gig installed) AVR Studio and at that buried way down in some obscure directory.
Being such a great guy, I have made a nice zip file with avrasm2.exe in it. I can even do this legally
as long as I include the license file with it.
Usually avrasm2 also comes with a bunch of include files for all the processors, so if you are going
to get into assembler you will need to track them down. SimonK has the relevant include file
included with his source so all you need here is avrasm2.exe.
Copy avrasm2.exe to a directory somewhere and then execute it from the command line. You
should see something like this:
AVRASM: AVR macro assembler 2.1.51 (build 39 May 4 2012 15:31:44)
Copyright (C) 1995-2012 ATMEL Corporation
Along with a couple of lines about usage and accessing help.
I run avrasm2 under wine on osx. I installed wine using macports. I also found a nice little shell
script so I can run avrasm2 from the command line just like you would in windows. For those
interested here is the shell script.
#!/bin/bash
wine ~/avrassembler/avrasm2.exe -I ~/avrassembler/include -fI $1 $2 $3 $4
$5
Send me an email and I will add detailed instructions for the mac users.
Install AVRDude
Download and install winavr. It is a package of AVR tools that includes avrdude.
Ok I've been bashing my head installing this stuff on windows and my poor XP virtual machine ran
out of space and chucked a wobbly. I can see know why the avrdude developers do not make a
nice windows exe easily available. They are thinking: please Atmel ditch this windows crap.
On your mac with macports just type sudo port install avrdude suck on that Bill.
Sorry I lost it there a bit...
I have taken avrdude.exe and avrdude.conf (configuration file) out of the winavr package and
supplied it below. Put it with avrasm2 and our super light weight AVR development environment is
ready to go.
Next get the source code. Simon has named the project tgy. You can get the latest from github or
use the exact same version that I used when making the Bang Buck Quad.
Unzip it and have a look at the contents. You can use any text editor to look at the files.