bugAVR Downloader/UploaDEr - Bugs: bug #61624, [Feature request] Serial/UART UPDI...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #61624: [Feature request] Serial/UART UPDI programmers

Submitter:  None
Submitted:  Mon 06 Dec 2021 11:57:08 AM UTC
 
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  In Progress Privacy:  Public
Assigned to:  dawidbuchwald Originator Name:  Hans
Originator Email:  -email is unavailable- Open/Closed:  Open
Release:  SVN snapshot Programmer hardware:  serialupdi
Device type: 

( Jump to the original submission )

Wed 15 Dec 2021 02:14:18 PM UTC, comment #24: 

Let me start with reply, followed by status update.

> Makes me wonder why they didn't just come up with one mode to rule them all, instead of three.


I suppose this is because they are in process of finalising the design? I have no idea, but I would rather expect even more versions in future. This, unfortunately, means that further changes to the UPDI code will be required at some point.

> If it turns out that the fuses and safe mode business is a deep rabbit hole


After some more investigation I concluded that there are actually different scenarios where Safemode is disabled, so I would really leave that for now.

Not that short update

So I managed to implement lockbits handling, turned out pretty easy to do. It works, I spent few hours scratching my head and trying to figure out how to unlock the device.

I have also tested potential change to avrdude.conf, related to AVR Dx family EEPROM page size - it works nicely with my programmer and size 0x20, but I'm a bit afraid it might not work with other programmers, so I won't change that. The only reason to play with this value is the efficiency of EEPROM write - it takes over a minute with 1-byte pages (there's huge overhead on UPDI communication) compared to ten seconds in 32-byte page mode.

Thing is - safety first. I don't write to EEPROM outside of my tests, so maybe better to leave it be.

So yeah, all the memories listed in AVRDUDE.CONF can be accessed now. Fuses can be configured, flash and EEPROM written, entire chip locked and unlocked. Error handling has been somewhat improved, AVRDUDE can now recover from crashing.

You can fetch latest version (revision 1522) to play with it, but it's not final, so consider carefully whether it's worth your time.

What I'm planning to do next is to do yet another refactoring. I don't like current model of error handling (inherited from pymcuprog) and I need to look into some weirder scenarios (like: lock the chip and upload flash with forced chip erase - it will work, but only the second time).

I'm also still waiting for all the tinyAVR chips. With the global shortage I had to order them abroad, and it's literally the worst time during the year to do it, so I will probably wait a bit longer. Good thing is I got all the types (0/1/2 as well as the mega ones).

Dawid Buchwald <dawidbuchwald>
Project Member
Mon 13 Dec 2021 09:46:37 PM UTC, comment #23: 

> Not a noob question, it's really confusing. According to sources of pymcuprog there are actually three families: 0 (tiny), 2 (AVR Dx) and 3 (AVR EA). Family 1 has never been mentioned there.


Makes me wonder why they didn't just come up with one mode to rule them all, instead of three.

If it turns out that the fuses and safe mode business is a deep rabbit hole, then it's probably best to leave it like it is for now. It would of course be a nice touch but by no means a deal-breaker of any sort.

mcudude <mcudude>
Mon 13 Dec 2021 09:21:29 PM UTC, comment #22: 

> I only own tiny1-series chips, so I tested on ATtiny416 and ATtiny817.


Thanks for confirmation. I will get myself the other types as well then.

> Probably a noob question, but does there exist an NVM 1 family?


Not a noob question, it's really confusing. According to sources of pymcuprog there are actually three families: 0 (tiny), 2 (AVR Dx) and 3 (AVR EA). Family 1 has never been mentioned there.

That being said I think there are no NVM 3 chips in the wild.

I have also looked into the fuses business, and quite frankly, with my utter lack of knowledge about AVRDUDE source code (I volunteered to join the project like a week ago, for the sole reason of porting pymcuprog code to C) it would be way too risky.

See, the whole efuse/hfuse/lfuse/fuse model should be probably refactored, but we are talking about changing SIGNIFICANT part of the existing codebase affecting dozen different programmers. Without proper release model (parallel development of stable and refactored version) and considerable testing effort I wouldn't touch it.

That being said, there is an issue of safemode option. I don't want to pretend I fully understand what it does, but it seems to help to prevent accidental bricking of your chip with accidental fuse change. It supports the [e/l/h/-]fuse model and I don't think I could safely extend it to support the fuse0-8 model of new AVR chips. Sure it would be nice to have it, but I think it goes way beyond the intended SerialUPDI driver implementation. Thing is that it should work regardless of programmer used and I don't think it works for any new chips at all.

So yeah, for now I will focus on refactoring my code, improving error handling and supporting missing memory types (user row, lock) and possibly DTR/RTS support. Other things will have to wait to be prioritised.

Dawid Buchwald <dawidbuchwald>
Project Member
Mon 13 Dec 2021 08:00:47 PM UTC, comment #21: 

> What attiny0 chips are you using?


Sorry, I forgot to tell you. I only own tiny1-series chips, so I tested on ATtiny416 and ATtiny817.

>So yeah, plenty to do, but I'm glad the basic use cases (burning flash, setting fuses, writing to EEPROM) are working as expected for at least two family types (NVM 0 and NVM 2).


Probably a noob question, but does there exist an NVM 1 family? I thought the only difference was 16-bit and 24-bit modes, where 16-bit is tiny0/1/2 and mega0, and 24-bit is AVR-DA/DB/DD/DU/EA

> Whenever I reach any significant milestone I will post updates here with possible requests for some testing.


Excellent! I'm ready when you are :)

mcudude <mcudude>
Mon 13 Dec 2021 07:10:39 PM UTC, comment #20: 

Hello again! I'm really happy to hear that it works fine with other chips as well. At this point I will focus on some code refactoring and cleanup, because some of the code written today was just a quick and dirty implementation.

For the other things to do:
 1. I need to figure out the whole lockbits business (I have no idea how it works, and it's not supported at the moment),
 2. I need to improve error handling (especially when AVRDUDE crashes in the middle of NVM session, like with the segfault thing),
 3. Reconsider the whole fuses idea, and see if that even can be changed,
 4. There are other memory types like "prod_sig", and there is something about "user row" which I don't support at all yet,
 5. Last but not least, look into DTR/RTS issue.

So yeah, plenty to do, but I'm glad the basic use cases (burning flash, setting fuses, writing to EEPROM) are working as expected for at least two family types (NVM 0 and NVM 2).

Whenever I reach any significant milestone I will post updates here with possible request for some testing. I have some other chips (atmega4809 and atmega4808) already in transit, so should be able to do way more testing myself.

What attiny0 chips are you using?

Dawid Buchwald <dawidbuchwald>
Project Member
Mon 13 Dec 2021 06:57:04 PM UTC, comment #19: 

Hello again Dawid!

I can confirm that I can correctly read and write to flash on both devices (I've just tested a couple of blink programs). I can also confirm that writing fuses and reading them back also works perfectly.

I've also tried to fill the EEPROMs with known content and read them back, and this also works. Great work!

Since most tiny0/tiny1 series are pretty similar, I'd expect SerialUPDI to work for all the other ones too. The tiny2 series is a little bit different and is more similar to the mega0 series.

mcudude <mcudude>
Mon 13 Dec 2021 02:30:38 PM UTC, comment #18: 

I just tested reading from and writing to EEPROM on an ATmega4808 and ATmega4809, and it seems to work just fine. I've loaded various hex files, and the content read from EEPROM is always correct. It's also very fast, reading and writing take about a second, reading a little shorter perhaps.

>Anyway, what I'm saying is that you should be able to test with these attiny chips, as long as you test flash and fuses.


Great! I'll test them later tonight. I have to do some soldering in order to free up the UPDI pin.

> Now, for the message at the end (lfuse/hfuse/efuse) - that's another interesting thing, but it's a part of core AVRDUDE code. I will think about approaching that in some reasonable, least invasive manner.


Thanks for looking into it!

mcudude <mcudude>
Mon 13 Dec 2021 02:06:30 PM UTC, comment #17: 

Hey, thanks a lot for your help! I'm happy to hear that it's working now.

For the EEPROM issue - I found it and the fix is already in the version you have (svn update/svn info should give you revision 1520 or later). I was able to write/read back EEPROM contents, but it's extremely slow: 512 bytes take over a minute to write, due to page size of "1" in avrdude.conf.

Anyway, what I'm saying is that you should be able to test with these attiny chips, as long as you test flash and fuses.

Now, for the message at the end (lfuse/hfuse/efuse) - that's another interesting thing, but it's a part of core AVRDUDE code. I will think about approaching that in some reasonable, least invasive manner.

Dawid Buchwald <dawidbuchwald>
Project Member
Mon 13 Dec 2021 02:00:47 PM UTC, comment #16: 

Hi! I have now tested your latest version on ATmega4809, 3209, 4808, and 3208, and everything seems to be working fine. All fuses are set and read back correctly, and I'm not getting any segment errors anymore.

I also have some tinyAVRs lying around, but they are not as convenient to experiment on as the two custom test boards I've designed for ATmegaX08 and ATmegaX09, so I was hoping to test with these when we think that the most obvious issues have been ironed out.

Let me know when you think you have resolved the EEPROM issue, and I'll be ready to test it!

(I don't know if this is related to the programmer in use or Avrdude in general, but would it be possible to show the "real" fuse values instead of this at the end of a session?)

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

> Have a great day!


You too!

mcudude <mcudude>
Mon 13 Dec 2021 11:04:13 AM UTC, comment #15: 

Hey, I have just posted another fix that should take care of the fuse write. Sorry for all the inconvenience. I would really appreciate if you could check it and let me know if it works correctly now.

I just noticed another issue, related to writing EEPROM, investigating it right now.

Have a great day!

Dawid Buchwald <dawidbuchwald>
Project Member
Mon 13 Dec 2021 10:29:54 AM UTC, comment #14: 

> Yeah, I just checked and the same issue occurs when trying to save to

AVR128DB28 fuses. I think I know what this is, working on a fix now, should
have it ready in a moment. Will let you know when it's ready.

Great! I'm about to leave for baby swimming with my daughter, but I'll test as soon as I'm back hoome :)

> Once again, thanks a lot for all your effort!


My pleasure! I currently maintain several Arduino "cores", that let you use pretty much any ATmega AVR with Arduino IDE while also providing way more flexibility in terms of fuse settings clock speeds etc. IMO Avrdude is the backbone of the entire AVR community, and I use it all the time, so helping you out with the testing is the least I can do! Having a reliable, FOSS uploading tool that supports pretty much all AVR programmers is such a blessing!

mcudude <mcudude>
Mon 13 Dec 2021 10:27:00 AM UTC, comment #13: 

Yeah, I just checked and the same issue occurs when trying to save to AVR128DB28 fuses. I think I know what this is, working on a fix now, should have it ready in a moment. Will let you know when it's ready.

Dawid Buchwald <dawidbuchwald>
Project Member
Mon 13 Dec 2021 10:23:17 AM UTC, comment #12: 

I can confirm that the uploaded program works as expected.

It looks like it's reading incorrect fuses on ATmega4809 as well. Tri's trying to write 0xCD, but reads back 0x40. And now I'm getting a segmentation fault when trying to set fuses on ATmega4809 as well, but not when only writing a hex file to flash...

$ /Users/hans/Downloads/SVN/avrdude/avrdude -C/Users/hans/Documents/Arduino/hardware/MegaCoreX/megaavr/avrdude.conf -vvv -patmega4809 -cserialupdi -P /dev/cu.usbserial-1410 -b230400 -Ufuse0:w:0x00:m -Ufuse1:w:0x54:m -Ufuse2:w:0x01:m -Ufuse4:w:0x00:m -Ufuse5:w:0xCD:m -Ufuse6:w:0x06:m -Ufuse7:w:0x00:m -Ufuse8:w:0x00:m -Ulock:w:0xC5:m

avrdude: Version 6.3-20211205
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "/Users/hans/Documents/Arduino/hardware/MegaCoreX/megaavr/avrdude.conf"
         User configuration file is "/Users/hans/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/cu.usbserial-1410
         Using Programmer              : serialupdi
         Overriding Baud Rate          : 230400
avrdude: Opening serial port...
         AVR Part                      : ATmega4809
         Chip Erase delay              : 0 us
         PAGEL                         : P00
         BS2                           : P00
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 0
         StabDelay                     : 0
         CmdexeDelay                   : 0
         SyncLoops                     : 0
         ByteDelay                     : 0
         PollIndex                     : 0
         PollValue                     : 0x00
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           signature      0     0     0    0 no          3    1      0     0     0 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           prodsig        0     0     0    0 no         61   61      0     0     0 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           fuses          0     0     0    0 no          9    1      0     0     0 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           fuse0          0     0     0    0 no          1    1      0     0     0 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           fuse1          0     0     0    0 no          1    1      0     0     0 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           fuse2          0     0     0    0 no          1    1      0     0     0 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           fuse4          0     0     0    0 no          1    1      0     0     0 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           fuse5          0     0     0    0 no          1    1      0     0     0 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           fuse6          0     0     0    0 no          1    1      0     0     0 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           fuse7          0     0     0    0 no          1    1      0     0     0 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           fuse8          0     0     0    0 no          1    1      0     0     0 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           lock           0     0     0    0 no          1    1      0     0     0 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           data           0     0     0    0 no          0    1      0     0     0 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           usersig        0     0     0    0 no         64   64      0     0     0 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           flash          0     0     0    0 no      49152  128      0     0     0 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom         0     0     0    0 no        256   64      0     0     0 0x00 0x00

         Programmer Type : serialupdi
         Description     : SerialUPDI

avrdude: STCS 0x08 to address 0x03
avrdude: Sending 3 bytes [0x55, 0xc3, 0x08]
avrdude: STCS 0x80 to address 0x02
avrdude: Sending 3 bytes [0x55, 0xc2, 0x80]
avrdude: LDCS from 0x00
avrdude: Sending 2 bytes [0x55, 0x80]
avrdude: Received 1 bytes [0x30]
avrdude: UDPI init OK
avrdude: UPDI link initialization OK
avrdude: Sending 2 bytes [0x55, 0xe6]
avrdude: Received 32 bytes [0x6d, 0x65, 0x67, 0x61, 0x41, 0x56, 0x52, 0x20, 0x50, 0x3a, 0x30, 0x44, 0x3a, 0x31, 0x2d, 0x33, 0x4d, 0x32, 0x20, 0x28, 0x30, 0x31, 0x2e, 0x35, 0x39, 0x42, 0x32, 0x30, 0x2e, 0x30, 0x29, 0x00]
avrdude: Received SIB: [megaAVR P:0D:1-3M2 (01.59B20.0)]
avrdude: Device family ID: megaAVR
avrdude: NVM interface: P:0
avrdude: Debug interface: D:1
avrdude: PDI oscillator: 3M2
avrdude: Extra information: (01.59B20.0)
avrdude: NVM type 0: 16-bit, page oriented write
avrdude: LDCS from 0x0B
avrdude: Sending 2 bytes [0x55, 0x8b]
avrdude: Received 1 bytes [0x08]
avrdude: Already in prog mode
avrdude: AVR device initialized and ready to accept instructions

Reading |                                                    | 0% 0.00savrdude: LD from 0x001100
avrdude: Sending 4 bytes [0x55, 0x04, 0x00, 0x11]
avrdude: Received 1 bytes [0x1e]
avrdude: LD from 0x001101
avrdude: Sending 4 bytes [0x55, 0x04, 0x01, 0x11]
avrdude: Received 1 bytes [0x96]
Reading | #################                                  | 33% 0.01savrdude: LD from 0x001102
avrdude: Sending 4 bytes [0x55, 0x04, 0x02, 0x11]
avrdude: Received 1 bytes [0x51]
Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0x1e9651 (probably m4809)
avrdude: reading input file "0x00"
avrdude: writing fuse0 (1 bytes):

Writing |                                                    | 0% 0.00savrdude: ST to 0x001280
avrdude: Sending 4 bytes [0x55, 0x44, 0x80, 0x12]
avrdude: Received 1 bytes [0x40]
avrdude: Sending 1 bytes [0x00]
avrdude: Received 1 bytes [0x40]
Writing | ################################################## | 100% 0.01s

avrdude: 1 bytes of fuse0 written
avrdude: verifying fuse0 memory against 0x00:
avrdude: load data fuse0 data from input file 0x00:
avrdude: input file 0x00 contains 1 bytes
avrdude: reading on-chip fuse0 data:

Reading |                                                    | 0% 0.00savrdude: LD from 0x001280
avrdude: Sending 4 bytes [0x55, 0x04, 0x80, 0x12]
avrdude: Received 1 bytes [0x00]
Reading | ################################################## | 100% 0.00s

avrdude: verifying ...
avrdude: 1 bytes of fuse0 verified
avrdude: reading input file "0x54"
avrdude: writing fuse1 (1 bytes):

Writing |                                                    | 0% 0.00savrdude: ST to 0x001281
avrdude: Sending 4 bytes [0x55, 0x44, 0x81, 0x12]
avrdude: Received 1 bytes [0x40]
avrdude: Sending 1 bytes [0x54]
avrdude: Received 1 bytes [0x40]
Writing | ################################################## | 100% 0.01s

avrdude: 1 bytes of fuse1 written
avrdude: verifying fuse1 memory against 0x54:
avrdude: load data fuse1 data from input file 0x54:
avrdude: input file 0x54 contains 1 bytes
avrdude: reading on-chip fuse1 data:

Reading |                                                    | 0% 0.00savrdude: LD from 0x001281
avrdude: Sending 4 bytes [0x55, 0x04, 0x81, 0x12]
avrdude: Received 1 bytes [0x54]
Reading | ################################################## | 100% 0.00s

avrdude: verifying ...
avrdude: 1 bytes of fuse1 verified
avrdude: reading input file "0x01"
avrdude: writing fuse2 (1 bytes):

Writing |                                                    | 0% 0.00savrdude: ST to 0x001282
avrdude: Sending 4 bytes [0x55, 0x44, 0x82, 0x12]
avrdude: Received 1 bytes [0x40]
avrdude: Sending 1 bytes [0x01]
avrdude: Received 1 bytes [0x40]
Writing | ################################################## | 100% 0.01s

avrdude: 1 bytes of fuse2 written
avrdude: verifying fuse2 memory against 0x01:
avrdude: load data fuse2 data from input file 0x01:
avrdude: input file 0x01 contains 1 bytes
avrdude: reading on-chip fuse2 data:

Reading |                                                    | 0% 0.00savrdude: LD from 0x001282
avrdude: Sending 4 bytes [0x55, 0x04, 0x82, 0x12]
avrdude: Received 1 bytes [0x01]
Reading | ################################################## | 100% 0.00s

avrdude: verifying ...
avrdude: 1 bytes of fuse2 verified
avrdude: reading input file "0x00"
avrdude: writing fuse4 (1 bytes):

Writing |                                                    | 0% 0.00savrdude: ST to 0x001284
avrdude: Sending 4 bytes [0x55, 0x44, 0x84, 0x12]
avrdude: Received 1 bytes [0x40]
avrdude: Sending 1 bytes [0x00]
avrdude: Received 1 bytes [0x40]
Writing | ################################################## | 100% 0.01s

avrdude: 1 bytes of fuse4 written
avrdude: verifying fuse4 memory against 0x00:
avrdude: load data fuse4 data from input file 0x00:
avrdude: input file 0x00 contains 1 bytes
avrdude: reading on-chip fuse4 data:

Reading |                                                    | 0% 0.00savrdude: LD from 0x001284
avrdude: Sending 4 bytes [0x55, 0x04, 0x84, 0x12]
avrdude: Received 1 bytes [0x00]
Reading | ################################################## | 100% 0.00s

avrdude: verifying ...
avrdude: 1 bytes of fuse4 verified
avrdude: reading input file "0xCD"
avrdude: writing fuse5 (1 bytes):

Writing |                                                    | 0% 0.00savrdude: ST to 0x001285
avrdude: Sending 4 bytes [0x55, 0x44, 0x85, 0x12]
avrdude: Received 1 bytes [0x40]
avrdude: Sending 1 bytes [0xcd]
avrdude: Received 1 bytes [0x40]
Writing | ################################################## | 100% 0.01s

avrdude: 1 bytes of fuse5 written
avrdude: verifying fuse5 memory against 0xCD:
avrdude: load data fuse5 data from input file 0xCD:
avrdude: input file 0xCD contains 1 bytes
avrdude: reading on-chip fuse5 data:

Reading |                                                    | 0% 0.00savrdude: LD from 0x001285
avrdude: Sending 4 bytes [0x55, 0x04, 0x85, 0x12]
avrdude: Received 1 bytes [0xc9]
Reading | ################################################## | 100% 0.00s

avrdude: verifying ...
Segmentation fault: 11

mcudude <mcudude>
Mon 13 Dec 2021 10:01:35 AM UTC, comment #11: 

Hey, I'm glad to hear that at least flash programming works correctly now. I assume that once uploaded, programs work as expected? Could you confirm this?

As for the atmega4808 failure during fuse setting, there are actually two problems there: the more obvious one is segmentation fault, which probably is just some invalid printf. It will take a while to find, but it's not a biggie. What bothers me more is the fact that fuse is being written with value 0x54, but read back with value 0x00:

avrdude: ST to 0x001281
avrdude: Sending 4 bytes [0x55, 0x44, 0x81, 0x12]
avrdude: Received 1 bytes [0x40]
avrdude: Sending 1 bytes [ 0x54 ]
avrdude: Received 1 bytes [0x40]
Writing | ################################################## | 100% 0.01s
avrdude: 1 bytes of fuse1 written
avrdude: verifying fuse1 memory against 0x54:
avrdude: load data fuse1 data from input file 0x54:
avrdude: input file 0x54 contains 1 bytes
avrdude: reading on-chip fuse1 data:
Reading |                                                    | 0% 0.00s
avrdude: LD from 0x001281
avrdude: Sending 4 bytes [0x55, 0x04, 0x81, 0x12]
avrdude: Received 1 bytes [ 0x00 ]

Unfortunately I don't think I can fix that without having the actual chip on my desk, and I'm currently waiting for one to arrive in couple of days.

In the meantime I will try to replicate the scenario somehow using the hardware I have on hand.

Once again, thanks a lot for all your effort!

Dawid Buchwald <dawidbuchwald>
Project Member
Mon 13 Dec 2021 09:29:23 AM UTC, comment #10: 

Thanks Dawid, reading from flash now works in the ATmega4809!

Just for curiosity and since I have all megaAVR-0 series chips, I decided to try them all.

Uploading and fuse read/write works on ATmega4809, ATmega3208, ATmega1608, and ATmega808.

On Atmega4808, ATmega3209, ATmega1609 and ATmega809 I'm getting "Segmentation fault: 11". Note that this only happens when I'm writing/reading fuses.

$ /Users/hans/Downloads/SVN/avrdude/avrdude -C/Users/hans/Documents/Arduino/hardware/MegaCoreX/megaavr/avrdude.conf -vvv -patmega3209 -cserialupdi -P /dev/cu.usbserial-1410 -b230400 -Ufuse0:w:0x00:m -Ufuse1:w:0x54:m -Ufuse2:w:0x01:m -Ufuse4:w:0x00:m -Ufuse5:w:0xC9:m -Ufuse6:w:0x06:m -Ufuse7:w:0x00:m -Ufuse8:w:0x00:m -Ulock:w:0xC5:m

avrdude: Version 6.3-20211205
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "/Users/hans/Documents/Arduino/hardware/MegaCoreX/megaavr/avrdude.conf"
         User configuration file is "/Users/hans/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/cu.usbserial-1410
         Using Programmer              : serialupdi
         Overriding Baud Rate          : 230400
avrdude: Opening serial port...
         AVR Part                      : ATmega3209
         Chip Erase delay              : 0 us
         PAGEL                         : P00
         BS2                           : P00
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 0
         StabDelay                     : 0
         CmdexeDelay                   : 0
         SyncLoops                     : 0
         ByteDelay                     : 0
         PollIndex                     : 0
         PollValue                     : 0x00
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           signature      0     0     0    0 no          3    1      0     0     0 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           prodsig        0     0     0    0 no         61   61      0     0     0 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           fuses          0     0     0    0 no          9    1      0     0     0 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           fuse0          0     0     0    0 no          1    1      0     0     0 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           fuse1          0     0     0    0 no          1    1      0     0     0 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           fuse2          0     0     0    0 no          1    1      0     0     0 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           fuse4          0     0     0    0 no          1    1      0     0     0 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           fuse5          0     0     0    0 no          1    1      0     0     0 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           fuse6          0     0     0    0 no          1    1      0     0     0 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           fuse7          0     0     0    0 no          1    1      0     0     0 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           fuse8          0     0     0    0 no          1    1      0     0     0 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           lock           0     0     0    0 no          1    1      0     0     0 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           data           0     0     0    0 no          0    1      0     0     0 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           usersig        0     0     0    0 no         64   64      0     0     0 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           flash          0     0     0    0 no      32768  128      0     0     0 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom         0     0     0    0 no        256   64      0     0     0 0x00 0x00

         Programmer Type : serialupdi
         Description     : SerialUPDI

avrdude: STCS 0x08 to address 0x03
avrdude: Sending 3 bytes [0x55, 0xc3, 0x08]
avrdude: STCS 0x80 to address 0x02
avrdude: Sending 3 bytes [0x55, 0xc2, 0x80]
avrdude: LDCS from 0x00
avrdude: Sending 2 bytes [0x55, 0x80]
avrdude: ser_recv(): programmer is not responding
avrdude: serialupdi_recv(): programmer is not responding
avrdude: Check failed
avrdude: Datalink not active, resetting...
avrdude: Sending double break
avrdude: Opening serial port...
avrdude: Opening serial port...
avrdude: STCS 0x08 to address 0x03
avrdude: Sending 3 bytes [0x55, 0xc3, 0x08]
avrdude: STCS 0x80 to address 0x02
avrdude: Sending 3 bytes [0x55, 0xc2, 0x80]
avrdude: LDCS from 0x00
avrdude: Sending 2 bytes [0x55, 0x80]
avrdude: Received 1 bytes [0x30]
avrdude: UDPI init OK
avrdude: UPDI link initialization OK
avrdude: Sending 2 bytes [0x55, 0xe6]
avrdude: Received 32 bytes [0x6d, 0x65, 0x67, 0x61, 0x41, 0x56, 0x52, 0x20, 0x50, 0x3a, 0x30, 0x44, 0x3a, 0x31, 0x2d, 0x33, 0x4d, 0x32, 0x20, 0x28, 0x30, 0x31, 0x2e, 0x35, 0x39, 0x42, 0x32, 0x30, 0x2e, 0x30, 0x29, 0x00]
avrdude: Received SIB: [megaAVR P:0D:1-3M2 (01.59B20.0)]
avrdude: Device family ID: megaAVR
avrdude: NVM interface: P:0
avrdude: Debug interface: D:1
avrdude: PDI oscillator: 3M2
avrdude: Extra information: (01.59B20.0)
avrdude: NVM type 0: 16-bit, page oriented write
avrdude: LDCS from 0x0B
avrdude: Sending 2 bytes [0x55, 0x8b]
avrdude: Received 1 bytes [0x82]
avrdude: Entering NVM programming mode
avrdude: UPDI writing key
avrdude: Sending 2 bytes [0x55, 0xe0]
avrdude: Sending 8 bytes [0x20, 0x67, 0x6f, 0x72, 0x50, 0x4d, 0x56, 0x4e]
avrdude: LDCS from 0x07
avrdude: Sending 2 bytes [0x55, 0x87]
avrdude: Received 1 bytes [0x10]
avrdude: Key status: 0x10
avrdude: Sending reset request
avrdude: STCS 0x59 to address 0x08
avrdude: Sending 3 bytes [0x55, 0xc8, 0x59]
avrdude: Sending release reset request
avrdude: STCS 0x00 to address 0x08
avrdude: Sending 3 bytes [0x55, 0xc8, 0x00]
avrdude: LDCS from 0x0B
avrdude: Sending 2 bytes [0x55, 0x8b]
avrdude: Received 1 bytes [0x21]
avrdude: LDCS from 0x0B
avrdude: Sending 2 bytes [0x55, 0x8b]
avrdude: Received 1 bytes [0x01]
avrdude: LDCS from 0x0B
avrdude: Sending 2 bytes [0x55, 0x8b]
avrdude: Received 1 bytes [0x01]
avrdude: LDCS from 0x0B
avrdude: Sending 2 bytes [0x55, 0x8b]
avrdude: Received 1 bytes [0x01]
avrdude: LDCS from 0x0B
avrdude: Sending 2 bytes [0x55, 0x8b]
avrdude: Received 1 bytes [0x01]
avrdude: LDCS from 0x0B
avrdude: Sending 2 bytes [0x55, 0x8b]
avrdude: Received 1 bytes [0x01]
avrdude: LDCS from 0x0B
avrdude: Sending 2 bytes [0x55, 0x8b]
avrdude: Received 1 bytes [0x01]
avrdude: LDCS from 0x0B
avrdude: Sending 2 bytes [0x55, 0x8b]
avrdude: Received 1 bytes [0x01]
avrdude: LDCS from 0x0B
avrdude: Sending 2 bytes [0x55, 0x8b]
avrdude: Received 1 bytes [0x01]
avrdude: LDCS from 0x0B
avrdude: Sending 2 bytes [0x55, 0x8b]
avrdude: Received 1 bytes [0x01]
avrdude: LDCS from 0x0B
avrdude: Sending 2 bytes [0x55, 0x8b]
avrdude: Received 1 bytes [0x08]
avrdude: LDCS from 0x0B
avrdude: Sending 2 bytes [0x55, 0x8b]
avrdude: Received 1 bytes [0x08]
avrdude: Entered NVM programming mode
avrdude: AVR device initialized and ready to accept instructions

Reading |                                                    | 0% 0.00savrdude: LD from 0x001100
avrdude: Sending 4 bytes [0x55, 0x04, 0x00, 0x11]
avrdude: Received 1 bytes [0x1e]
avrdude: LD from 0x001101
avrdude: Sending 4 bytes [0x55, 0x04, 0x01, 0x11]
avrdude: Received 1 bytes [0x95]
Reading | #################                                  | 33% 0.01savrdude: LD from 0x001102
avrdude: Sending 4 bytes [0x55, 0x04, 0x02, 0x11]
avrdude: Received 1 bytes [0x31]
Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0x1e9531 (probably m3209)
avrdude: reading input file "0x00"
avrdude: writing fuse0 (1 bytes):

Writing |                                                    | 0% 0.00savrdude: ST to 0x001280
avrdude: Sending 4 bytes [0x55, 0x44, 0x80, 0x12]
avrdude: Received 1 bytes [0x40]
avrdude: Sending 1 bytes [0x00]
avrdude: Received 1 bytes [0x40]
Writing | ################################################## | 100% 0.01s

avrdude: 1 bytes of fuse0 written
avrdude: verifying fuse0 memory against 0x00:
avrdude: load data fuse0 data from input file 0x00:
avrdude: input file 0x00 contains 1 bytes
avrdude: reading on-chip fuse0 data:

Reading |                                                    | 0% 0.00savrdude: LD from 0x001280
avrdude: Sending 4 bytes [0x55, 0x04, 0x80, 0x12]
avrdude: Received 1 bytes [0x00]
Reading | ################################################## | 100% 0.00s

avrdude: verifying ...
avrdude: 1 bytes of fuse0 verified
avrdude: reading input file "0x54"
avrdude: writing fuse1 (1 bytes):

Writing |                                                    | 0% 0.00savrdude: ST to 0x001281
avrdude: Sending 4 bytes [0x55, 0x44, 0x81, 0x12]
avrdude: Received 1 bytes [0x40]
avrdude: Sending 1 bytes [0x54]
avrdude: Received 1 bytes [0x40]
Writing | ################################################## | 100% 0.01s

avrdude: 1 bytes of fuse1 written
avrdude: verifying fuse1 memory against 0x54:
avrdude: load data fuse1 data from input file 0x54:
avrdude: input file 0x54 contains 1 bytes
avrdude: reading on-chip fuse1 data:

Reading |                                                    | 0% 0.00savrdude: LD from 0x001281
avrdude: Sending 4 bytes [0x55, 0x04, 0x81, 0x12]
avrdude: Received 1 bytes [0x00]
Reading | ################################################## | 100% 0.00s

avrdude: verifying ...
Segmentation fault: 11

mcudude <mcudude>
Mon 13 Dec 2021 08:52:58 AM UTC, comment #9: 

Thanks a lot for your support, I really appreciate the time and effort. I think I have a fix for you. What you have to do is:

svn update

make clean all

You expect following output:

➜  avrdude> svn update
Updating '.':
U    serialupdi.c
Updated to revision 1518.
➜  avrdude> make clean all

Try again when built. Thanks in advance!

Looking forward to your reply :)

Dawid Buchwald <dawidbuchwald>
Project Member
Mon 13 Dec 2021 08:33:50 AM UTC, comment #8: 

> First of all, thank you A LOT for your time and I'm really sorry it didn't

work for you. Unfortunately, I don't own any other UPDI based MCUs, and there
are apparently three different programming models for those, so I need to do
some shopping today.

Well, I'm just happy I can help out with the development! I also own a bunch of tiny0/1 boards as well, so I can also help you out testing these when the time is ready.

After further investigation, it looks reading flash does work, since the correct content are being received in verbose mode. However, Avrdude don't pick it up. When running the following command:

$ /Users/hans/Downloads/SVN/avrdude/avrdude -C/Users/hans/Documents/Arduino/hardware/MegaCoreX/megaavr/avrdude.conf -vvv -patmega4809 -cserialupdi -P /dev/cu.usbserial-1410 -b230400 -Uflash:r:dump.hex:i

I can see that the actual flash content data is received (matched the loaded hex file), but Avrdude concludes that flash is empty, and dump.hex only contains :00000001FF.

Here is a "compressed" output of the flash read command:

$ /Users/hans/Downloads/SVN/avrdude/avrdude -C/Users/hans/Documents/Arduino/hardware/MegaCoreX/megaavr/avrdude.conf -vvv -patmega4809 -cserialupdi -P /dev/cu.usbserial-1410 -b230400 -Uflash:r:dump.hex:i

...

avrdude: Version 6.3-20211205
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

...

         Programmer Type : serialupdi
         Description     : SerialUPDI

avrdude: STCS 0x08 to address 0x03
avrdude: Sending 3 bytes [0x55, 0xc3, 0x08]
avrdude: STCS 0x80 to address 0x02
avrdude: Sending 3 bytes [0x55, 0xc2, 0x80]
avrdude: LDCS from 0x00
avrdude: Sending 2 bytes [0x55, 0x80]
avrdude: ser_recv(): programmer is not responding
avrdude: serialupdi_recv(): programmer is not responding
avrdude: Check failed
avrdude: Datalink not active, resetting...
avrdude: Sending double break
avrdude: Opening serial port...
avrdude: Opening serial port...
avrdude: STCS 0x08 to address 0x03
avrdude: Sending 3 bytes [0x55, 0xc3, 0x08]
avrdude: STCS 0x80 to address 0x02
avrdude: Sending 3 bytes [0x55, 0xc2, 0x80]
avrdude: LDCS from 0x00
avrdude: Sending 2 bytes [0x55, 0x80]
avrdude: Received 1 bytes [0x30]
avrdude: UDPI init OK
avrdude: UPDI link initialization OK
avrdude: Sending 2 bytes [0x55, 0xe6]
avrdude: Received 32 bytes [0x6d, 0x65, 0x67, 0x61, 0x41, 0x56, 0x52, 0x20, 0x50, 0x3a, 0x30, 0x44, 0x3a, 0x31, 0x2d, 0x33, 0x4d, 0x32, 0x20, 0x28, 0x30, 0x31, 0x2e, 0x35, 0x39, 0x42, 0x32, 0x30, 0x2e, 0x30, 0x29, 0x00]
avrdude: Received SIB: [megaAVR P:0D:1-3M2 (01.59B20.0)]
avrdude: Device family ID: megaAVR
avrdude: NVM interface: P:0
avrdude: Debug interface: D:1
avrdude: PDI oscillator: 3M2
avrdude: Extra information: (01.59B20.0)
avrdude: NVM type 0: 16-bit, page oriented write
avrdude: LDCS from 0x0B
avrdude: Sending 2 bytes [0x55, 0x8b]
avrdude: Received 1 bytes [0x82]
avrdude: Entering NVM programming mode
avrdude: UPDI writing key
avrdude: Sending 2 bytes [0x55, 0xe0]
avrdude: Sending 8 bytes [0x20, 0x67, 0x6f, 0x72, 0x50, 0x4d, 0x56, 0x4e]
avrdude: LDCS from 0x07
avrdude: Sending 2 bytes [0x55, 0x87]
avrdude: Received 1 bytes [0x10]
avrdude: Key status: 0x10
avrdude: Sending reset request
avrdude: STCS 0x59 to address 0x08
avrdude: Sending 3 bytes [0x55, 0xc8, 0x59]
avrdude: Sending release reset request
avrdude: STCS 0x00 to address 0x08
avrdude: Sending 3 bytes [0x55, 0xc8, 0x00]
avrdude: LDCS from 0x0B
avrdude: Sending 2 bytes [0x55, 0x8b]
avrdude: Received 1 bytes [0x21]
avrdude: LDCS from 0x0B
avrdude: Sending 2 bytes [0x55, 0x8b]
avrdude: Received 1 bytes [0x01]
avrdude: LDCS from 0x0B
avrdude: Sending 2 bytes [0x55, 0x8b]
avrdude: Received 1 bytes [0x01]
avrdude: LDCS from 0x0B
avrdude: Sending 2 bytes [0x55, 0x8b]
avrdude: Received 1 bytes [0x01]
avrdude: LDCS from 0x0B
avrdude: Sending 2 bytes [0x55, 0x8b]
avrdude: Received 1 bytes [0x01]
avrdude: LDCS from 0x0B
avrdude: Sending 2 bytes [0x55, 0x8b]
avrdude: Received 1 bytes [0x01]
avrdude: LDCS from 0x0B
avrdude: Sending 2 bytes [0x55, 0x8b]
avrdude: Received 1 bytes [0x01]
avrdude: LDCS from 0x0B
avrdude: Sending 2 bytes [0x55, 0x8b]
avrdude: Received 1 bytes [0x01]
avrdude: LDCS from 0x0B
avrdude: Sending 2 bytes [0x55, 0x8b]
avrdude: Received 1 bytes [0x01]
avrdude: LDCS from 0x0B
avrdude: Sending 2 bytes [0x55, 0x8b]
avrdude: Received 1 bytes [0x01]
avrdude: LDCS from 0x0B
avrdude: Sending 2 bytes [0x55, 0x8b]
avrdude: Received 1 bytes [0x08]
avrdude: LDCS from 0x0B
avrdude: Sending 2 bytes [0x55, 0x8b]
avrdude: Received 1 bytes [0x08]
avrdude: Entered NVM programming mode
avrdude: AVR device initialized and ready to accept instructions

Reading |                                                    | 0% 0.00savrdude: LD from 0x001100
avrdude: Sending 4 bytes [0x55, 0x04, 0x00, 0x11]
avrdude: Received 1 bytes [0x1e]
avrdude: LD from 0x001101
avrdude: Sending 4 bytes [0x55, 0x04, 0x01, 0x11]
avrdude: Received 1 bytes [0x96]
Reading | #################                                  | 33% 0.01savrdude: LD from 0x001102
avrdude: Sending 4 bytes [0x55, 0x04, 0x02, 0x11]
avrdude: Received 1 bytes [0x51]
Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0x1e9651 (probably m4809)
avrdude: reading flash memory:

Reading |                                                    | 0% 0.00savrdude: Reading 128 bytes from 0x004000
avrdude: ST_PTR to 0x004000
avrdude: Sending 4 bytes [0x55, 0x69, 0x00, 0x40]
avrdude: Received 1 bytes [0x40]
avrdude: Repeat 128
avrdude: Sending 3 bytes [0x55, 0xa0, 0x7f]
avrdude: LD8 from ptr++
avrdude: Sending 2 bytes [0x55, 0x24]
avrdude: Received 128 bytes [0x0c, 0x94, 0x50, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0xd9, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00]
avrdude: Reading 128 bytes from 0x004080
avrdude: ST_PTR to 0x004080
avrdude: Sending 4 bytes [0x55, 0x69, 0x80, 0x40]
avrdude: Received 1 bytes [0x40]
avrdude: Repeat 128
avrdude: Sending 3 bytes [0x55, 0xa0, 0x7f]
avrdude: LD8 from ptr++
avrdude: Sending 2 bytes [0x55, 0x24]
avrdude: Received 128 bytes [0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x11, 0x24, 0x1f, 0xbe, 0xcf, 0xef, 0xcd, 0xbf, 0xdf, 0xe3, 0xde, 0xbf, 0x28, 0xe2, 0xa0, 0xe0, 0xb8, 0xe2, 0x01, 0xc0, 0x1d, 0x92, 0xa4, 0x30, 0xb2, 0x07, 0xe1, 0xf7, 0x0e, 0x94, 0x01, 0x01, 0x0c, 0x94, 0x88, 0x01, 0x0c, 0x94, 0x00, 0x00, 0x90, 0x91, 0x91, 0x0a, 0x9f, 0x7e, 0x90, 0x93, 0x91, 0x0a, 0x90, 0x91, 0xa0, 0x04, 0x95, 0xff, 0x0a, 0xc0, 0x81, 0x11, 0x04, 0xc0, 0x80, 0xe2, 0x80, 0x93, 0xa6, 0x04, 0x08, 0x95, 0x80, 0xe2, 0x80, 0x93, 0xa5, 0x04, 0x08, 0x95, 0x9f, 0xb7, 0xf8, 0x94, 0x81, 0x11, 0x07, 0xc0, 0x80, 0x91, 0xb5, 0x04, 0x87, 0x7f, 0x80, 0x93, 0xb5, 0x04]
avrdude: Reading 128 bytes from 0x004100
avrdude: ST_PTR to 0x004100
avrdude: Sending 4 bytes [0x55, 0x69, 0x00, 0x41]
avrdude: Received 1 bytes [0x40]
avrdude: Repeat 128
avrdude: Sending 3 bytes [0x55, 0xa0, 0x7f]
avrdude: LD8 from ptr++
avrdude: Sending 2 bytes [0x55, 0x24]
avrdude: Received 128 bytes [0x9f, 0xbf, 0x08, 0x95, 0x80, 0x91, 0xb5, 0x04, 0x88, 0x60, 0xf8, 0xcf, 0x8f, 0xb7, 0xf8, 0x94, 0x20, 0x91, 0x00, 0x28, 0x30, 0x91, 0x01, 0x28, 0x40, 0x91, 0x02, 0x28, 0x50, 0x91, 0x03, 0x28, 0xe0, 0x91, 0xaa, 0x0a, 0xf0, 0x91, 0xab, 0x0a, 0x90, 0x91, 0xa6, 0x0a, 0x90, 0xff, 0x08, 0xc0, 0x2f, 0x5f, 0x3f, 0x4f, 0x4f, 0x4f, 0x5f, 0x4f, 0xe0, 0x91, 0xaa, 0x0a, 0xf0, 0x91, 0xab, 0x0a, 0x8f, 0xbf, 0xa8, 0xee, 0xb3, 0xe0, 0x0e, 0x94, 0x6e, 0x01, 0x24, 0xe0, 0xf6, 0x95, 0xe7, 0x95, 0x2a, 0x95, 0xe1, 0xf7, 0x6e, 0x0f, 0x7f, 0x1f, 0x81, 0x1d, 0x91, 0x1d, 0x08, 0x95, 0xcf, 0x92, 0xdf, 0x92, 0xef, 0x92, 0xff, 0x92, 0x0e, 0x94, 0x86, 0x00, 0x6b, 0x01, 0x7c, 0x01, 0x20, 0xe4, 0xc2, 0x0e, 0x22, 0xe4, 0xd2, 0x1e, 0x2f, 0xe0, 0xe2, 0x1e, 0xf1, 0x1c, 0x80, 0xe4, 0xc8, 0x16]
avrdude: Reading 128 bytes from 0x004180
avrdude: ST_PTR to 0x004180
avrdude: Sending 4 bytes [0x55, 0x69, 0x80, 0x41]
avrdude: Received 1 bytes [0x40]
avrdude: Repeat 128
avrdude: Sending 3 bytes [0x55, 0xa0, 0x7f]
avrdude: LD8 from ptr++
avrdude: Sending 2 bytes [0x55, 0x24]
avrdude: Received 128 bytes [0x82, 0xe4, 0xd8, 0x06, 0x8f, 0xe0, 0xe8, 0x06, 0xf1, 0x04, 0x38, 0xf4, 0x0e, 0x94, 0x86, 0x00, 0xc6, 0x16, 0xd7, 0x06, 0xe8, 0x06, 0xf9, 0x06, 0xc8, 0xf3, 0x0e, 0x94, 0x86, 0x00, 0x6c, 0x15, 0x7d, 0x05, 0x8e, 0x05, 0x9f, 0x05, 0xc8, 0xf3, 0xff, 0x90, 0xef, 0x90, 0xdf, 0x90, 0xcf, 0x90, 0x08, 0x95, 0x1f, 0x92, 0x0f, 0x92, 0x0f, 0xb6, 0x0f, 0x92, 0x11, 0x24, 0x8f, 0x93, 0x9f, 0x93, 0xaf, 0x93, 0xbf, 0x93, 0x80, 0x91, 0x00, 0x28, 0x90, 0x91, 0x01, 0x28, 0xa0, 0x91, 0x02, 0x28, 0xb0, 0x91, 0x03, 0x28, 0x01, 0x96, 0xa1, 0x1d, 0xb1, 0x1d, 0x80, 0x93, 0x00, 0x28, 0x90, 0x93, 0x01, 0x28, 0xa0, 0x93, 0x02, 0x28, 0xb0, 0x93, 0x03, 0x28, 0x81, 0xe0, 0x80, 0x93, 0xa6, 0x0a, 0xbf, 0x91, 0xaf, 0x91, 0x9f, 0x91, 0x8f, 0x91, 0x0f, 0x90, 0x0f, 0xbe, 0x0f, 0x90, 0x1f, 0x90]
Reading | #                                                  | 1% 0.06savrdude: Reading 128 bytes from 0x004200
avrdude: ST_PTR to 0x004200
avrdude: Sending 4 bytes [0x55, 0x69, 0x00, 0x42]
avrdude: Received 1 bytes [0x40]
avrdude: Repeat 128
avrdude: Sending 3 bytes [0x55, 0xa0, 0x7f]
avrdude: LD8 from ptr++
avrdude: Sending 2 bytes [0x55, 0x24]
avrdude: Received 128 bytes [0x18, 0x95, 0x88, 0xed, 0x90, 0xe0, 0x84, 0xbf, 0x90, 0x93, 0x61, 0x00, 0x80, 0x91, 0x02, 0x06, 0x86, 0x60, 0x80, 0x93, 0x02, 0x06, 0x80, 0x91, 0x00, 0x06, 0x81, 0x60, 0x80, 0x93, 0x00, 0x06, 0x80, 0x91, 0x02, 0x06, 0x8f, 0x7c, 0x80, 0x65, 0x80, 0x93, 0x02, 0x06, 0x10, 0x92, 0xe2, 0x05, 0x82, 0xe0, 0x80, 0x93, 0xe4, 0x05, 0x81, 0xe0, 0x80, 0x93, 0x03, 0x0a, 0x8e, 0xef, 0x80, 0x93, 0x27, 0x0a, 0x80, 0x93, 0x26, 0x0a, 0x80, 0xe8, 0x80, 0x93, 0x2d, 0x0a, 0x80, 0x93, 0x2b, 0x0a, 0x80, 0x93, 0x29, 0x0a, 0x80, 0x93, 0x2c, 0x0a, 0x80, 0x93, 0x2a, 0x0a, 0x80, 0x93, 0x28, 0x0a, 0x8b, 0xe0, 0x80, 0x93, 0x00, 0x0a, 0x87, 0xe0, 0x80, 0x93, 0xe5, 0x05, 0xe0, 0xe8, 0xfa, 0xe0, 0x37, 0xe0, 0x2e, 0xef, 0x90, 0xe8, 0x85, 0xe0, 0x31, 0x83, 0x24, 0x87, 0x95, 0x87, 0x80, 0x83]
avrdude: Reading 128 bytes from 0x004280
avrdude: ST_PTR to 0x004280
avrdude: Sending 4 bytes [0x55, 0x69, 0x80, 0x42]
avrdude: Received 1 bytes [0x40]
avrdude: Repeat 128
avrdude: Sending 3 bytes [0x55, 0xa0, 0x7f]
avrdude: LD8 from ptr++
avrdude: Sending 2 bytes [0x55, 0x24]
avrdude: Received 128 bytes [0x70, 0x96, 0xe0, 0x3c, 0x4a, 0xe0, 0xf4, 0x07, 0xb9, 0xf7, 0x10, 0x92, 0xa1, 0x0a, 0x8f, 0xe7, 0x9e, 0xe3, 0x80, 0x93, 0xac, 0x0a, 0x90, 0x93, 0xad, 0x0a, 0x80, 0x91, 0xa5, 0x0a, 0x81, 0x60, 0x80, 0x93, 0xa5, 0x0a, 0x10, 0x92, 0xa0, 0x0a, 0x80, 0x91, 0xa0, 0x0a, 0x81, 0x60, 0x80, 0x93, 0xa0, 0x0a, 0x78, 0x94, 0x80, 0xe2, 0x80, 0x93, 0xa1, 0x04, 0xc0, 0xe0, 0xd0, 0xe0, 0x81, 0xe0, 0x0e, 0x94, 0x64, 0x00, 0x0e, 0x94, 0xaf, 0x00, 0x80, 0xe0, 0x0e, 0x94, 0x64, 0x00, 0x0e, 0x94, 0xaf, 0x00, 0x20, 0x97, 0xa1, 0xf3, 0x0e, 0x94, 0x00, 0x00, 0xf1, 0xcf, 0x0e, 0x94, 0x79, 0x01, 0xa5, 0x9f, 0x90, 0x0d, 0xb4, 0x9f, 0x90, 0x0d, 0xa4, 0x9f, 0x80, 0x0d, 0x91, 0x1d, 0x11, 0x24, 0x08, 0x95, 0xa2, 0x9f, 0xb0, 0x01, 0xb3, 0x9f, 0xc0, 0x01, 0xa3, 0x9f, 0x70, 0x0d, 0x81, 0x1d]
avrdude: Reading 128 bytes from 0x004300
avrdude: ST_PTR to 0x004300
avrdude: Sending 4 bytes [0x55, 0x69, 0x00, 0x43]
avrdude: Received 1 bytes [0x40]
avrdude: Repeat 128
avrdude: Sending 3 bytes [0x55, 0xa0, 0x7f]
avrdude: LD8 from ptr++
avrdude: Sending 2 bytes [0x55, 0x24]
avrdude: Received 128 bytes [0x11, 0x24, 0x91, 0x1d, 0xb2, 0x9f, 0x70, 0x0d, 0x81, 0x1d, 0x11, 0x24, 0x91, 0x1d, 0x08, 0x95, 0xf8, 0x94, 0xff, 0xcf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]
Reading | #                                                  | 2% 0.13savrdude: Reading 128 bytes from 0x004400
avrdude: ST_PTR to 0x004400
avrdude: Sending 4 bytes [0x55, 0x69, 0x00, 0x44]
avrdude: Received 1 bytes [0x40]
avrdude: Repeat 128
avrdude: Sending 3 bytes [0x55, 0xa0, 0x7f]
avrdude: LD8 from ptr++
avrdude: Sending 2 bytes [0x55, 0x24]
avrdude: Received 128 bytes [0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]

...

avrdude: Reading 128 bytes from 0x00FF80
avrdude: ST_PTR to 0x00FF80
avrdude: Sending 4 bytes [0x55, 0x69, 0x80, 0xff]
avrdude: Received 1 bytes [0x40]
avrdude: Repeat 128
avrdude: Sending 3 bytes [0x55, 0xa0, 0x7f]
avrdude: LD8 from ptr++
avrdude: Sending 2 bytes [0x55, 0x24]
avrdude: Received 128 bytes [0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]
Reading | ################################################## | 100% 6.17s

avrdude: Flash is empty, resulting file has no contents.
avrdude: writing output file "dump.hex"

avrdude: safemode: Fuses OK (E:FF, H:FF, L:FF)
avrdude: Leaving NVM programming mode
avrdude: Sending reset request
avrdude: STCS 0x59 to address 0x08
avrdude: Sending 3 bytes [0x55, 0xc8, 0x59]
avrdude: Sending release reset request
avrdude: STCS 0x00 to address 0x08
avrdude: Sending 3 bytes [0x55, 0xc8, 0x00]
avrdude: STCS 0x0C to address 0x03
avrdude: Sending 3 bytes [0x55, 0xc3, 0x0c]

avrdude done.  Thank you.

mcudude <mcudude>
Mon 13 Dec 2021 08:29:25 AM UTC, comment #7: 

First of all, thank you A LOT for your time and I'm really sorry it didn't work for you. Unfortunately, I don't own any other UPDI based MCUs, and there are apparently three different programming models for those, so I need to do some shopping today.

That being said, based on the output you provided (thanks again!) it seems that the issue is not very severe - programming of the flash went just fine and it was read back correctly. The only problem I see is that instead of writing to addresses 0x1000, it seems to have written your image (correctly, based on following read!) to 0x4000. I must have messed up integration of my code with AVRDUDE.

Anyway, I will let you know when I fix this. As for the other issue (DTR/RTS) - I will look into that a bit later, for now I just want the basic upload procedure to work fine.

Dawid Buchwald <dawidbuchwald>
Project Member
Sun 12 Dec 2021 11:04:03 PM UTC, comment #6: 

No worries! I was able to build after following your instructions. It would be really nice if the DTR/RTS pulse could stay low during the entire Avrdude session. At the moment there seem to be two short (250us) pulses, one at the start and one at the end. This is different from how pymcuprog behaves. As mentioned in an earlier post, this signal could be used to control some simple digital logic that could automatically switch between UPDI and UART mode on a programmer.

I can successfully upload to an ATmega4809, but I'm getting an error when trying to read from the flash:

avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0000
         0x11 != 0x0c
avrdude: verification error; content mismatch

avrdude: safemode: Fuses OK (E:FF, H:FF, L:FF)
avrdude: Leaving NVM programming mode

avrdude done.  Thank you.

I'm trying to upload a simple blink program compiled with Arduino IDE. When uploading with an Xplained Mini programmer (and a different Avrdude version, the one bundled with Arduino IDE), I'm not getting any errors. the Xplained Mini doesn't work with the Avrdude binary I compiled. But that's a problem for another time.

Here is the hex file I'm loading:

:020000040000FA
:100000000C9450000C9462000C9462000C946200FA
:100010000C9462000C9462000C9462000C946200D8
:100020000C9462000C9462000C9462000C946200C8
:100030000C9462000C9462000C9462000C946200B8
:100040000C9462000C9462000C9462000C946200A8
:100050000C9462000C9462000C9462000C94620098
:100060000C9462000C94D9000C9462000C94620011
:100070000C9462000C9462000C9462000C94620078
:100080000C9462000C9462000C9462000C94620068
:100090000C9462000C9462000C9462000C94620058
:1000A00011241FBECFEFCDBFDFE3DEBF28E2A0E00B
:1000B000B8E201C01D92A430B207E1F70E9401012D
:1000C0000C9488010C9400009091910A9F7E90936B
:1000D000910A9091A00495FF0AC0811104C080E2AA
:1000E0008093A604089580E28093A50408959FB7A5
:1000F000F894811107C08091B504877F8093B5047F
:100100009FBF08958091B5048860F8CF8FB7F894A9
:100110002091002830910128409102285091032815
:10012000E091AA0AF091AB0A9091A60A90FF08C04C
:100130002F5F3F4F4F4F5F4FE091AA0AF091AB0AFC
:100140008FBFA8EEB3E00E946E0124E0F695E7951C
:100150002A95E1F76E0F7F1F811D911D0895CF92A3
:10016000DF92EF92FF920E9486006B017C0120E4F7
:10017000C20E22E4D21E2FE0E21EF11C80E4C8165B
:1001800082E4D8068FE0E806F10438F40E94860085
:10019000C616D706E806F906C8F30E9486006C1555
:1001A0007D058E059F05C8F3FF90EF90DF90CF90FF
:1001B00008951F920F920FB60F9211248F939F9361
:1001C000AF93BF938091002890910128A0910228BD
:1001D000B09103280196A11DB11D80930028909332
:1001E0000128A0930228B093032881E08093A60AF7
:1001F000BF91AF919F918F910F900FBE0F901F9065
:10020000189588ED90E084BF90936100809102067C
:1002100086608093020680910006816080930006CC
:10022000809102068F7C8065809302061092E20521
:1002300082E08093E40581E08093030A8EEF80934F
:10024000270A8093260A80E880932D0A80932B0A40
:100250008093290A80932C0A80932A0A8093280A83
:100260008BE08093000A87E08093E505E0E8FAE000
:1002700037E02EEF90E885E03183248795878083EF
:100280007096E03C4AE0F407B9F71092A10A8FE7B4
:100290009EE38093AC0A9093AD0A8091A50A816099
:1002A0008093A50A1092A00A8091A00A8160809391
:1002B000A00A789480E28093A104C0E0D0E081E0BD
:1002C0000E9464000E94AF0080E00E9464000E94CF
:1002D000AF002097A1F30E940000F1CF0E947901A6
:1002E000A59F900DB49F900DA49F800D911D11248A
:1002F0000895A29FB001B39FC001A39F700D811DFF
:100300001124911DB29F700D811D1124911D08951E
:04031000F894FFCF8F
:00000001FF

Here is the verbose Avrdude output (sorry for the length, but you said you wanted it all):

$ /Users/hans/Downloads/SVN/avrdude/avrdude -C/Users/hans/Documents/Arduino/hardware/MegaCoreX/megaavr/avrdude.conf -v -v -v -patmega4809 -cserialupdi -P /dev/cu.usbserial-1410 -b115200 -Uflash:w:/var/folders/6l/ypg6qbw172v1s4vtt6g990tw0000gn/T/arduino_build_943317/Blink.ino.hex:i -Ufuse0:w:0x00:m -Ufuse1:w:0x54:m -Ufuse2:w:0x01:m -Ufuse4:w:0x00:m -Ufuse5:w:0xC9:m -Ufuse6:w:0x06:m -Ufuse7:w:0x00:m -Ufuse8:w:0x00:m -Ulock:w:0xC5:m

avrdude: Version 6.3-20211205
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "/Users/hans/Documents/Arduino/hardware/MegaCoreX/megaavr/avrdude.conf"
         User configuration file is "/Users/hans/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/cu.usbserial-1410
         Using Programmer              : serialupdi
         Overriding Baud Rate          : 115200
avrdude: Opening serial port...
         AVR Part                      : ATmega4809
         Chip Erase delay              : 0 us
         PAGEL                         : P00
         BS2                           : P00
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 0
         StabDelay                     : 0
         CmdexeDelay                   : 0
         SyncLoops                     : 0
         ByteDelay                     : 0
         PollIndex                     : 0
         PollValue                     : 0x00
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           signature      0     0     0    0 no          3    1      0     0     0 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           prodsig        0     0     0    0 no         61   61      0     0     0 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           fuses          0     0     0    0 no          9    1      0     0     0 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           fuse0          0     0     0    0 no          1    1      0     0     0 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           fuse1          0     0     0    0 no          1    1      0     0     0 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           fuse2          0     0     0    0 no          1    1      0     0     0 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           fuse4          0     0     0    0 no          1    1      0     0     0 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           fuse5          0     0     0    0 no          1    1      0     0     0 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           fuse6          0     0     0    0 no          1    1      0     0     0 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           fuse7          0     0     0    0 no          1    1      0     0     0 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           fuse8          0     0     0    0 no          1    1      0     0     0 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           lock           0     0     0    0 no          1    1      0     0     0 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           data           0     0     0    0 no          0    1      0     0     0 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           usersig        0     0     0    0 no         64   64      0     0     0 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           flash          0     0     0    0 no      49152  128      0     0     0 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom         0     0     0    0 no        256   64      0     0     0 0x00 0x00

         Programmer Type : serialupdi
         Description     : SerialUPDI

avrdude: STCS 0x08 to address 0x03
avrdude: Sending 3 bytes [0x55, 0xc3, 0x08]
avrdude: STCS 0x80 to address 0x02
avrdude: Sending 3 bytes [0x55, 0xc2, 0x80]
avrdude: LDCS from 0x00
avrdude: Sending 2 bytes [0x55, 0x80]
avrdude: ser_recv(): programmer is not responding
avrdude: serialupdi_recv(): programmer is not responding
avrdude: Check failed
avrdude: Datalink not active, resetting...
avrdude: Sending double break
avrdude: Opening serial port...
avrdude: Opening serial port...
avrdude: STCS 0x08 to address 0x03
avrdude: Sending 3 bytes [0x55, 0xc3, 0x08]
avrdude: STCS 0x80 to address 0x02
avrdude: Sending 3 bytes [0x55, 0xc2, 0x80]
avrdude: LDCS from 0x00
avrdude: Sending 2 bytes [0x55, 0x80]
avrdude: Received 1 bytes [0x30]
avrdude: UDPI init OK
avrdude: UPDI link initialization OK
avrdude: Sending 2 bytes [0x55, 0xe6]
avrdude: Received 32 bytes [0x6d, 0x65, 0x67, 0x61, 0x41, 0x56, 0x52, 0x20, 0x50, 0x3a, 0x30, 0x44, 0x3a, 0x31, 0x2d, 0x33, 0x4d, 0x32, 0x20, 0x28, 0x30, 0x31, 0x2e, 0x35, 0x39, 0x42, 0x32, 0x30, 0x2e, 0x30, 0x29, 0x00]
avrdude: Received SIB: [megaAVR P:0D:1-3M2 (01.59B20.0)]
avrdude: Device family ID: megaAVR
avrdude: NVM interface: P:0
avrdude: Debug interface: D:1
avrdude: PDI oscillator: 3M2
avrdude: Extra information: (01.59B20.0)
avrdude: NVM type 0: 16-bit, page oriented write
avrdude: LDCS from 0x0B
avrdude: Sending 2 bytes [0x55, 0x8b]
avrdude: Received 1 bytes [0x82]
avrdude: Entering NVM programming mode
avrdude: UPDI writing key
avrdude: Sending 2 bytes [0x55, 0xe0]
avrdude: Sending 8 bytes [0x20, 0x67, 0x6f, 0x72, 0x50, 0x4d, 0x56, 0x4e]
avrdude: LDCS from 0x07
avrdude: Sending 2 bytes [0x55, 0x87]
avrdude: Received 1 bytes [0x10]
avrdude: Key status: 0x10
avrdude: Sending reset request
avrdude: STCS 0x59 to address 0x08
avrdude: Sending 3 bytes [0x55, 0xc8, 0x59]
avrdude: Sending release reset request
avrdude: STCS 0x00 to address 0x08
avrdude: Sending 3 bytes [0x55, 0xc8, 0x00]
avrdude: LDCS from 0x0B
avrdude: Sending 2 bytes [0x55, 0x8b]
avrdude: Received 1 bytes [0x21]
avrdude: LDCS from 0x0B
avrdude: Sending 2 bytes [0x55, 0x8b]
avrdude: Received 1 bytes [0x01]
avrdude: LDCS from 0x0B
avrdude: Sending 2 bytes [0x55, 0x8b]
avrdude: Received 1 bytes [0x01]
avrdude: LDCS from 0x0B
avrdude: Sending 2 bytes [0x55, 0x8b]
avrdude: Received 1 bytes [0x01]
avrdude: LDCS from 0x0B
avrdude: Sending 2 bytes [0x55, 0x8b]
avrdude: Received 1 bytes [0x01]
avrdude: LDCS from 0x0B
avrdude: Sending 2 bytes [0x55, 0x8b]
avrdude: Received 1 bytes [0x01]
avrdude: LDCS from 0x0B
avrdude: Sending 2 bytes [0x55, 0x8b]
avrdude: Received 1 bytes [0x01]
avrdude: LDCS from 0x0B
avrdude: Sending 2 bytes [0x55, 0x8b]
avrdude: Received 1 bytes [0x01]
avrdude: LDCS from 0x0B
avrdude: Sending 2 bytes [0x55, 0x8b]
avrdude: Received 1 bytes [0x08]
avrdude: LDCS from 0x0B
avrdude: Sending 2 bytes [0x55, 0x8b]
avrdude: Received 1 bytes [0x08]
avrdude: Entered NVM programming mode
avrdude: AVR device initialized and ready to accept instructions

Reading |                                                    | 0% 0.00savrdude: LD from 0x001100
avrdude: Sending 4 bytes [0x55, 0x04, 0x00, 0x11]
avrdude: Received 1 bytes [0x1e]
avrdude: LD from 0x001101
avrdude: Sending 4 bytes [0x55, 0x04, 0x01, 0x11]
avrdude: Received 1 bytes [0x96]
Reading | #################                                  | 33% 0.01savrdude: LD from 0x001102
avrdude: Sending 4 bytes [0x55, 0x04, 0x02, 0x11]
avrdude: Received 1 bytes [0x51]
Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0x1e9651 (probably m4809)
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: LDCS from 0x0B
avrdude: Sending 2 bytes [0x55, 0x8b]
avrdude: Received 1 bytes [0x08]
avrdude: Already in prog mode
avrdude: Chip erase using NVM CTRL
avrdude: LD from 0x001002
avrdude: Sending 4 bytes [0x55, 0x04, 0x02, 0x10]
avrdude: Received 1 bytes [0x00]
avrdude: NVMCMD 5 executing
avrdude: ST to 0x001000
avrdude: Sending 4 bytes [0x55, 0x44, 0x00, 0x10]
avrdude: Received 1 bytes [0x40]
avrdude: Sending 1 bytes [0x05]
avrdude: Received 1 bytes [0x40]
avrdude: LD from 0x001002
avrdude: Sending 4 bytes [0x55, 0x04, 0x02, 0x10]
avrdude: Received 1 bytes [0x03]
avrdude: LD from 0x001002
avrdude: Sending 4 bytes [0x55, 0x04, 0x02, 0x10]
avrdude: Received 1 bytes [0x00]
avrdude: reading input file "/var/folders/6l/ypg6qbw172v1s4vtt6g990tw0000gn/T/arduino_build_943317/Blink.ino.hex"
avrdude: writing flash (788 bytes):

Writing |                                                    | 0% 0.00savrdude: LDCS from 0x0B
avrdude: Sending 2 bytes [0x55, 0x8b]
avrdude: Received 1 bytes [0x08]
avrdude: Already in prog mode
avrdude: LD from 0x001002
avrdude: Sending 4 bytes [0x55, 0x04, 0x02, 0x10]
avrdude: Received 1 bytes [0x00]
avrdude: Clear page buffer
avrdude: NVMCMD 4 executing
avrdude: ST to 0x001000
avrdude: Sending 4 bytes [0x55, 0x44, 0x00, 0x10]
avrdude: Received 1 bytes [0x40]
avrdude: Sending 1 bytes [0x04]
avrdude: Received 1 bytes [0x40]
avrdude: LD from 0x001002
avrdude: Sending 4 bytes [0x55, 0x04, 0x02, 0x10]
avrdude: Received 1 bytes [0x00]
avrdude: ST_PTR to 0x004000
avrdude: Sending 4 bytes [0x55, 0x69, 0x00, 0x40]
avrdude: Received 1 bytes [0x40]
avrdude: ST16 to *ptr++ with RSD, data length: 0x080 in blocks of: -1
avrdude: Sending 139 bytes [0x55, 0xc2, 0x0e, 0x55, 0xa0, 0x3f, 0x55, 0x65, 0x0c, 0x94, 0x50, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0xd9, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x55, 0xc2, 0x06]
avrdude: Committing data
avrdude: NVMCMD 1 executing
avrdude: ST to 0x001000
avrdude: Sending 4 bytes [0x55, 0x44, 0x00, 0x10]
avrdude: Received 1 bytes [0x40]
avrdude: Sending 1 bytes [0x01]
avrdude: Received 1 bytes [0x40]
avrdude: LD from 0x001002
avrdude: Sending 4 bytes [0x55, 0x04, 0x02, 0x10]
avrdude: Received 1 bytes [0x00]
Writing | #######                                            | 14% 0.05savrdude: LDCS from 0x0B
avrdude: Sending 2 bytes [0x55, 0x8b]
avrdude: Received 1 bytes [0x08]
avrdude: Already in prog mode
avrdude: LD from 0x001002
avrdude: Sending 4 bytes [0x55, 0x04, 0x02, 0x10]
avrdude: Received 1 bytes [0x00]
avrdude: Clear page buffer
avrdude: NVMCMD 4 executing
avrdude: ST to 0x001000
avrdude: Sending 4 bytes [0x55, 0x44, 0x00, 0x10]
avrdude: Received 1 bytes [0x40]
avrdude: Sending 1 bytes [0x04]
avrdude: Received 1 bytes [0x40]
avrdude: LD from 0x001002
avrdude: Sending 4 bytes [0x55, 0x04, 0x02, 0x10]
avrdude: Received 1 bytes [0x00]
avrdude: ST_PTR to 0x004080
avrdude: Sending 4 bytes [0x55, 0x69, 0x80, 0x40]
avrdude: Received 1 bytes [0x40]
avrdude: ST16 to *ptr++ with RSD, data length: 0x080 in blocks of: -1
avrdude: Sending 139 bytes [0x55, 0xc2, 0x0e, 0x55, 0xa0, 0x3f, 0x55, 0x65, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x11, 0x24, 0x1f, 0xbe, 0xcf, 0xef, 0xcd, 0xbf, 0xdf, 0xe3, 0xde, 0xbf, 0x28, 0xe2, 0xa0, 0xe0, 0xb8, 0xe2, 0x01, 0xc0, 0x1d, 0x92, 0xa4, 0x30, 0xb2, 0x07, 0xe1, 0xf7, 0x0e, 0x94, 0x01, 0x01, 0x0c, 0x94, 0x88, 0x01, 0x0c, 0x94, 0x00, 0x00, 0x90, 0x91, 0x91, 0x0a, 0x9f, 0x7e, 0x90, 0x93, 0x91, 0x0a, 0x90, 0x91, 0xa0, 0x04, 0x95, 0xff, 0x0a, 0xc0, 0x81, 0x11, 0x04, 0xc0, 0x80, 0xe2, 0x80, 0x93, 0xa6, 0x04, 0x08, 0x95, 0x80, 0xe2, 0x80, 0x93, 0xa5, 0x04, 0x08, 0x95, 0x9f, 0xb7, 0xf8, 0x94, 0x81, 0x11, 0x07, 0xc0, 0x80, 0x91, 0xb5, 0x04, 0x87, 0x7f, 0x80, 0x93, 0xb5, 0x04, 0x55, 0xc2, 0x06]
avrdude: Committing data
avrdude: NVMCMD 1 executing
avrdude: ST to 0x001000
avrdude: Sending 4 bytes [0x55, 0x44, 0x00, 0x10]
avrdude: Received 1 bytes [0x40]
avrdude: Sending 1 bytes [0x01]
avrdude: Received 1 bytes [0x40]
avrdude: LD from 0x001002
avrdude: Sending 4 bytes [0x55, 0x04, 0x02, 0x10]
avrdude: Received 1 bytes [0x00]
Writing | ##############                                     | 28% 0.09savrdude: LDCS from 0x0B
avrdude: Sending 2 bytes [0x55, 0x8b]
avrdude: Received 1 bytes [0x08]
avrdude: Already in prog mode
avrdude: LD from 0x001002
avrdude: Sending 4 bytes [0x55, 0x04, 0x02, 0x10]
avrdude: Received 1 bytes [0x00]
avrdude: Clear page buffer
avrdude: NVMCMD 4 executing
avrdude: ST to 0x001000
avrdude: Sending 4 bytes [0x55, 0x44, 0x00, 0x10]
avrdude: Received 1 bytes [0x40]
avrdude: Sending 1 bytes [0x04]
avrdude: Received 1 bytes [0x40]
avrdude: LD from 0x001002
avrdude: Sending 4 bytes [0x55, 0x04, 0x02, 0x10]
avrdude: Received 1 bytes [0x00]
avrdude: ST_PTR to 0x004100
avrdude: Sending 4 bytes [0x55, 0x69, 0x00, 0x41]
avrdude: Received 1 bytes [0x40]
avrdude: ST16 to *ptr++ with RSD, data length: 0x080 in blocks of: -1
avrdude: Sending 139 bytes [0x55, 0xc2, 0x0e, 0x55, 0xa0, 0x3f, 0x55, 0x65, 0x9f, 0xbf, 0x08, 0x95, 0x80, 0x91, 0xb5, 0x04, 0x88, 0x60, 0xf8, 0xcf, 0x8f, 0xb7, 0xf8, 0x94, 0x20, 0x91, 0x00, 0x28, 0x30, 0x91, 0x01, 0x28, 0x40, 0x91, 0x02, 0x28, 0x50, 0x91, 0x03, 0x28, 0xe0, 0x91, 0xaa, 0x0a, 0xf0, 0x91, 0xab, 0x0a, 0x90, 0x91, 0xa6, 0x0a, 0x90, 0xff, 0x08, 0xc0, 0x2f, 0x5f, 0x3f, 0x4f, 0x4f, 0x4f, 0x5f, 0x4f, 0xe0, 0x91, 0xaa, 0x0a, 0xf0, 0x91, 0xab, 0x0a, 0x8f, 0xbf, 0xa8, 0xee, 0xb3, 0xe0, 0x0e, 0x94, 0x6e, 0x01, 0x24, 0xe0, 0xf6, 0x95, 0xe7, 0x95, 0x2a, 0x95, 0xe1, 0xf7, 0x6e, 0x0f, 0x7f, 0x1f, 0x81, 0x1d, 0x91, 0x1d, 0x08, 0x95, 0xcf, 0x92, 0xdf, 0x92, 0xef, 0x92, 0xff, 0x92, 0x0e, 0x94, 0x86, 0x00, 0x6b, 0x01, 0x7c, 0x01, 0x20, 0xe4, 0xc2, 0x0e, 0x22, 0xe4, 0xd2, 0x1e, 0x2f, 0xe0, 0xe2, 0x1e, 0xf1, 0x1c, 0x80, 0xe4, 0xc8, 0x16, 0x55, 0xc2, 0x06]
avrdude: Committing data
avrdude: NVMCMD 1 executing
avrdude: ST to 0x001000
avrdude: Sending 4 bytes [0x55, 0x44, 0x00, 0x10]
avrdude: Received 1 bytes [0x40]
avrdude: Sending 1 bytes [0x01]
avrdude: Received 1 bytes [0x40]
avrdude: LD from 0x001002
avrdude: Sending 4 bytes [0x55, 0x04, 0x02, 0x10]
avrdude: Received 1 bytes [0x00]
Writing | #####################                              | 42% 0.13savrdude: LDCS from 0x0B
avrdude: Sending 2 bytes [0x55, 0x8b]
avrdude: Received 1 bytes [0x08]
avrdude: Already in prog mode
avrdude: LD from 0x001002
avrdude: Sending 4 bytes [0x55, 0x04, 0x02, 0x10]
avrdude: Received 1 bytes [0x00]
avrdude: Clear page buffer
avrdude: NVMCMD 4 executing
avrdude: ST to 0x001000
avrdude: Sending 4 bytes [0x55, 0x44, 0x00, 0x10]
avrdude: Received 1 bytes [0x40]
avrdude: Sending 1 bytes [0x04]
avrdude: Received 1 bytes [0x40]
avrdude: LD from 0x001002
avrdude: Sending 4 bytes [0x55, 0x04, 0x02, 0x10]
avrdude: Received 1 bytes [0x00]
avrdude: ST_PTR to 0x004180
avrdude: Sending 4 bytes [0x55, 0x69, 0x80, 0x41]
avrdude: Received 1 bytes [0x40]
avrdude: ST16 to *ptr++ with RSD, data length: 0x080 in blocks of: -1
avrdude: Sending 139 bytes [0x55, 0xc2, 0x0e, 0x55, 0xa0, 0x3f, 0x55, 0x65, 0x82, 0xe4, 0xd8, 0x06, 0x8f, 0xe0, 0xe8, 0x06, 0xf1, 0x04, 0x38, 0xf4, 0x0e, 0x94, 0x86, 0x00, 0xc6, 0x16, 0xd7, 0x06, 0xe8, 0x06, 0xf9, 0x06, 0xc8, 0xf3, 0x0e, 0x94, 0x86, 0x00, 0x6c, 0x15, 0x7d, 0x05, 0x8e, 0x05, 0x9f, 0x05, 0xc8, 0xf3, 0xff, 0x90, 0xef, 0x90, 0xdf, 0x90, 0xcf, 0x90, 0x08, 0x95, 0x1f, 0x92, 0x0f, 0x92, 0x0f, 0xb6, 0x0f, 0x92, 0x11, 0x24, 0x8f, 0x93, 0x9f, 0x93, 0xaf, 0x93, 0xbf, 0x93, 0x80, 0x91, 0x00, 0x28, 0x90, 0x91, 0x01, 0x28, 0xa0, 0x91, 0x02, 0x28, 0xb0, 0x91, 0x03, 0x28, 0x01, 0x96, 0xa1, 0x1d, 0xb1, 0x1d, 0x80, 0x93, 0x00, 0x28, 0x90, 0x93, 0x01, 0x28, 0xa0, 0x93, 0x02, 0x28, 0xb0, 0x93, 0x03, 0x28, 0x81, 0xe0, 0x80, 0x93, 0xa6, 0x0a, 0xbf, 0x91, 0xaf, 0x91, 0x9f, 0x91, 0x8f, 0x91, 0x0f, 0x90, 0x0f, 0xbe, 0x0f, 0x90, 0x1f, 0x90, 0x55, 0xc2, 0x06]
avrdude: Committing data
avrdude: NVMCMD 1 executing
avrdude: ST to 0x001000
avrdude: Sending 4 bytes [0x55, 0x44, 0x00, 0x10]
avrdude: Received 1 bytes [0x40]
avrdude: Sending 1 bytes [0x01]
avrdude: Received 1 bytes [0x40]
avrdude: LD from 0x001002
avrdude: Sending 4 bytes [0x55, 0x04, 0x02, 0x10]
avrdude: Received 1 bytes [0x00]
Writing | #############################                      | 57% 0.17savrdude: LDCS from 0x0B
avrdude: Sending 2 bytes [0x55, 0x8b]
avrdude: Received 1 bytes [0x08]
avrdude: Already in prog mode
avrdude: LD from 0x001002
avrdude: Sending 4 bytes [0x55, 0x04, 0x02, 0x10]
avrdude: Received 1 bytes [0x00]
avrdude: Clear page buffer
avrdude: NVMCMD 4 executing
avrdude: ST to 0x001000
avrdude: Sending 4 bytes [0x55, 0x44, 0x00, 0x10]
avrdude: Received 1 bytes [0x40]
avrdude: Sending 1 bytes [0x04]
avrdude: Received 1 bytes [0x40]
avrdude: LD from 0x001002
avrdude: Sending 4 bytes [0x55, 0x04, 0x02, 0x10]
avrdude: Received 1 bytes [0x00]
avrdude: ST_PTR to 0x004200
avrdude: Sending 4 bytes [0x55, 0x69, 0x00, 0x42]
avrdude: Received 1 bytes [0x40]
avrdude: ST16 to *ptr++ with RSD, data length: 0x080 in blocks of: -1
avrdude: Sending 139 bytes [0x55, 0xc2, 0x0e, 0x55, 0xa0, 0x3f, 0x55, 0x65, 0x18, 0x95, 0x88, 0xed, 0x90, 0xe0, 0x84, 0xbf, 0x90, 0x93, 0x61, 0x00, 0x80, 0x91, 0x02, 0x06, 0x86, 0x60, 0x80, 0x93, 0x02, 0x06, 0x80, 0x91, 0x00, 0x06, 0x81, 0x60, 0x80, 0x93, 0x00, 0x06, 0x80, 0x91, 0x02, 0x06, 0x8f, 0x7c, 0x80, 0x65, 0x80, 0x93, 0x02, 0x06, 0x10, 0x92, 0xe2, 0x05, 0x82, 0xe0, 0x80, 0x93, 0xe4, 0x05, 0x81, 0xe0, 0x80, 0x93, 0x03, 0x0a, 0x8e, 0xef, 0x80, 0x93, 0x27, 0x0a, 0x80, 0x93, 0x26, 0x0a, 0x80, 0xe8, 0x80, 0x93, 0x2d, 0x0a, 0x80, 0x93, 0x2b, 0x0a, 0x80, 0x93, 0x29, 0x0a, 0x80, 0x93, 0x2c, 0x0a, 0x80, 0x93, 0x2a, 0x0a, 0x80, 0x93, 0x28, 0x0a, 0x8b, 0xe0, 0x80, 0x93, 0x00, 0x0a, 0x87, 0xe0, 0x80, 0x93, 0xe5, 0x05, 0xe0, 0xe8, 0xfa, 0xe0, 0x37, 0xe0, 0x2e, 0xef, 0x90, 0xe8, 0x85, 0xe0, 0x31, 0x83, 0x24, 0x87, 0x95, 0x87, 0x80, 0x83, 0x55, 0xc2, 0x06]
avrdude: Committing data
avrdude: NVMCMD 1 executing
avrdude: ST to 0x001000
avrdude: Sending 4 bytes [0x55, 0x44, 0x00, 0x10]
avrdude: Received 1 bytes [0x40]
avrdude: Sending 1 bytes [0x01]
avrdude: Received 1 bytes [0x40]
avrdude: LD from 0x001002
avrdude: Sending 4 bytes [0x55, 0x04, 0x02, 0x10]
avrdude: Received 1 bytes [0x00]
Writing | ####################################               | 71% 0.21savrdude: LDCS from 0x0B
avrdude: Sending 2 bytes [0x55, 0x8b]
avrdude: Received 1 bytes [0x08]
avrdude: Already in prog mode
avrdude: LD from 0x001002
avrdude: Sending 4 bytes [0x55, 0x04, 0x02, 0x10]
avrdude: Received 1 bytes [0x00]
avrdude: Clear page buffer
avrdude: NVMCMD 4 executing
avrdude: ST to 0x001000
avrdude: Sending 4 bytes [0x55, 0x44, 0x00, 0x10]
avrdude: Received 1 bytes [0x40]
avrdude: Sending 1 bytes [0x04]
avrdude: Received 1 bytes [0x40]
avrdude: LD from 0x001002
avrdude: Sending 4 bytes [0x55, 0x04, 0x02, 0x10]
avrdude: Received 1 bytes [0x00]
avrdude: ST_PTR to 0x004280
avrdude: Sending 4 bytes [0x55, 0x69, 0x80, 0x42]
avrdude: Received 1 bytes [0x40]
avrdude: ST16 to *ptr++ with RSD, data length: 0x080 in blocks of: -1
avrdude: Sending 139 bytes [0x55, 0xc2, 0x0e, 0x55, 0xa0, 0x3f, 0x55, 0x65, 0x70, 0x96, 0xe0, 0x3c, 0x4a, 0xe0, 0xf4, 0x07, 0xb9, 0xf7, 0x10, 0x92, 0xa1, 0x0a, 0x8f, 0xe7, 0x9e, 0xe3, 0x80, 0x93, 0xac, 0x0a, 0x90, 0x93, 0xad, 0x0a, 0x80, 0x91, 0xa5, 0x0a, 0x81, 0x60, 0x80, 0x93, 0xa5, 0x0a, 0x10, 0x92, 0xa0, 0x0a, 0x80, 0x91, 0xa0, 0x0a, 0x81, 0x60, 0x80, 0x93, 0xa0, 0x0a, 0x78, 0x94, 0x80, 0xe2, 0x80, 0x93, 0xa1, 0x04, 0xc0, 0xe0, 0xd0, 0xe0, 0x81, 0xe0, 0x0e, 0x94, 0x64, 0x00, 0x0e, 0x94, 0xaf, 0x00, 0x80, 0xe0, 0x0e, 0x94, 0x64, 0x00, 0x0e, 0x94, 0xaf, 0x00, 0x20, 0x97, 0xa1, 0xf3, 0x0e, 0x94, 0x00, 0x00, 0xf1, 0xcf, 0x0e, 0x94, 0x79, 0x01, 0xa5, 0x9f, 0x90, 0x0d, 0xb4, 0x9f, 0x90, 0x0d, 0xa4, 0x9f, 0x80, 0x0d, 0x91, 0x1d, 0x11, 0x24, 0x08, 0x95, 0xa2, 0x9f, 0xb0, 0x01, 0xb3, 0x9f, 0xc0, 0x01, 0xa3, 0x9f, 0x70, 0x0d, 0x81, 0x1d, 0x55, 0xc2, 0x06]
avrdude: Committing data
avrdude: NVMCMD 1 executing
avrdude: ST to 0x001000
avrdude: Sending 4 bytes [0x55, 0x44, 0x00, 0x10]
avrdude: Received 1 bytes [0x40]
avrdude: Sending 1 bytes [0x01]
avrdude: Received 1 bytes [0x40]
avrdude: LD from 0x001002
avrdude: Sending 4 bytes [0x55, 0x04, 0x02, 0x10]
avrdude: Received 1 bytes [0x00]
Writing | ###########################################        | 85% 0.25savrdude: LDCS from 0x0B
avrdude: Sending 2 bytes [0x55, 0x8b]
avrdude: Received 1 bytes [0x08]
avrdude: Already in prog mode
avrdude: LD from 0x001002
avrdude: Sending 4 bytes [0x55, 0x04, 0x02, 0x10]
avrdude: Received 1 bytes [0x00]
avrdude: Clear page buffer
avrdude: NVMCMD 4 executing
avrdude: ST to 0x001000
avrdude: Sending 4 bytes [0x55, 0x44, 0x00, 0x10]
avrdude: Received 1 bytes [0x40]
avrdude: Sending 1 bytes [0x04]
avrdude: Received 1 bytes [0x40]
avrdude: LD from 0x001002
avrdude: Sending 4 bytes [0x55, 0x04, 0x02, 0x10]
avrdude: Received 1 bytes [0x00]
avrdude: ST_PTR to 0x004300
avrdude: Sending 4 bytes [0x55, 0x69, 0x00, 0x43]
avrdude: Received 1 bytes [0x40]
avrdude: ST16 to *ptr++ with RSD, data length: 0x080 in blocks of: -1
avrdude: Sending 139 bytes [0x55, 0xc2, 0x0e, 0x55, 0xa0, 0x3f, 0x55, 0x65, 0x11, 0x24, 0x91, 0x1d, 0xb2, 0x9f, 0x70, 0x0d, 0x81, 0x1d, 0x11, 0x24, 0x91, 0x1d, 0x08, 0x95, 0xf8, 0x94, 0xff, 0xcf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x55, 0xc2, 0x06]
avrdude: Committing data
avrdude: NVMCMD 1 executing
avrdude: ST to 0x001000
avrdude: Sending 4 bytes [0x55, 0x44, 0x00, 0x10]
avrdude: Received 1 bytes [0x40]
avrdude: Sending 1 bytes [0x01]
avrdude: Received 1 bytes [0x40]
avrdude: LD from 0x001002
avrdude: Sending 4 bytes [0x55, 0x04, 0x02, 0x10]
avrdude: Received 1 bytes [0x00]
Writing | ################################################## | 100% 0.29s

avrdude: 788 bytes of flash written
avrdude: verifying flash memory against /var/folders/6l/ypg6qbw172v1s4vtt6g990tw0000gn/T/arduino_build_943317/Blink.ino.hex:
avrdude: load data flash data from input file /var/folders/6l/ypg6qbw172v1s4vtt6g990tw0000gn/T/arduino_build_943317/Blink.ino.hex:
avrdude: input file /var/folders/6l/ypg6qbw172v1s4vtt6g990tw0000gn/T/arduino_build_943317/Blink.ino.hex contains 788 bytes
avrdude: reading on-chip flash data:

Reading |                                                    | 0% 0.00savrdude: Reading 128 bytes from 0x004000
avrdude: ST_PTR to 0x004000
avrdude: Sending 4 bytes [0x55, 0x69, 0x00, 0x40]
avrdude: Received 1 bytes [0x40]
avrdude: Repeat 128
avrdude: Sending 3 bytes [0x55, 0xa0, 0x7f]
avrdude: LD8 from ptr++
avrdude: Sending 2 bytes [0x55, 0x24]
avrdude: Received 128 bytes [0x0c, 0x94, 0x50, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0xd9, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00]
Reading | #######                                            | 14% 0.02savrdude: Reading 128 bytes from 0x004080
avrdude: ST_PTR to 0x004080
avrdude: Sending 4 bytes [0x55, 0x69, 0x80, 0x40]
avrdude: Received 1 bytes [0x40]
avrdude: Repeat 128
avrdude: Sending 3 bytes [0x55, 0xa0, 0x7f]
avrdude: LD8 from ptr++
avrdude: Sending 2 bytes [0x55, 0x24]
avrdude: Received 128 bytes [0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x0c, 0x94, 0x62, 0x00, 0x11, 0x24, 0x1f, 0xbe, 0xcf, 0xef, 0xcd, 0xbf, 0xdf, 0xe3, 0xde, 0xbf, 0x28, 0xe2, 0xa0, 0xe0, 0xb8, 0xe2, 0x01, 0xc0, 0x1d, 0x92, 0xa4, 0x30, 0xb2, 0x07, 0xe1, 0xf7, 0x0e, 0x94, 0x01, 0x01, 0x0c, 0x94, 0x88, 0x01, 0x0c, 0x94, 0x00, 0x00, 0x90, 0x91, 0x91, 0x0a, 0x9f, 0x7e, 0x90, 0x93, 0x91, 0x0a, 0x90, 0x91, 0xa0, 0x04, 0x95, 0xff, 0x0a, 0xc0, 0x81, 0x11, 0x04, 0xc0, 0x80, 0xe2, 0x80, 0x93, 0xa6, 0x04, 0x08, 0x95, 0x80, 0xe2, 0x80, 0x93, 0xa5, 0x04, 0x08, 0x95, 0x9f, 0xb7, 0xf8, 0x94, 0x81, 0x11, 0x07, 0xc0, 0x80, 0x91, 0xb5, 0x04, 0x87, 0x7f, 0x80, 0x93, 0xb5, 0x04]
Reading | ##############                                     | 28% 0.04savrdude: Reading 128 bytes from 0x004100
avrdude: ST_PTR to 0x004100
avrdude: Sending 4 bytes [0x55, 0x69, 0x00, 0x41]
avrdude: Received 1 bytes [0x40]
avrdude: Repeat 128
avrdude: Sending 3 bytes [0x55, 0xa0, 0x7f]
avrdude: LD8 from ptr++
avrdude: Sending 2 bytes [0x55, 0x24]
avrdude: Received 128 bytes [0x9f, 0xbf, 0x08, 0x95, 0x80, 0x91, 0xb5, 0x04, 0x88, 0x60, 0xf8, 0xcf, 0x8f, 0xb7, 0xf8, 0x94, 0x20, 0x91, 0x00, 0x28, 0x30, 0x91, 0x01, 0x28, 0x40, 0x91, 0x02, 0x28, 0x50, 0x91, 0x03, 0x28, 0xe0, 0x91, 0xaa, 0x0a, 0xf0, 0x91, 0xab, 0x0a, 0x90, 0x91, 0xa6, 0x0a, 0x90, 0xff, 0x08, 0xc0, 0x2f, 0x5f, 0x3f, 0x4f, 0x4f, 0x4f, 0x5f, 0x4f, 0xe0, 0x91, 0xaa, 0x0a, 0xf0, 0x91, 0xab, 0x0a, 0x8f, 0xbf, 0xa8, 0xee, 0xb3, 0xe0, 0x0e, 0x94, 0x6e, 0x01, 0x24, 0xe0, 0xf6, 0x95, 0xe7, 0x95, 0x2a, 0x95, 0xe1, 0xf7, 0x6e, 0x0f, 0x7f, 0x1f, 0x81, 0x1d, 0x91, 0x1d, 0x08, 0x95, 0xcf, 0x92, 0xdf, 0x92, 0xef, 0x92, 0xff, 0x92, 0x0e, 0x94, 0x86, 0x00, 0x6b, 0x01, 0x7c, 0x01, 0x20, 0xe4, 0xc2, 0x0e, 0x22, 0xe4, 0xd2, 0x1e, 0x2f, 0xe0, 0xe2, 0x1e, 0xf1, 0x1c, 0x80, 0xe4, 0xc8, 0x16]
Reading | #####################                              | 42% 0.06savrdude: Reading 128 bytes from 0x004180
avrdude: ST_PTR to 0x004180
avrdude: Sending 4 bytes [0x55, 0x69, 0x80, 0x41]
avrdude: Received 1 bytes [0x40]
avrdude: Repeat 128
avrdude: Sending 3 bytes [0x55, 0xa0, 0x7f]
avrdude: LD8 from ptr++
avrdude: Sending 2 bytes [0x55, 0x24]
avrdude: Received 128 bytes [0x82, 0xe4, 0xd8, 0x06, 0x8f, 0xe0, 0xe8, 0x06, 0xf1, 0x04, 0x38, 0xf4, 0x0e, 0x94, 0x86, 0x00, 0xc6, 0x16, 0xd7, 0x06, 0xe8, 0x06, 0xf9, 0x06, 0xc8, 0xf3, 0x0e, 0x94, 0x86, 0x00, 0x6c, 0x15, 0x7d, 0x05, 0x8e, 0x05, 0x9f, 0x05, 0xc8, 0xf3, 0xff, 0x90, 0xef, 0x90, 0xdf, 0x90, 0xcf, 0x90, 0x08, 0x95, 0x1f, 0x92, 0x0f, 0x92, 0x0f, 0xb6, 0x0f, 0x92, 0x11, 0x24, 0x8f, 0x93, 0x9f, 0x93, 0xaf, 0x93, 0xbf, 0x93, 0x80, 0x91, 0x00, 0x28, 0x90, 0x91, 0x01, 0x28, 0xa0, 0x91, 0x02, 0x28, 0xb0, 0x91, 0x03, 0x28, 0x01, 0x96, 0xa1, 0x1d, 0xb1, 0x1d, 0x80, 0x93, 0x00, 0x28, 0x90, 0x93, 0x01, 0x28, 0xa0, 0x93, 0x02, 0x28, 0xb0, 0x93, 0x03, 0x28, 0x81, 0xe0, 0x80, 0x93, 0xa6, 0x0a, 0xbf, 0x91, 0xaf, 0x91, 0x9f, 0x91, 0x8f, 0x91, 0x0f, 0x90, 0x0f, 0xbe, 0x0f, 0x90, 0x1f, 0x90]
Reading | #############################                      | 57% 0.08savrdude: Reading 128 bytes from 0x004200
avrdude: ST_PTR to 0x004200
avrdude: Sending 4 bytes [0x55, 0x69, 0x00, 0x42]
avrdude: Received 1 bytes [0x40]
avrdude: Repeat 128
avrdude: Sending 3 bytes [0x55, 0xa0, 0x7f]
avrdude: LD8 from ptr++
avrdude: Sending 2 bytes [0x55, 0x24]
avrdude: Received 128 bytes [0x18, 0x95, 0x88, 0xed, 0x90, 0xe0, 0x84, 0xbf, 0x90, 0x93, 0x61, 0x00, 0x80, 0x91, 0x02, 0x06, 0x86, 0x60, 0x80, 0x93, 0x02, 0x06, 0x80, 0x91, 0x00, 0x06, 0x81, 0x60, 0x80, 0x93, 0x00, 0x06, 0x80, 0x91, 0x02, 0x06, 0x8f, 0x7c, 0x80, 0x65, 0x80, 0x93, 0x02, 0x06, 0x10, 0x92, 0xe2, 0x05, 0x82, 0xe0, 0x80, 0x93, 0xe4, 0x05, 0x81, 0xe0, 0x80, 0x93, 0x03, 0x0a, 0x8e, 0xef, 0x80, 0x93, 0x27, 0x0a, 0x80, 0x93, 0x26, 0x0a, 0x80, 0xe8, 0x80, 0x93, 0x2d, 0x0a, 0x80, 0x93, 0x2b, 0x0a, 0x80, 0x93, 0x29, 0x0a, 0x80, 0x93, 0x2c, 0x0a, 0x80, 0x93, 0x2a, 0x0a, 0x80, 0x93, 0x28, 0x0a, 0x8b, 0xe0, 0x80, 0x93, 0x00, 0x0a, 0x87, 0xe0, 0x80, 0x93, 0xe5, 0x05, 0xe0, 0xe8, 0xfa, 0xe0, 0x37, 0xe0, 0x2e, 0xef, 0x90, 0xe8, 0x85, 0xe0, 0x31, 0x83, 0x24, 0x87, 0x95, 0x87, 0x80, 0x83]
Reading | ####################################               | 71% 0.11savrdude: Reading 128 bytes from 0x004280
avrdude: ST_PTR to 0x004280
avrdude: Sending 4 bytes [0x55, 0x69, 0x80, 0x42]
avrdude: Received 1 bytes [0x40]
avrdude: Repeat 128
avrdude: Sending 3 bytes [0x55, 0xa0, 0x7f]
avrdude: LD8 from ptr++
avrdude: Sending 2 bytes [0x55, 0x24]
avrdude: Received 128 bytes [0x70, 0x96, 0xe0, 0x3c, 0x4a, 0xe0, 0xf4, 0x07, 0xb9, 0xf7, 0x10, 0x92, 0xa1, 0x0a, 0x8f, 0xe7, 0x9e, 0xe3, 0x80, 0x93, 0xac, 0x0a, 0x90, 0x93, 0xad, 0x0a, 0x80, 0x91, 0xa5, 0x0a, 0x81, 0x60, 0x80, 0x93, 0xa5, 0x0a, 0x10, 0x92, 0xa0, 0x0a, 0x80, 0x91, 0xa0, 0x0a, 0x81, 0x60, 0x80, 0x93, 0xa0, 0x0a, 0x78, 0x94, 0x80, 0xe2, 0x80, 0x93, 0xa1, 0x04, 0xc0, 0xe0, 0xd0, 0xe0, 0x81, 0xe0, 0x0e, 0x94, 0x64, 0x00, 0x0e, 0x94, 0xaf, 0x00, 0x80, 0xe0, 0x0e, 0x94, 0x64, 0x00, 0x0e, 0x94, 0xaf, 0x00, 0x20, 0x97, 0xa1, 0xf3, 0x0e, 0x94, 0x00, 0x00, 0xf1, 0xcf, 0x0e, 0x94, 0x79, 0x01, 0xa5, 0x9f, 0x90, 0x0d, 0xb4, 0x9f, 0x90, 0x0d, 0xa4, 0x9f, 0x80, 0x0d, 0x91, 0x1d, 0x11, 0x24, 0x08, 0x95, 0xa2, 0x9f, 0xb0, 0x01, 0xb3, 0x9f, 0xc0, 0x01, 0xa3, 0x9f, 0x70, 0x0d, 0x81, 0x1d]
Reading | ###########################################        | 85% 0.13savrdude: Reading 128 bytes from 0x004300
avrdude: ST_PTR to 0x004300
avrdude: Sending 4 bytes [0x55, 0x69, 0x00, 0x43]
avrdude: Received 1 bytes [0x40]
avrdude: Repeat 128
avrdude: Sending 3 bytes [0x55, 0xa0, 0x7f]
avrdude: LD8 from ptr++
avrdude: Sending 2 bytes [0x55, 0x24]
avrdude: Received 128 bytes [0x11, 0x24, 0x91, 0x1d, 0xb2, 0x9f, 0x70, 0x0d, 0x81, 0x1d, 0x11, 0x24, 0x91, 0x1d, 0x08, 0x95, 0xf8, 0x94, 0xff, 0xcf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]
Reading | ################################################## | 100% 0.15s

avrdude: avr_read(): skipping page 7: no interesting data
avrdude: avr_read(): skipping page 8: no interesting data
... (snip)
avrdude: avr_read(): skipping page 383: no interesting data
avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0000
         0x11 != 0x0c
avrdude: verification error; content mismatch

avrdude: safemode: Fuses OK (E:FF, H:FF, L:FF)
avrdude: Leaving NVM programming mode
avrdude: Sending reset request
avrdude: STCS 0x59 to address 0x08
avrdude: Sending 3 bytes [0x55, 0xc8, 0x59]
avrdude: Sending release reset request
avrdude: STCS 0x00 to address 0x08
avrdude: Sending 3 bytes [0x55, 0xc8, 0x00]
avrdude: STCS 0x0C to address 0x03
avrdude: Sending 3 bytes [0x55, 0xc3, 0x0c]

avrdude done.  Thank you.

mcudude <mcudude>
Sun 12 Dec 2021 10:05:17 PM UTC, comment #5: 

Sorry, should have been clearer. You should do the following:

svn co svn://svn.savannah.nongnu.org/avrdude/branches/serialupdi/avrdude

cd avrdude

./bootstrap

./configure

make all

./avrdude -C ./avrdude.conf -p avr128db28 -b 230400 -c serialupdi -U flash:w:flash.bin:r -U fuse0:w:0x00:m -U fuse1:w:0x00:m -U fuse5:w:0xc9:m -U fuse6:w:0x14:m -U fuse7:w:0x00:m -U fuse8:w:0x00:m -P /dev/tty.usbserial-AB0JSZFM

Dawid Buchwald <dawidbuchwald>
Project Member
Sun 12 Dec 2021 09:09:40 PM UTC, comment #4: 

Hi David!

I'd love to try it out on various targets. I have lots of different chips I can try it out on.

One issue though. I've been using git for years, but never ever touched svn. Embarrassing question, how do I clone your repo/fork? I've tried various commands, but I always end up with an empty serialupdi folder.

I'm using MacOS, and when I run git svn clone http://svn.savannah.gnu.org/viewvc/avrdude/branches/serialupdi

I get the following message and an empty serialupdi folder:

Using existing [svn-remote "svn"]
svn-remote.svn.fetch already set to track :refs/remotes/git-svn

mcudude <mcudude>
Sun 12 Dec 2021 08:07:29 PM UTC, comment #3: 

Hello, I have some good news for you - I have first alpha version of the SerialUPDI programmer. I hope you can give it a spin and let me know if it works for you. I'm using FT232RL chip with a diode between Rx and Tx, 1K resistor between Tx and Diode and 470 resistor between UPDI pin and the diode, just like the "ideal" setup described in SerialUPDI documentation.

I will be most grateful if you could test drive it and let me know if you run into any issues. Should that happen, please run AVRDUDE with -v -v -v flags to provide full debug trace for me to investigate.

To start playing, you need to fetch it from SVN branch here:

http://svn.savannah.gnu.org/viewvc/avrdude/branches/serialupdi/

Then follow the usual "build from sources" procedure. It should build without any issues, and then you can:

➜  avrdude ./avrdude -C ./avrdude.conf -p avr128db28 -b 230400 -c serialupdi -U flash:w:flash.bin:r -U fuse0:w:0x00:m -U fuse1:w:0x00:m -U fuse5:w:0xc9:m -U fuse6:w:0x14:m -U fuse7:w:0x00:m -U fuse8:w:0x00:m -P /dev/tty.usbserial-AB0JSZFM

avrdude: UPDI link initialization OK
avrdude: NVM type 2: 24-bit, word oriented write
avrdude: Entering NVM programming mode
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.04s

avrdude: Device signature = 0x1e970e (probably avr128db28)
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "flash.bin"
avrdude: writing flash (928 bytes):

Writing | ################################################## | 100% 0.34s

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

Reading | ################################################## | 100% 0.24s

avrdude: verifying ...
avrdude: 928 bytes of flash verified
avrdude: reading input file "0x00"
avrdude: writing fuse0 (1 bytes):

Writing | ################################################## | 100% 0.03s

avrdude: 1 bytes of fuse0 written
avrdude: verifying fuse0 memory against 0x00:
avrdude: load data fuse0 data from input file 0x00:
avrdude: input file 0x00 contains 1 bytes
avrdude: reading on-chip fuse0 data:

Reading | ################################################## | 100% 0.02s

avrdude: verifying ...
avrdude: 1 bytes of fuse0 verified
avrdude: reading input file "0x00"
avrdude: writing fuse1 (1 bytes):

Writing | ################################################## | 100% 0.03s

avrdude: 1 bytes of fuse1 written
avrdude: verifying fuse1 memory against 0x00:
avrdude: load data fuse1 data from input file 0x00:
avrdude: input file 0x00 contains 1 bytes
avrdude: reading on-chip fuse1 data:

Reading | ################################################## | 100% 0.02s

avrdude: verifying ...
avrdude: 1 bytes of fuse1 verified
avrdude: reading input file "0xc9"
avrdude: writing fuse5 (1 bytes):

Writing | ################################################## | 100% 0.03s

avrdude: 1 bytes of fuse5 written
avrdude: verifying fuse5 memory against 0xc9:
avrdude: load data fuse5 data from input file 0xc9:
avrdude: input file 0xc9 contains 1 bytes
avrdude: reading on-chip fuse5 data:

Reading | ################################################## | 100% 0.02s

avrdude: verifying ...
avrdude: 1 bytes of fuse5 verified
avrdude: reading input file "0x14"
avrdude: writing fuse6 (1 bytes):

Writing | ################################################## | 100% 0.03s

avrdude: 1 bytes of fuse6 written
avrdude: verifying fuse6 memory against 0x14:
avrdude: load data fuse6 data from input file 0x14:
avrdude: input file 0x14 contains 1 bytes
avrdude: reading on-chip fuse6 data:

Reading | ################################################## | 100% 0.02s

avrdude: verifying ...
avrdude: 1 bytes of fuse6 verified
avrdude: reading input file "0x00"
avrdude: writing fuse7 (1 bytes):

Writing | ################################################## | 100% 0.03s

avrdude: 1 bytes of fuse7 written
avrdude: verifying fuse7 memory against 0x00:
avrdude: load data fuse7 data from input file 0x00:
avrdude: input file 0x00 contains 1 bytes
avrdude: reading on-chip fuse7 data:

Reading | ################################################## | 100% 0.02s

avrdude: verifying ...
avrdude: 1 bytes of fuse7 verified
avrdude: reading input file "0x00"
avrdude: writing fuse8 (1 bytes):

Writing | ################################################## | 100% 0.03s

avrdude: 1 bytes of fuse8 written
avrdude: verifying fuse8 memory against 0x00:
avrdude: load data fuse8 data from input file 0x00:
avrdude: input file 0x00 contains 1 bytes
avrdude: reading on-chip fuse8 data:

Reading | ################################################## | 100% 0.02s

avrdude: verifying ...
avrdude: 1 bytes of fuse8 verified

avrdude: safemode: Fuses OK (E:FF, H:FF, L:FF)
avrdude: Leaving NVM programming mode

avrdude done.  Thank you.

Dawid Buchwald <dawidbuchwald>
Project Member
Mon 06 Dec 2021 02:08:33 PM UTC, comment #2: 

Sorry for not creating this issue with my actual account. I totally forgot that I had one! Anyways, I'm very excited about this, but also for the fact that there finally is some work done to Avrdude. It is after all an invaluable tool for SO many AVR developers!

Like I mentioned in the initial post, a DTR/RTS activity "indicator" will make it possible to create versatile programmers, and probably make "-c serialupdi" the preferred way for uploading to UPDI compatible AVRs, since the hardware is cheap and probably OSHW, the speed is high and the Avrdude implementation excellent!

mcudude <mcudude>
Mon 06 Dec 2021 12:05:43 PM UTC, comment #1: 

Dawid already volunteered to do just this. ;-)

Joerg Wunsch <joerg_wunsch>
Project Administrator
Mon 06 Dec 2021 11:57:08 AM UTC, original submission:  

I know this is a lot to ask, and I don't expect anyone to jump onto this immediately because one guy would find this incredibly useful.

Avrdude now supports most UPDI compatible programming hardware, but the "last" thing it lacks is the ability to program UPDI compatible AVRs using a serial port and a resistor like used in pyupdi and pymcuprog.

https://github.com/mraardvark/pyupdi
https://github.com/microchip-pic-avr-tools/pymcuprog

A "Serial UPDI" programmer is pretty much the simplest programmer you can make, and by controlling the DTR/RTS line while the UPDI communication is active, one could easily create a neat programmer you can use for both programming and serial debugging. I'm sure this feature would make UPDI compatible AVRs even more appealing, especially since Avrdude is a binary file that "just works" on all platforms, while a Python package isn't as simple.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by dawidbuchwald (Posted a comment)
  • -email is unavailable- added by mcudude (Posted a comment)
  • -email is unavailable- added by joerg_wunsch (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

     

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-12-06 joerg_wunsch StatusNone In Progress
        Assigned toNone dawidbuchwald

    Back to the top


    Powered by Savane 3.9