factory-programming atusb

Werner Almesberger werner at almesberger.net
Thu Mar 31 11:05:13 EDT 2011


David Reyes Samblas Martinez wrote:
> Werner it should be not better to program bootloader and firmware at
> once, from the  atusb-pgm , instead of having to flash and then upload
> firmware?

You can do that, but it will take about 8 times as long with the
current avrdude, and still twice as long if we change avrdude to
"perfecly" optimize the upload. (1)

Flashing 4 kB via DFU takes maybe 1-2 seconds, as opposed to ~15 s
with avrdude. You need to connect it to a PC for testing anyway,
so if you flashed everything in one go, you'd just spend something
like an extra hour ((2), best-case) pushing pogo pins, plus
someone else would have to spend a day or so teaching avrdude
better table manners.

(1) The original avrdude flashes from address 0 to the highest
    address used. With my skip-low-addr.patch, it flashes from
    the lowest to the highest address used. Application and boot
    loader are both around 4 kB and live at opposite extremes of
    the 32 kB Flash.

(2) Calculating 135 units, 90% yield, 70% success ratio for
    Flashing (you'll not hit the pads or slip off every so often)
    15 seconds each would be 43 minutes. As you grow bored and/or
    annoyed, your failure rate will go up ...

- Werner  




More information about the discussion mailing list


interactive