After threatening about it in some Internet forums for a while, it's
now finally ready, and we can start beta tests for the new method to
convert the ELF files produced by avr-gcc into AVR COFF or AVR
»extended« COFF files as they are understood by certain commercial
software for the AVR controller series, notably AVR Studio 3 and 4 by
Atmel, and VMLAB by Advanced Micro Tools.
The new method implements what should (IMO) have been done from the
beginning: it teaches GNU binutils to handle the AVR COFF file format.
GNU binutils are already a part of the opensource toolchain for the
AVR controllers (commonly known alltogether as just "avr-gcc"), they
provide the assembler (avr-as), the linker (avr-ld), and various tools
to convert and analyze AVR object files (like avr-nm, avr-size,
avr-objdump, avr-objcopy). GNU binutils is based on a backend called
BFD (binary filedescriptor library) that handles all the object file
IO that is common to these utilities, and COFF historically being the
standard UNIX object file format of past days (10+ years ago), it's
not a surprise that GNU binutils could already handle more than two
dozen different flavours of COFF file implementations. So it seemed
to be only logical to base the new ELF->AVR COFF converter on GNU
binutils. Actually, the converter isn't that new at all, it's the
well-known avr-objcopy tool.
The conversion is currently done as a patch against the latest
official GNU binutils release (220.127.116.11), with the ultimate goal to
eventually have it incorporated into the official GNU binutils source
tree after the beta tests.
Currently, the patch is available in either source form (patch against
vanilla binutils-18.104.22.168, this is intented for Unix users who want to
test it, and can build binutils from source without much trouble), and
as a WinAVR add-on package. There's also a more verbose README that
explains what to do in order to use these tools.
The URLs for the various parts are:
Source code patch:
WinAVR add-on package, kindly provided by Eric Weddington:
Chose »AVR COFF Beta« here. Note that some mirrors do not seem to
have mirrored these bits yet. Watch out for the new template
Makefile, it contains a hook for the new conversion method; you might
want to merge that into your existing project's Makefile. Note that
this template Makefile contains two targets, so you can say »make
coff« in order to get the older AVR COFF file format, and »make
extcoff« for the newer AVR »extended« COFF format. Please refer to
the README for details.
As a reminder, i do not have Windows (that's why i needed Eric's
help to provide the binaries), so do not assume i could reproduce any
problem you've got myself on Windows.
For bug reports, please make sure you're following the guidelines
outlined in the README. In particular, please see to investigate
yourself first. The more detailed and exact the report is, the faster
i'll be able to handle it. This is all my hobby work, i've been
spending about three months of spare-time (maybe hundred hours or so)
in writing this stuff, so frankly, i expect you to spend an hour in
analyzing your problem as well. Evidence that you didn't even read
the README file will be a good chance to become ignored, sorry. For
general questions, the usual Internet forums (the avr-gcc mailinglist,
the AVRfreaks avr-gcc forum, and for German users, the forum on
avr-gcc on http://www.mikrocontroller.net/ ) will still be a good
place, as more people than just me will be able to reply.
Finally, my thanks go to the following people who helped me in this
for testing, and providing the WinAVR integration
of all this
Ömer Sinan KAYA
for alpha testing these bits and providing
feedback to me (which required them to build
all this from sources!)