Standalone AVR ISP Programmer, howto burn working bootloader

Hi,

I've build the Standalone AVR ISP Programmer kit from Adafruit.

It work file when I use it together with the Arduino IDE (to write a bootloader to an ATMega328P), but when I want to use it as a standalone programmer (GitHub - adafruit/Standalone-Arduino-AVR-ISP-programmer: A standalone programmer for mass-programming AVR chips) I can only successfully program their AdaLoader which doesn't work for my projects.

What I'm doing is programming the due/diecimila bootloader on a new ATMega328P and then program that chip with the SparkFun FTDI Basic (5V).

If I write the bootloader from the Arduino IDE this works, but now when I program the AdaLoader that they provide with the shield kit, I cannot program the chip with a sketch.

I've also tried to edit the images.cpp file (as they claim is possible) and add another bootloader or a sketch exported as HEX but that always fails with a verification error.

The serial monitor provides the following:

18:57:25.873 -> Writing address $7E00
18:57:25.873 -> Flashing page 7E00
18:57:25.873 -> Commit Page: 0x3F00 -> 0x3F00
18:57:25.873 -> Writing address $7E80
18:57:25.873 -> Flashing page 7E80
18:57:25.873 -> Commit Page: 0x3F40 -> 0x3F40
18:57:25.873 -> Writing address $7F00
18:57:25.873 -> Flashing page 7F00
18:57:25.873 -> Commit Page: 0x3F80 -> 0x3F80
18:57:26.038 -> Writing address $7F80
18:57:26.038 -> Flashing page 7F80
18:57:26.038 -> Commit Page: 0x3FC0 -> 0x3FC0
18:57:26.038 ->
18:57:26.038 -> Setting fuses
18:57:26.038 -> Set Lock Fuse to: F -> E000
18:57:26.230 ->
18:57:26.230 -> Verifing flash...
18:57:26.230 -> verification error at address 0x7FFE Should be 0x4 not 0xFF
18:57:26.327 -> Failed to verify chip

I've found an old thread about this (https://forum.arduino.cc/index.php?topic=154011.15) but that didn't help.

Also, does anyone know what boot image I should burn since there are so many in the bootloaders directory and as I understand only the duemilenova and diecimila ATMega328P bootloader works?

AVR ISP Programmer has nothing with the bootloader. If it works to able upload one it will probably work for any other uploading.

What I'm doing is programming the due/diecimila bootloader on a new ATMega328P...

Do you know DUE has completely different MCU fom ATmega328P? It's SAM3X8E. The bootloader on Diecimila is bigger than "golden standard" Optiboot which is used in present UNO R3. The size is important and it has consequence with the boot region size and fuse setting.

You definitely should use Optiboot which is part of Arduino IDE and of course it will work with FTDI.
Since Arduino UNO the FTDI was replaced by ATmega 8U2 and then 16U2 but functionality is same as with FTDI RS232RL.

Thanks for the reply,
The instructions that I follow with the Arduino as ISP is:

  • Select board -> Arduino UDE
  • Select processor -> ATMega328P
  • Select port /dev/ttyUSB0
  • Select Programmer -> Arduino as ISP

The sketch loaded onto the Arduino is provided at their website with the instructions: ArduinoISP | Arduino Tips, Tricks, and Techniques | Adafruit Learning System

This works, and as I understand programs the ATMega32P with the DUE bootloader? Or does it burn another one (I would guess the DUE once since that's selected in the IDE).

Anyway, IF I put that ATMega328P onto a breadboard with Crystal, 2 20pF capacitors I can program the sketch with the Arduino IDE using a FTDI Basic (I don't have a 0.1µF capacitor for the DTR pin so I'm using a button for the reset pin and not the DTR).

Now I want to turn it into a "stand-alone" programmer.
I've programmed the Arduino with the software that's provided here: GitHub - adafruit/Standalone-Arduino-AVR-ISP-programmer: A standalone programmer for mass-programming AVR chips

This seems to work, but I cannot program the ATMega328P when it's one the breadboard (unlike with the other method of programming the bootloader).

Now, I've edited the images.cpp and replaced the HEX code that they provide for the adaBoot bootloader and replaced it with the code in /arduino/hardware/arduino/avr/bootloaders/optiboot/optiboot_atmega328.hex

when I program this on the Arduino and try to program that bootloader I also get the verification error.

the content of my modified images.cpp is:

#include "optiLoader.h"

const image_t PROGMEM image_328 = {
// Sketch name, only used for serial printing
{"optiboot_atmega328.hex"},
// Chip name, only used for serial printing
{"atmega328P"},
// Signature bytes for 328P
0x950F,
// Programming fuses, written before writing to flash. Fuses set to
// zero are untouched.
{0x3F, 0xFF, 0xDE, 0x05}, // {lock, low, high, extended}
// Normal fuses, written after writing to flash (but before
// verifying). Fuses set to zero are untouched.
{0x0F, 0x0, 0x0, 0x0}, // {lock, low, high, extended}
// Fuse verify mask. Any bits set to zero in these values are
// ignored while verifying the fuses after writing them. All (and
// only) bits that are unused for this atmega chip should be zero
// here.
{0x3F, 0xFF, 0xFF, 0x07}, // {lock, low, high, extended}
// size of chip flash in bytes
32768,
// size in bytes of flash page
128,
// The actual image to flash. This can be copy-pasted as-is from a
// .hex file. If you do, replace all lines below starting with a
// colon, but make sure to keep the start and end markers {R"( and
// )"} in place.
{R"(
:107E0000112484B714BE81FFF0D085E080938100F7
:107E100082E08093C00088E18093C10086E0809377
:107E2000C20080E18093C4008EE0C9D0259A86E02C
:107E300020E33CEF91E0309385002093840096BBD3
:107E4000B09BFECF1D9AA8958150A9F7CC24DD24C4
:107E500088248394B5E0AB2EA1E19A2EF3E0BF2EE7
:107E6000A2D0813461F49FD0082FAFD0023811F036
:107E7000013811F484E001C083E08DD089C08234E0
:107E800011F484E103C0853419F485E0A6D080C0E4
:107E9000853579F488D0E82EFF2485D0082F10E0AE
:107EA000102F00270E291F29000F111F8ED06801E7
:107EB0006FC0863521F484E090D080E0DECF843638
:107EC00009F040C070D06FD0082F6DD080E0C81688
:107ED00080E7D80618F4F601B7BEE895C0E0D1E017
:107EE00062D089930C17E1F7F0E0CF16F0E7DF06D8
:107EF00018F0F601B7BEE89568D007B600FCFDCFD4
:107F0000A601A0E0B1E02C9130E011968C91119780
:107F100090E0982F8827822B932B1296FA010C0160
:107F200087BEE89511244E5F5F4FF1E0A038BF0790
:107F300051F7F601A7BEE89507B600FCFDCF97BE46
:107F4000E89526C08437B1F42ED02DD0F82E2BD052
:107F50003CD0F601EF2C8F010F5F1F4F84911BD097
:107F6000EA94F801C1F70894C11CD11CFA94CF0C13
:107F7000D11C0EC0853739F428D08EE10CD085E9AC
:107F80000AD08FE07ACF813511F488E018D01DD067
:107F900080E101D065CF982F8091C00085FFFCCF94
:107FA0009093C60008958091C00087FFFCCF809118
:107FB000C00084FD01C0A8958091C6000895E0E648
:107FC000F0E098E1908380830895EDDF803219F02E
:107FD00088E0F5DFFFCF84E1DECF1F93182FE3DFCA
:107FE0001150E9F7F2DF1F91089580E0E8DFEE27F6
:047FF000FF270994CA
:027FFE00040479
:0400000300007E007B
:00000001FF
)"}
};

/*

  • Table of defined images. The first one matching the chip's signature
  • is used.
    */
    const image_t *images = {
    &image_328,
    };

uint8_t NUMIMAGES = sizeof(images)/sizeof(images[0]);

As the file says it should be a simple copy & paste so I guess I'm doing something wrong.

So I kinda figured out part of my problem.

I was under the impression that the Arduino IDE had to be set to DUE with ATMega328P as board (I'm sure it's mentioned somewhere in the instructions that this should be used and not UNO even IF the device is actually a UNO with their AdaBoot bootloader.

Anyway, so I programmed their AdaBoot bootloader and set the Arduino IDE to UNO, and now I can program the ATMega328P without any problem.

I'm still getting verification errors when trying anything other than their AdaBoot bootloader, so I cannot program any Sketches without using a bootloader. But at least I now have a Standalone programmer that I can use to program a new bootloader if needed.

cloudywizzard:
I was under the impression that the Arduino IDE had to be set to DUE with ATMega328P as board (I'm sure it's mentioned somewhere in the instructions that this should be used and not UNO even IF the device is actually a UNO with their AdaBoot bootloader.

That would be a surprise.

ATMega328P (UNO) and ATSAM3X8E (DUE) use different processors, so different bootloaders and upload process.

srnet:
That would be a surprise.

ATMega328P (UNO) and ATSAM3X8E (DUE) use different processors, so different bootloaders and upload process.

I just checked their "tutorial" for the Standalone Programmer and this is what the say at the bottom of that page:

The standalone sketch will only program ATmega328P chips and it will program them with our "adaBoot" Bootloader not Optiboot! Select Duemilanove with 328 when uploading to Arduinos that use the bootloaded chip, even if you are using it in an UNO branded Arduino!

(source: Assembly | Standalone AVR Chip Programmer | Adafruit Learning System).

And where in the text is "DUE"? There is Duemilanove and you wrote DUE. Duemilanove is old Arduino similar to UNO. Big difference is FT232RL instead of ATmega16U2. DUE is completely different MCU, see my first response again.

I do not understand why you do not use Arduino as ISP sketch for bootloading and to upload the Optiboot with it.

Budvar10:
And where in the text is "DUE"? There is Duemilanove and you wrote DUE.

In my original post I wrote due/diecimila, I thought that people said DUE as short for Duemilanove. (I don't see a Arduino DUE in the Arduino IDE).

Sorry, my mistake.

I do not understand why you do not use Arduino as ISP sketch for bootloading and to upload the Optiboot with it.

I was just curious about using the shield as a "stand-alone" programmer since the tutorial said it was possible.

Thanks!

It is not clear for me whether you are able to bootload and then it is unable to load the sketch or it is unable to bootload.
Post the log.

Budvar10:
It is not clear for me whether you are able to bootload and then it is unable to load the sketch or it is unable to bootload.
Post the log.

I can now load the sketch to the MCU, the problem was that I had the Arduino IDE set to Duemilanove/diecimila with ATMega328P as the processor.

Once I set the Arduino IDE back to Arduino Uno as the board the programming works. (only had to do some more research before I got the DTR working).

What still doesn't work is replacing the adaBoot bootloader in the "stand-alone" programmer with any other bootloader or program. But I think I need to do some more modifications in the Sketch. the Optiboot.hex file (optiboot_atmega328.hex) is 1.5K and their adaBoot.hex is just 1.3K so I'm guessing the problems lies there.

But at least now I know the Stand-alone programmer works, and I can program the ATMega328P with the FTDI Basic.

Thanks, I'll just use the Arduino as ISP to program the OptiBoot bootloader which I guess is "better" than the adaBoot bootloader?

Here is the output from the "Standalone-Programmer" (through the Serial terminal) when I try to write the optiboot file:

AdaBootLoader Bootstrap programmer (originally OptiLoader Bill Westfield (WestfW))

Type 'G' or hit BUTTON for next chip
Starting Program Mode [OK]

Reading signature:950F
Searching for image...
  Found "optiboot_atmega328.hex" for atmega328P

Erasing chip

Setting fuses
  Set Lock Fuse to: 3F -> E000  Set Low Fuse to: FF -> A000  Set High Fuse to: DE -> A800  Set Ext Fuse to: 5 -> A400
Verifying fuses...
 Lock Fuse: 3F is 3F Low Fuse: 0xFF is 0xFF High Fuse: 0xDE is 0xDE Ext Fuse: 0x5 is 0x5
Fuses set & verified
Page size: 128
Chip size: 32768
Writing address $0
Writing address $80
Writing address $100
Writing address $180
Writing address $200
Writing address $280
Writing address $300
Writing address $380
Writing address $400
Writing address $480
Writing address $500
Writing address $580
Writing address $600
Writing address $680
Writing address $700
Writing address $780
Writing address $800
Writing address $880
Writing address $900
Writing address $980
Writing address $A00
Writing address $A80
Writing address $B00
Writing address $B80
Writing address $C00
Writing address $C80
Writing address $D00
Writing address $D80
Writing address $E00
Writing address $E80
Writing address $F00
Writing address $F80
Writing address $1000
Writing address $1080
Writing address $1100
Writing address $1180
Writing address $1200
Writing address $1280
Writing address $1300
Writing address $1380
Writing address $1400
Writing address $1480
Writing address $1500
Writing address $1580
Writing address $1600
Writing address $1680
Writing address $1700
Writing address $1780
Writing address $1800
Writing address $1880
Writing address $1900
Writing address $1980
Writing address $1A00
Writing address $1A80
Writing address $1B00
Writing address $1B80
Writing address $1C00
Writing address $1C80
Writing address $1D00
Writing address $1D80
Writing address $1E00
Writing address $1E80
Writing address $1F00
Writing address $1F80
Writing address $2000
Writing address $2080
Writing address $2100
Writing address $2180
Writing address $2200
Writing address $2280
Writing address $2300
Writing address $2380
Writing address $2400
Writing address $2480
Writing address $2500
Writing address $2580
Writing address $2600
Writing address $2680
Writing address $2700
Writing address $2780
Writing address $2800
Writing address $2880
Writing address $2900
Writing address $2980
Writing address $2A00
Writing address $2A80
Writing address $2B00
Writing address $2B80
Writing address $2C00
Writing address $2C80
Writing address $2D00
Writing address $2D80
Writing address $2E00
Writing address $2E80
Writing address $2F00
Writing address $2F80
Writing address $3000
Writing address $3080
Writing address $3100
Writing address $3180
Writing address $3200
Writing address $3280
Writing address $3300
Writing address $3380
Writing address $3400
Writing address $3480
Writing address $3500
Writing address $3580
Writing address $3600
Writing address $3680
Writing address $3700
Writing address $3780
Writing address $3800
Writing address $3880
Writing address $3900
Writing address $3980
Writing address $3A00
Writing address $3A80
Writing address $3B00
Writing address $3B80
Writing address $3C00
Writing address $3C80
Writing address $3D00
Writing address $3D80
Writing address $3E00
Writing address $3E80
Writing address $3F00
Writing address $3F80
Writing address $4000
Writing address $4080
Writing address $4100
Writing address $4180
Writing address $4200
Writing address $4280
Writing address $4300
Writing address $4380
Writing address $4400
Writing address $4480
Writing address $4500
Writing address $4580
Writing address $4600
Writing address $4680
Writing address $4700
Writing address $4780
Writing address $4800
Writing address $4880
Writing address $4900
Writing address $4980
Writing address $4A00
Writing address $4A80
Writing address $4B00
Writing address $4B80
Writing address $4C00
Writing address $4C80
Writing address $4D00
Writing address $4D80
Writing address $4E00
Writing address $4E80
Writing address $4F00
Writing address $4F80
Writing address $5000
Writing address $5080
Writing address $5100
Writing address $5180
Writing address $5200
Writing address $5280
Writing address $5300
Writing address $5380
Writing address $5400
Writing address $5480
Writing address $5500
Writing address $5580
Writing address $5600
Writing address $5680
Writing address $5700
Writing address $5780
Writing address $5800
Writing address $5880
Writing address $5900
Writing address $5980
Writing address $5A00
Writing address $5A80
Writing address $5B00
Writing address $5B80
Writing address $5C00
Writing address $5C80
Writing address $5D00
Writing address $5D80
Writing address $5E00
Writing address $5E80
Writing address $5F00
Writing address $5F80
Writing address $6000
Writing address $6080
Writing address $6100
Writing address $6180
Writing address $6200
Writing address $6280
Writing address $6300
Writing address $6380
Writing address $6400
Writing address $6480
Writing address $6500
Writing address $6580
Writing address $6600
Writing address $6680
Writing address $6700
Writing address $6780
Writing address $6800
Writing address $6880
Writing address $6900
Writing address $6980
Writing address $6A00
Writing address $6A80
Writing address $6B00
Writing address $6B80
Writing address $6C00
Writing address $6C80
Writing address $6D00
Writing address $6D80
Writing address $6E00
Writing address $6E80
Writing address $6F00
Writing address $6F80
Writing address $7000
Writing address $7080
Writing address $7100
Writing address $7180
Writing address $7200
Writing address $7280
Writing address $7300
Writing address $7380
Writing address $7400
Writing address $7480
Writing address $7500
Writing address $7580
Writing address $7600
Writing address $7680
Writing address $7700
Writing address $7780
Writing address $7800
Writing address $7880
Writing address $7900
Writing address $7980
Writing address $7A00
Writing address $7A80
Writing address $7B00
Writing address $7B80
Writing address $7C00
Writing address $7C80
Writing address $7D00
Writing address $7D80
Writing address $7E00
Flashing page 7E00
  Commit Page: 0x3F00 -> 0x3F00
Writing address $7E80
Flashing page 7E80
  Commit Page: 0x3F40 -> 0x3F40
Writing address $7F00
Flashing page 7F00
  Commit Page: 0x3F80 -> 0x3F80
Writing address $7F80
Flashing page 7F80
  Commit Page: 0x3FC0 -> 0x3FC0

Setting fuses
  Set Lock Fuse to: F -> E000

Verifing flash...
verification error at address 0x7FFE Should be 0x4 not 0xFF
Failed to verify chip

Thanks for taking the time to respond!

From the log it looks like the last byte was not written correctly. Original bootloader ends at 0x7FD9. It has 473 bytes, while Optiboot has 512B. Optiboot has major and minor version as the last 2 bytes. BTW, v4.4? It is pretty old.
It can be easily problem with this program. I did not study it, but you can test functionality.
If it is problem with just the last byte, it does not matter with Optiboot. It should work correctly. Another thing you can try is to read out flash by Arduino as ISP sketch and compare it with the Optiboot to be sure whether it is just last byte, but you have to use avrdude from CMD.

The problem is that the adafruit sketch is assuming that the bootloader code will be contiguous addresses in the hex file, while the bootloader skips over a few at the very end. The sketch also does not properly handle a type 03 record, instead assuming anything but the end record is program code.

Last few lines of the bootloader hex file:

:107FE0001150E9F7F2DF1F91089580E0E8DFEE27F6  <<code starting at address 7FE0, 16 bytes
:047FF000FF270994CA                          <<code starting at address 7FF0, 4 bytes
:027FFE00040479                              <<code starting at address 7FFE, 2 bytes
:0400000300007E007B                          <<record type 03, specifies start address of bootloader, not handled properly
:00000001FF                                  <<record type 01, end of file

The code that is being written to the chip:

11 50 E9 F7 F2 DF 1F 91 08 95 80 E0 E8 DF EE 27 <<code starting at address 7FE0, correct
FF 27 09 94 04 04 00 00 7E 00 FF FF FF FF FF FF <<code starting at address 7FF0, not correct

FF 26 09 94 FF FF FF FF FF FF FF FF FF FF 04 04 <<this is what should be written

Also byte 0x7FF1 differs. It looks like some mistake in "this is what should be written", cos it should be 0x27.

Anyhow, thanks for explanation. Excellent!
So it is broken.

+1

Budvar10:
From the log it looks like the last byte was not written correctly. Original bootloader ends at 0x7FD9. It has 473 bytes, while Optiboot has 512B. Optiboot has major and minor version as the last 2 bytes. BTW, v4.4? It is pretty old.
It can be easily problem with this program. I did not study it, but you can test functionality.
If it is problem with just the last byte, it does not matter with Optiboot. It should work correctly. Another thing you can try is to read out flash by Arduino as ISP sketch and compare it with the Optiboot to be sure whether it is just last byte, but you have to use avrdude from CMD.

Unfortunately I already took apart my breadboard, so cannot test it, but if the version number is not actually used by the bootloader, then you may be able to get away with deleting the two offending lines from the hex code.

:027FFE00040479             
:0400000300007E007B

Budvar10:
Also byte 0x7FF1 differs. It looks like some mistake in "this is what should be written", cos it should be 0x27.

Anyhow, thanks for explanation. Excellent!
So it is broken.

+1

Sorry, typo on my part, it should be 0x27, the other lines I copied from the serial monitor, the "correct" line I typed by hand.

:047FF000FF270994CA 
           ^^

I got the latest hex code from the OptiBoot GitHub page and included that one in the sketch for the standalone programmer.
With this code I also get the verification error, but as I understand from your replies this is a problem with the sketch and not the writing of the bootloader?

I did check the ATMega328P I programmed with the OptiBoot bootloader on my breadboard setup, and it is possible to program a sketch with the FTDI Basic so it does indeed look that it's just a verification error and the bootloader is actually written correctly.

I'm goind to remove the bottom 2 lines of the bootloader code to see if that helps.

I will also have a look at the avrdude manual to see how I can "read" the code back out of the ATMega328P and verify that with the OptiBoot code I downloaded.

With this code I also get the verification error, but as I understand from your replies this is a problem with the sketch and not the writing of the bootloader?

Yes, exactly.

Well removing the last 2 lines of the bootloader in the Programmer's sketch didn't solve the verification error.

What I did notice is that when I try to program the optiboot bootloader with avrdude it also returns an error.
The command I use is:
avrdude -patmega328p -c arduino -C /home/patrick/arduino/hardware/tools/avr/etc/avrdude.conf -P /dev/ttyUSB0 -U flash:w:optiboot_atmega328.hex:i -e

I know the -e option is not needed, but I thought it can't hurt to be sure there is no residual code that's causing problems.

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: erasing chip
avrdude: reading input file "optiboot_atmega328.hex"
avrdude: writing flash (32768 bytes):

Writing | ################################################## | 100% 0.00s

avrdude: 32768 bytes of flash written
avrdude: verifying flash memory against optiboot_atmega328.hex:
avrdude: load data flash data from input file optiboot_atmega328.hex:
avrdude: input file optiboot_atmega328.hex contains 32768 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 0.00s

avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x7ffe
0xff != 0x00
avrdude: verification error; content mismatch

avrdude: safemode: Fuses OK (E:00, H:00, L:00)

avrdude done. Thank you.

When I replace the bootloader with an exported Sketch (both the version with and without bootloader) program without any problems, so maybe I'm still using the wrong bootloader?

I also tried some bootloaders under the arduino/hardware/.../bootloaders directory, and the following failed:

  • /bootloaders/optiboot/optiboot_atmega328.hex
  • /bootloaders/atmega/ATmegaBOOT_168_atmega328.hex
  • /bootloaders/atmega/ATmegaBOOT_168_atm.hex

I don't know if any of the above are suitable for an ATMega328P (or Arduino Uno R3).

The following bootloader does finish without errors with avrdude:

  • /bootloaders/atmega/ATmegaBOOT_168_diecimila.hex

cloudywizzard:
I'm goind to remove the bottom 2 lines of the bootloader code to see if that helps.

Leave the last line, its the two lines before the last line that need to be removed. I tried it and did not get an error, but had a better idea. I programmed the bootloader onto an uno using ArduinoISP with the IDE, used avrdude to dump the flash from the atmega328 to a hex file, and took the code for the bootloader from that. That will work with the standalone sketch, and writes the complete bootloader section.

:207E0000112484B714BE81FFF0D085E08093810082E08093C00088E18093C10086E08093FC
:207E2000C20080E18093C4008EE0C9D0259A86E020E33CEF91E0309385002093840096BBAD
:207E4000B09BFECF1D9AA8958150A9F7CC24DD2488248394B5E0AB2EA1E19A2EF3E0BF2E79
:207E6000A2D0813461F49FD0082FAFD0023811F0013811F484E001C083E08DD089C0823404
:207E800011F484E103C0853419F485E0A6D080C0853579F488D0E82EFF2485D0082F10E0A0
:207EA000102F00270E291F29000F111F8ED068016FC0863521F484E090D080E0DECF84364D
:207EC00009F040C070D06FD0082F6DD080E0C81680E7D80618F4F601B7BEE895C0E0D1E0ED
:207EE00062D089930C17E1F7F0E0CF16F0E7DF0618F0F601B7BEE89568D007B600FCFDCF1A
:207F0000A601A0E0B1E02C9130E011968C91119790E0982F8827822B932B1296FA010C016F
:207F200087BEE89511244E5F5F4FF1E0A038BF0751F7F601A7BEE89507B600FCFDCF97BE85
:207F4000E89526C08437B1F42ED02DD0F82E2BD03CD0F601EF2C8F010F5F1F4F84911BD0B8
:207F6000EA94F801C1F70894C11CD11CFA94CF0CD11C0EC0853739F428D08EE10CD085E9AE
:207F80000AD08FE07ACF813511F488E018D01DD080E101D065CF982F8091C00085FFFCCF0A
:207FA0009093C60008958091C00087FFFCCF8091C00084FD01C0A8958091C6000895E0E68F
:207FC000F0E098E1908380830895EDDF803219F088E0F5DFFFCF84E1DECF1F93182FE3DF47
:207FE0001150E9F7F2DF1F91089580E0E8DFEE27FF270994FFFFFFFFFFFFFFFFFFFF040425
:00000001FF

At this point, I would like to note that this is not the way. This is for the benefit of other less experienced users.
We know now the Adafruit Standalone AVR programmer

has an issue. Adafruit Standalone AVR programmer is not capable to handle with any HEX file correctly.
Arduino as ISP which use avrdude tool for uploading is the old good and reliable way.

@david_2018: I am recommending you, if you want, to open an issue on their GIT as you are the one which revealed this problem.