Stripping back AVRDUDE

Go To Last Post
7 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello all,

In our application, we have a host processor running linux (ppc), and a couple of AVRs doing their own thing.

I'd like to use avrdude for bootloading the AVRs for if (read: when) they need a firmware update.

The problem is that avrdude is reasonably large (200K-300K compiled, stripped), which is not an insignificant amount of flash space on board.

Of course, it seems to include practically every programmer under the sun, and there's zero chance of me requiring the bit-bang parallel programmer on the board :P

Therefore, I'd like to strip out features I don't need. And there appears to be lots of them.

The problem is that I have no idea how - there doesn't appear to be any options for compiling in/out various features with the ./configure, and unfortunately, I have next to no exposure to autoconf/flex/yacc/bison.

Is there a good guide around for hacking avrdude? If not, where should I start looking when hacking up the very arcane-looking build files?

-- Damien.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'd suggest using the avrdude-dev mailing list for communication.

I don't think you have to hack the "inner" autoconf stuff, it's probably
sufficient to hack some C files, and the Makefile templates (Makefile.am).
For a start, just hack Makefile.am, re-run the bootstrap script, and try
compiling. It would be expected to fail in the linking stage, and the
error message should then tell you where the programmer you ripped off
is referred from, so you can remove that part as well.

Note that avrdude.conf is *way* larger than the binary itself, so don't
forget to strip that file down to just what you need.

Of course, if you'd like to make the various programmer types compile-time
optional, feel free to submit patches. If you patch all the source files
to carry the various #ifdef HAVE_THISFEATURE hooks, I'm willing to hack
configure.ac for you to include the respective configuration options.

But again, avrdude-dev is the better place to discuss things like these.

Jörg Wunsch

Please don't send me PMs, use email if you want to approach me personally.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

Note that avrdude.conf is *way* larger than the binary itself, so don't
forget to strip that file down to just what you need.

I noticed that. It's certainly the lowest hanging fruit.

I'll have a go at hacking the makefiles - got to learn sometime!

-- Damien

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

I'd like to use avrdude for bootloading the AVRs for if (read: when) they need a firmware update.

Do you really mean "bootloading" in the AVR109 sense of the word? If so then it may be easier to start from scratch and just implement AVR109.

Or even replace the 109 bootloader with one of your own design then you are in complete control of the bootloader protocol at both ends of the link.

Cliff

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

Do you really mean "bootloading" in the AVR109 sense of the word? If so then it may be easier to start from scratch and just implement AVR109.

Yes. See https://www.avrfreaks.net/index.p...

Quote:

Or even replace the 109 bootloader with one of your own design then you are in complete control of the bootloader protocol at both ends of the link.

Why reinvent the wheel? For the moment, there's no reason not to leverage something that's currently known to work.

We may consider our own protocol in the future, but for the moment, we'd rather close the lids on the boxes.

-- Damien.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

OK here's a mad idea - how about taking a look at the code that Atmel supply with thr AVR109 application note or maybe AVROSP ?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:
OK here's a mad idea - how about taking a look at the code that Atmel supply with thr AVR109 application note or maybe AVROSP ?

I did - the raw app note as release isn't working. Atmel have released an update **binary** with the xmega bootloader application note which works well.

I've asked nicely for the source (if nothing else but to see the changes between versions), and they said they'd get back to me....