Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues buring bootloader for ATtiny817 Xplained Mini and Xplained Pro #842

Closed
mcuee opened this issue Oct 6, 2022 · 15 comments
Closed

Issues buring bootloader for ATtiny817 Xplained Mini and Xplained Pro #842

mcuee opened this issue Oct 6, 2022 · 15 comments
Labels
No Plans-or not viable There are no plans to fix/change, and I do not even know that it can be Not our bug This is a bug in a third party tool and should be raised with the maintainers of that tool, if any.

Comments

@mcuee
Copy link

mcuee commented Oct 6, 2022

Three issues:

  1. Arduino's avrdude 6.3 forks does not work with the latest FW of the on-board debugger. It will even make the FW in a bad state.

Solution-- please upgrade to avrdude 7.0

Reference:

C:\Users\xiaof\AppData\Local\Arduino15\packages\DxCore\tools\avrdude\6.3.0-arduino17or18/bin/avrdude -CC:\Users\xiaof\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.1/avrdude.conf -v -pattiny817 -cxplainedmini_updi -Pusb -e -Ufuse0:w:0x00:m -Ufuse1:w:0x00:m -Ufuse5:w:0b1100010{bootloader.eesavebit}:m -Ufuse6:w:0x04:m -Ufuse8:w:0x00:m -Ufuse7:w:0x00:m -Uflash:w:C:\Users\xiaof\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.1/bootloaders/hex/optiboot_XplainedPro817.hex:i 

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

         System wide configuration file is "C:\Users\xiaof\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.1/avrdude.conf"

         Using Port                    : usb
         Using Programmer              : xplainedmini_updi
avrdude: Found CMSIS-DAP compliant device, using EDBG protocol
avrdude: jtag3_edbg_recv(): Inconsistent fragment number; expect 1, got 0

avrdude done.  Thank you.

Error while burning bootloader.
  1. There is still another issue from the above prompt: the menu is missing for the {bootloader.eesavebit}.

  2. There is no hex file bootloaders/hex/optiboot_XplainedPro817.hex, rather the hex file is just optiboot_xplained817.hex.

@SpenceKonde
Copy link
Owner

Avrdude 7.0 will be used in some future version of the core.

It categorically will not be going into 2.6.2 or DxC 1.5.0 and isn't going into anything until we have compile and upload working via the recommended method on all parts (including the DD-series parts on DxCore, which people are asking for constantly!!, all CI tests are passing, and nobody is screaming at me.

A second rate microchip board based on substandard (small flash when larger flash is available, plus it's below the magic threshold that gets you a second whole adc, 2 more analog comparator, a full 2k of ram, etc? Not a priority.

Especially since this is not is not a regression (at least not one that we can be blamed for) I would argue that rather than change avrdude to workaround their new bug, they should fix the bug in the new firmware....

@SpenceKonde SpenceKonde added this to the Some Future Version milestone Oct 6, 2022
@mcuee
Copy link
Author

mcuee commented Oct 7, 2022

I agree with delaying this to future. I think this board is not good for the bootloader. It works with the on-board programmer using avrdude-7.0.

BTW, I do not have any issues to get the bootloader working with your DxCore for my AVR128DB48 Curiosity Nano board.

@mcuee
Copy link
Author

mcuee commented Oct 7, 2022

@SpenceKonde

BTW, just wondering if you have any concerns over ATtiny1616 issue mentioned here. I believe it is a user issue. But please help to confirm. Thanks.

@mcuee
Copy link
Author

mcuee commented Oct 9, 2022

BTW, just wondering if you have any concerns over ATtiny1616 issue mentioned here. I believe it is a user issue. But please help to confirm. Thanks.

Apparently avrdude 7.0 and git main has an issue with optiboot_x. But megaTinyCore bundled version (avrdude 6.3 custom version by Arduino) works fine.

@SpenceKonde
Copy link
Owner

SpenceKonde commented Oct 11, 2022 via email

@mcuee
Copy link
Author

mcuee commented Oct 15, 2022

I think I will not worry about the bootloader for now. The work-around to use avrdude 7.0 or git main is to export the hex file from megaTinyCore. It works fine.

PS C:\work\avr\avrdude_test\avrdude_bin> .\avrdude_git -pattiny817 -cxplainedmini_updi -Pusb -e 
-U .\hex2\Blink.ino_tiny817.hex

                 Vtarget                      : 5.00 V
avrdude_git.exe: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.05s

avrdude_git.exe: Device signature = 0x1e9320 (probably t817)
avrdude_git.exe: erasing chip
avrdude_git.exe: reading input file .\hex2\Blink.ino_tiny817.hex for flash
avrdude_git.exe: writing 592 bytes flash ...

Writing | ################################################## | 100% 0.35s

avrdude_git.exe: 592 bytes of flash written
avrdude_git.exe: verifying flash memory against .\hex2\Blink.ino_tiny817.hex

Reading | ################################################## | 100% 0.29s

avrdude_git.exe: 592 bytes of flash verified

avrdude_git.exe done.  Thank you.

@SpenceKonde SpenceKonde added No Plans-or not viable There are no plans to fix/change, and I do not even know that it can be Not our bug This is a bug in a third party tool and should be raised with the maintainers of that tool, if any. labels Oct 20, 2022
@mcuee
Copy link
Author

mcuee commented Oct 30, 2022

FYI as well, from here.

For those who are more adventurous, you can try the Windows binary mentioned in this thread. I have tested it with DxCore, megaTinyCore and MegaCoreX. It is based on avrdude git main (with many fixes over 7.0 release).

I have also built Linux and macOS binaries here (32 bitLinux x86, 64bit macOS x86_64).

@mcuee
Copy link
Author

mcuee commented Oct 30, 2022

You can also try the binaries here. I need to use the 64bit Linux binary under 64bit Linux (no 32bit compatibility layer installed).
https://github.com/mcuee/avrdude-packing/actions/runs/3354027563

More discussions here.

@mcuee
Copy link
Author

mcuee commented Nov 4, 2022

Choosing the other hex file works for ATtiny817 Xplained Mini (LED is PC0/Pin12).

C:\Users\xiaof\AppData\Local\Arduino15\packages\DxCore\tools\avrdude\6.3.0-arduino17or18/bin/avrdude -CC:\Users\xiaof\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.1/avrdude.conf -v -pattiny817 -cxplainedmini_updi -Pusb -e -Ufuse0:w:0x00:m -Ufuse1:w:0x00:m -Ufuse5:w:0b11000100:m -Ufuse6:w:0x04:m -Ufuse8:w:0x02:m -Ufuse7:w:0x00:m -Uflash:w:C:\Users\xiaof\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.1/bootloaders/hex/optiboot_txyz.hex:i 

avrdude: Version avrdude-main-test-libusb-compat
         Copyright (c) Brian Dean, http://www.bdmicro.com/
         Copyright (c) Joerg Wunsch

         System wide configuration file is C:\Users\xiaof\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.1\avrdude.conf

         Using Port                    : usb
         Using Programmer              : xplainedmini_updi
avrdude: found CMSIS-DAP compliant device, using EDBG protocol
         AVR Part                      : ATtiny817
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         Serial program mode           : yes
         Parallel program mode         : yes
         Memory Detail                 :

                                           Block Poll               Page                       Polled
           Memory Type Alias    Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- -------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           fuse0       wdtcfg      0     0     0    0 no          1    1      0     0     0 0x00 0x00
           fuse1       bodcfg      0     0     0    0 no          1    1      0     0     0 0x00 0x00
           fuse2       osccfg      0     0     0    0 no          1    1      0     0     0 0x00 0x00
           fuse4       tcd0cfg     0     0     0    0 no          1    1      0     0     0 0x00 0x00
           fuse5       syscfg0     0     0     0    0 no          1    1      0     0     0 0x00 0x00
           fuse6       syscfg1     0     0     0    0 no          1    1      0     0     0 0x00 0x00
           fuse7       append      0     0     0    0 no          1    1      0     0     0 0x00 0x00
           fuse8       bootend     0     0     0    0 no          1    1      0     0     0 0x00 0x00
           fuses                   0     0     0    0 no          9   10      0     0     0 0x00 0x00
           lock                    0     0     0    0 no          1    1      0     0     0 0x00 0x00
           tempsense               0     0     0    0 no          2    1      0     0     0 0x00 0x00
           signature               0     0     0    0 no          3    1      0     0     0 0x00 0x00
           prodsig                 0     0     0    0 no         61   61      0     0     0 0x00 0x00
           sernum                  0     0     0    0 no         10    1      0     0     0 0x00 0x00
           osccal16                0     0     0    0 no          2    1      0     0     0 0x00 0x00
           osccal20                0     0     0    0 no          2    1      0     0     0 0x00 0x00
           osc16err                0     0     0    0 no          2    1      0     0     0 0x00 0x00
           osc20err                0     0     0    0 no          2    1      0     0     0 0x00 0x00
           data                    0     0     0    0 no          0    1      0     0     0 0x00 0x00
           userrow     usersig     0     0     0    0 no         32   32      0     0     0 0x00 0x00
           eeprom                  0     0     0    0 no        128   32      0     0     0 0x00 0x00
           flash                   0     0     0    0 no       8192   64      0     0     0 0x00 0x00

         Programmer Type : JTAGICE3_UPDI
         Description     : Atmel AVR XplainedMini in UPDI mode
         ICE HW version  : 0
         ICE FW version  : 1.13 (rel. 43)
         Serial number   : ATML2658061800009257
         Vtarget         : 5.00 V
avrdude: partial Family_ID returned: "tiny"
avrdude: AVR device initialized and ready to accept instructions
avrdude: device signature = 0x1e9320 (probably t817)
erasing chip
avrdude: reading input file 0x00 for fuse0/wdtcfg
         with 1 byte in 1 section within [0, 0]
avrdude: writing 1 byte fuse0/wdtcfg ...
avrdude: 1 byte of fuse0/wdtcfg written
avrdude: verifying fuse0/wdtcfg memory against 0x00
avrdude: 1 byte of fuse0/wdtcfg verified
avrdude: reading input file 0x00 for fuse1/bodcfg
         with 1 byte in 1 section within [0, 0]
avrdude: writing 1 byte fuse1/bodcfg ...
avrdude: 1 byte of fuse1/bodcfg written
avrdude: verifying fuse1/bodcfg memory against 0x00
avrdude: 1 byte of fuse1/bodcfg verified
avrdude: reading input file 0b11000100 for fuse5/syscfg0
         with 1 byte in 1 section within [0, 0]
avrdude: writing 1 byte fuse5/syscfg0 ...
avrdude: 1 byte of fuse5/syscfg0 written
avrdude: verifying fuse5/syscfg0 memory against 0b11000100
avrdude: 1 byte of fuse5/syscfg0 verified
avrdude: reading input file 0x04 for fuse6/syscfg1
         with 1 byte in 1 section within [0, 0]
avrdude: writing 1 byte fuse6/syscfg1 ...
avrdude: 1 byte of fuse6/syscfg1 written
avrdude: verifying fuse6/syscfg1 memory against 0x04
avrdude: 1 byte of fuse6/syscfg1 verified
avrdude: reading input file 0x02 for fuse8/bootend
         with 1 byte in 1 section within [0, 0]
avrdude: writing 1 byte fuse8/bootend ...
avrdude: 1 byte of fuse8/bootend written
avrdude: verifying fuse8/bootend memory against 0x02
avrdude: 1 byte of fuse8/bootend verified
avrdude: reading input file 0x00 for fuse7/append
         with 1 byte in 1 section within [0, 0]
avrdude: writing 1 byte fuse7/append ...
avrdude: 1 byte of fuse7/append written
avrdude: verifying fuse7/append memory against 0x00
avrdude: 1 byte of fuse7/append verified
avrdude: reading input file C:\Users\xiaof\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.1/bootloaders/hex/optiboot_txyz.hex for flash
         with 466 bytes in 2 sections within [0, 0x1ff]
         using 8 pages and 46 pad bytes
avrdude: writing 466 bytes flash ...

Writing | ################################################## | 100% 0.22s

avrdude: 466 bytes of flash written
avrdude: verifying flash memory against C:\Users\xiaof\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.1/bootloaders/hex/optiboot_txyz.hex

Reading | ################################################## | 100% 0.19s

avrdude: 466 bytes of flash verified

avrdude done.  Thank you.

C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\xiaof\AppData\Local\Arduino15\packages -hardware C:\Users\xiaof\Documents\Arduino\hardware -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\xiaof\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\xiaof\Documents\Arduino\libraries -fqbn=megaTinyCore:megaavr:atxy7o:chip=817,clocko=20internal,bodvoltage=1v8,bodmode=disabled,millis=enabled,resetpinopti=UPDI,startuptimeopti=8,bootloaderuart=default,wiremode=mors,printf=default,attach=allenabled -vid-pid=03EB_2145 -ide-version=10819 -build-path C:\Users\xiaof\AppData\Local\Temp\arduino_build_871138 -warnings=none -build-cache C:\Users\xiaof\AppData\Local\Temp\arduino_cache_553998 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.python3.path=C:\Users\xiaof\AppData\Local\Arduino15\packages\megaTinyCore\tools\python3\3.7.2-post1 -prefs=runtime.tools.python3-3.7.2-post1.path=C:\Users\xiaof\AppData\Local\Arduino15\packages\megaTinyCore\tools\python3\3.7.2-post1 -prefs=runtime.tools.avr-gcc.path=C:\Users\xiaof\AppData\Local\Arduino15\packages\DxCore\tools\avr-gcc\7.3.0-atmel3.6.1-azduino6 -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-azduino6.path=C:\Users\xiaof\AppData\Local\Arduino15\packages\DxCore\tools\avr-gcc\7.3.0-atmel3.6.1-azduino6 -prefs=runtime.tools.avrdude.path=C:\Users\xiaof\AppData\Local\Arduino15\packages\DxCore\tools\avrdude\6.3.0-arduino17or18 -prefs=runtime.tools.avrdude-6.3.0-arduino17or18.path=C:\Users\xiaof\AppData\Local\Arduino15\packages\DxCore\tools\avrdude\6.3.0-arduino17or18 -prefs=runtime.tools.arduinoOTA.path=C:\Users\xiaof\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\Users\xiaof\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -verbose C:\Users\xiaof\Documents\Arduino\Tiny817\Blink\Blink.ino
C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\xiaof\AppData\Local\Arduino15\packages -hardware C:\Users\xiaof\Documents\Arduino\hardware -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\xiaof\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\xiaof\Documents\Arduino\libraries -fqbn=megaTinyCore:megaavr:atxy7o:chip=817,clocko=20internal,bodvoltage=1v8,bodmode=disabled,millis=enabled,resetpinopti=UPDI,startuptimeopti=8,bootloaderuart=default,wiremode=mors,printf=default,attach=allenabled -vid-pid=03EB_2145 -ide-version=10819 -build-path C:\Users\xiaof\AppData\Local\Temp\arduino_build_871138 -warnings=none -build-cache C:\Users\xiaof\AppData\Local\Temp\arduino_cache_553998 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.python3.path=C:\Users\xiaof\AppData\Local\Arduino15\packages\megaTinyCore\tools\python3\3.7.2-post1 -prefs=runtime.tools.python3-3.7.2-post1.path=C:\Users\xiaof\AppData\Local\Arduino15\packages\megaTinyCore\tools\python3\3.7.2-post1 -prefs=runtime.tools.avr-gcc.path=C:\Users\xiaof\AppData\Local\Arduino15\packages\DxCore\tools\avr-gcc\7.3.0-atmel3.6.1-azduino6 -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-azduino6.path=C:\Users\xiaof\AppData\Local\Arduino15\packages\DxCore\tools\avr-gcc\7.3.0-atmel3.6.1-azduino6 -prefs=runtime.tools.avrdude.path=C:\Users\xiaof\AppData\Local\Arduino15\packages\DxCore\tools\avrdude\6.3.0-arduino17or18 -prefs=runtime.tools.avrdude-6.3.0-arduino17or18.path=C:\Users\xiaof\AppData\Local\Arduino15\packages\DxCore\tools\avrdude\6.3.0-arduino17or18 -prefs=runtime.tools.arduinoOTA.path=C:\Users\xiaof\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\Users\xiaof\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -verbose C:\Users\xiaof\Documents\Arduino\Tiny817\Blink\Blink.ino
Using board 'atxy7o' from platform in folder: C:\Users\xiaof\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.1
Using core 'megatinycore' from platform in folder: C:\Users\xiaof\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.1
Warning: Board DxCore:megaavr:microchip doesn't define a 'build.board' preference. Auto-set to: MEGAAVR_MICROCHIP
Detecting libraries used...
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\DxCore\\tools\\avr-gcc\\7.3.0-atmel3.6.1-azduino6/bin/avr-g++" -c -g -Os -Wall -std=gnu++17 -fpermissive -Wno-sized-deallocation -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=attiny817 -DF_CPU=20000000L -DCLOCK_SOURCE=0 -DTWI_MORS -DMILLIS_USE_TIMERD0 -DCORE_ATTACH_ALL -DARDUINO=10819 -DARDUINO_AVR_ATtiny817 -DARDUINO_ARCH_MEGAAVR "-DMEGATINYCORE=\"2.6.1\"" -DMEGATINYCORE_MAJOR=2UL -DMEGATINYCORE_MINOR=6UL -DMEGATINYCORE_PATCH=1UL -DMEGATINYCORE_RELEASED=1 -DARDUINO_attinyxy7 -DUSING_OPTIBOOT "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\megaTinyCore\\hardware\\megaavr\\2.6.1\\cores\\megatinycore/api/deprecated" "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\megaTinyCore\\hardware\\megaavr\\2.6.1\\cores\\megatinycore" "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\megaTinyCore\\hardware\\megaavr\\2.6.1\\variants\\txy7" "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_871138\\sketch\\Blink.ino.cpp" -o nul
Generating function prototypes...
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\DxCore\\tools\\avr-gcc\\7.3.0-atmel3.6.1-azduino6/bin/avr-g++" -c -g -Os -Wall -std=gnu++17 -fpermissive -Wno-sized-deallocation -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=attiny817 -DF_CPU=20000000L -DCLOCK_SOURCE=0 -DTWI_MORS -DMILLIS_USE_TIMERD0 -DCORE_ATTACH_ALL -DARDUINO=10819 -DARDUINO_AVR_ATtiny817 -DARDUINO_ARCH_MEGAAVR "-DMEGATINYCORE=\"2.6.1\"" -DMEGATINYCORE_MAJOR=2UL -DMEGATINYCORE_MINOR=6UL -DMEGATINYCORE_PATCH=1UL -DMEGATINYCORE_RELEASED=1 -DARDUINO_attinyxy7 -DUSING_OPTIBOOT "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\megaTinyCore\\hardware\\megaavr\\2.6.1\\cores\\megatinycore/api/deprecated" "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\megaTinyCore\\hardware\\megaavr\\2.6.1\\cores\\megatinycore" "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\megaTinyCore\\hardware\\megaavr\\2.6.1\\variants\\txy7" "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_871138\\sketch\\Blink.ino.cpp" -o "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_871138\\preproc\\ctags_target_for_gcc_minus_e.cpp"
"C:\\Program Files (x86)\\Arduino\\tools-builder\\ctags\\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_871138\\preproc\\ctags_target_for_gcc_minus_e.cpp"
Compiling sketch...
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\DxCore\\tools\\avr-gcc\\7.3.0-atmel3.6.1-azduino6/bin/avr-g++" -c -g -Os -Wall -std=gnu++17 -fpermissive -Wno-sized-deallocation -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=attiny817 -DF_CPU=20000000L -DCLOCK_SOURCE=0 -DTWI_MORS -DMILLIS_USE_TIMERD0 -DCORE_ATTACH_ALL -DARDUINO=10819 -DARDUINO_AVR_ATtiny817 -DARDUINO_ARCH_MEGAAVR "-DMEGATINYCORE=\"2.6.1\"" -DMEGATINYCORE_MAJOR=2UL -DMEGATINYCORE_MINOR=6UL -DMEGATINYCORE_PATCH=1UL -DMEGATINYCORE_RELEASED=1 -DARDUINO_attinyxy7 -DUSING_OPTIBOOT "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\megaTinyCore\\hardware\\megaavr\\2.6.1\\cores\\megatinycore/api/deprecated" "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\megaTinyCore\\hardware\\megaavr\\2.6.1\\cores\\megatinycore" "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\megaTinyCore\\hardware\\megaavr\\2.6.1\\variants\\txy7" "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_871138\\sketch\\Blink.ino.cpp" -o "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_871138\\sketch\\Blink.ino.cpp.o"
Compiling libraries...
Compiling core...
Using precompiled core: C:\Users\xiaof\AppData\Local\Temp\arduino_cache_553998\core\core_2583e14fd78733ada1750d98441c20a0.a
Linking everything together...
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\DxCore\\tools\\avr-gcc\\7.3.0-atmel3.6.1-azduino6/bin/avr-gcc" -Wall -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -Wl,--section-start=.text=0x200 -mmcu=attiny817 -o "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_871138/Blink.ino.elf" "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_871138\\sketch\\Blink.ino.cpp.o" "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_871138/..\\arduino_cache_553998\\core\\core_2583e14fd78733ada1750d98441c20a0.a" "-LC:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_871138" -lm
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\DxCore\\tools\\avr-gcc\\7.3.0-atmel3.6.1-azduino6/bin/avr-objcopy" -O binary -R .eeprom "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_871138/Blink.ino.elf" "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_871138/Blink.ino.bin"
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\DxCore\\tools\\avr-gcc\\7.3.0-atmel3.6.1-azduino6/bin/avr-objcopy" -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_871138/Blink.ino.elf" "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_871138/Blink.ino.eep"
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\DxCore\\tools\\avr-gcc\\7.3.0-atmel3.6.1-azduino6/bin/avr-objcopy" -O ihex -R .eeprom "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_871138/Blink.ino.elf" "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_871138/Blink.ino.hex"
cmd /C echo. && "C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\DxCore\\tools\\avr-gcc\\7.3.0-atmel3.6.1-azduino6/bin/avr-objdump" --disassemble --source --line-numbers --demangle --section=.text "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_871138/Blink.ino.elf" > "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_871138/Blink.ino.lst"
 
cmd /C echo. && "C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\DxCore\\tools\\avr-gcc\\7.3.0-atmel3.6.1-azduino6/bin/avr-nm" --numeric-sort --line-numbers --demangle --print-size --format=s "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_871138/Blink.ino.elf" > "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_871138/Blink.ino.map"
 
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\DxCore\\tools\\avr-gcc\\7.3.0-atmel3.6.1-azduino6/bin/avr-size" -A "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_871138/Blink.ino.elf"
Sketch uses 512 bytes (6%) of program storage space. Maximum is 7680 bytes.
Global variables use 10 bytes (1%) of dynamic memory, leaving 502 bytes for local variables. Maximum is 512 bytes.
C:\Users\xiaof\AppData\Local\Arduino15\packages\DxCore\tools\avrdude\6.3.0-arduino17or18/bin/avrdude -CC:\Users\xiaof\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.1/avrdude.conf -v -pattiny817 -carduino -D -PCOM7 -PCOM7 -b115200 -Uflash:w:C:\Users\xiaof\AppData\Local\Temp\arduino_build_871138/Blink.ino.hex:i 

avrdude: Version avrdude-main-test-libusb-compat
         Copyright (c) Brian Dean, http://www.bdmicro.com/
         Copyright (c) Joerg Wunsch

         System wide configuration file is C:\Users\xiaof\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.1\avrdude.conf

         Using Port                    : COM7
         Using Programmer              : arduino
         Overriding Baud Rate          : 115200
         AVR Part                      : ATtiny817
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         Serial program mode           : yes
         Parallel program mode         : yes
         Memory Detail                 :

                                           Block Poll               Page                       Polled
           Memory Type Alias    Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- -------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           fuse0       wdtcfg      0     0     0    0 no          1    1      0     0     0 0x00 0x00
           fuse1       bodcfg      0     0     0    0 no          1    1      0     0     0 0x00 0x00
           fuse2       osccfg      0     0     0    0 no          1    1      0     0     0 0x00 0x00
           fuse4       tcd0cfg     0     0     0    0 no          1    1      0     0     0 0x00 0x00
           fuse5       syscfg0     0     0     0    0 no          1    1      0     0     0 0x00 0x00
           fuse6       syscfg1     0     0     0    0 no          1    1      0     0     0 0x00 0x00
           fuse7       append      0     0     0    0 no          1    1      0     0     0 0x00 0x00
           fuse8       bootend     0     0     0    0 no          1    1      0     0     0 0x00 0x00
           fuses                   0     0     0    0 no          9   10      0     0     0 0x00 0x00
           lock                    0     0     0    0 no          1    1      0     0     0 0x00 0x00
           tempsense               0     0     0    0 no          2    1      0     0     0 0x00 0x00
           signature               0     0     0    0 no          3    1      0     0     0 0x00 0x00
           prodsig                 0     0     0    0 no         61   61      0     0     0 0x00 0x00
           sernum                  0     0     0    0 no         10    1      0     0     0 0x00 0x00
           osccal16                0     0     0    0 no          2    1      0     0     0 0x00 0x00
           osccal20                0     0     0    0 no          2    1      0     0     0 0x00 0x00
           osc16err                0     0     0    0 no          2    1      0     0     0 0x00 0x00
           osc20err                0     0     0    0 no          2    1      0     0     0 0x00 0x00
           data                    0     0     0    0 no          0    1      0     0     0 0x00 0x00
           userrow     usersig     0     0     0    0 no         32   32      0     0     0 0x00 0x00
           eeprom                  0     0     0    0 no        128   32      0     0     0 0x00 0x00
           flash                   0     0     0    0 no       8192   64      0     0     0 0x00 0x00

         Programmer Type : Arduino
         Description     : Arduino for bootloader using STK500 v1 protocol
         Hardware Version: 3
         Firmware Version: 9.1

avrdude: AVR device initialized and ready to accept instructions
avrdude: device signature = 0x1e9320 (probably t817)
avrdude: reading input file C:\Users\xiaof\AppData\Local\Temp\arduino_build_871138/Blink.ino.hex for flash
         with 512 bytes in 1 section within [0x200, 0x3ff]
         using 8 pages and 0 pad bytes
avrdude: writing 512 bytes flash ...

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

avrdude: 512 bytes of flash written
avrdude: verifying flash memory against C:\Users\xiaof\AppData\Local\Temp\arduino_build_871138/Blink.ino.hex

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

avrdude: 512 bytes of flash verified

avrdude done.  Thank you.


@mcuee
Copy link
Author

mcuee commented Nov 4, 2022

Same bootloader also works for ATtiny817 Xplained Pro (just the LED pin is different at PB4/Pin7 for the blink sketch).

C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\xiaof\AppData\Local\Arduino15\packages -hardware C:\Users\xiaof\Documents\Arduino\hardware -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\xiaof\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\xiaof\Documents\Arduino\libraries -fqbn=megaTinyCore:megaavr:atxy7o:chip=817,clocko=20internal,bodvoltage=1v8,bodmode=disabled,millis=enabled,resetpinopti=UPDI,startuptimeopti=8,bootloaderuart=default,wiremode=mors,printf=default,attach=allenabled -vid-pid=03EB_2111 -ide-version=10819 -build-path C:\Users\xiaof\AppData\Local\Temp\arduino_build_871138 -warnings=none -build-cache C:\Users\xiaof\AppData\Local\Temp\arduino_cache_553998 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.python3.path=C:\Users\xiaof\AppData\Local\Arduino15\packages\megaTinyCore\tools\python3\3.7.2-post1 -prefs=runtime.tools.python3-3.7.2-post1.path=C:\Users\xiaof\AppData\Local\Arduino15\packages\megaTinyCore\tools\python3\3.7.2-post1 -prefs=runtime.tools.avr-gcc.path=C:\Users\xiaof\AppData\Local\Arduino15\packages\DxCore\tools\avr-gcc\7.3.0-atmel3.6.1-azduino6 -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-azduino6.path=C:\Users\xiaof\AppData\Local\Arduino15\packages\DxCore\tools\avr-gcc\7.3.0-atmel3.6.1-azduino6 -prefs=runtime.tools.avrdude.path=C:\Users\xiaof\AppData\Local\Arduino15\packages\DxCore\tools\avrdude\6.3.0-arduino17or18 -prefs=runtime.tools.avrdude-6.3.0-arduino17or18.path=C:\Users\xiaof\AppData\Local\Arduino15\packages\DxCore\tools\avrdude\6.3.0-arduino17or18 -prefs=runtime.tools.arduinoOTA.path=C:\Users\xiaof\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\Users\xiaof\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -verbose C:\Users\xiaof\Documents\Arduino\Tiny817\Blink_Pro817\Blink_Pro817.ino
C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\xiaof\AppData\Local\Arduino15\packages -hardware C:\Users\xiaof\Documents\Arduino\hardware -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\xiaof\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\xiaof\Documents\Arduino\libraries -fqbn=megaTinyCore:megaavr:atxy7o:chip=817,clocko=20internal,bodvoltage=1v8,bodmode=disabled,millis=enabled,resetpinopti=UPDI,startuptimeopti=8,bootloaderuart=default,wiremode=mors,printf=default,attach=allenabled -vid-pid=03EB_2111 -ide-version=10819 -build-path C:\Users\xiaof\AppData\Local\Temp\arduino_build_871138 -warnings=none -build-cache C:\Users\xiaof\AppData\Local\Temp\arduino_cache_553998 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.python3.path=C:\Users\xiaof\AppData\Local\Arduino15\packages\megaTinyCore\tools\python3\3.7.2-post1 -prefs=runtime.tools.python3-3.7.2-post1.path=C:\Users\xiaof\AppData\Local\Arduino15\packages\megaTinyCore\tools\python3\3.7.2-post1 -prefs=runtime.tools.avr-gcc.path=C:\Users\xiaof\AppData\Local\Arduino15\packages\DxCore\tools\avr-gcc\7.3.0-atmel3.6.1-azduino6 -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-azduino6.path=C:\Users\xiaof\AppData\Local\Arduino15\packages\DxCore\tools\avr-gcc\7.3.0-atmel3.6.1-azduino6 -prefs=runtime.tools.avrdude.path=C:\Users\xiaof\AppData\Local\Arduino15\packages\DxCore\tools\avrdude\6.3.0-arduino17or18 -prefs=runtime.tools.avrdude-6.3.0-arduino17or18.path=C:\Users\xiaof\AppData\Local\Arduino15\packages\DxCore\tools\avrdude\6.3.0-arduino17or18 -prefs=runtime.tools.arduinoOTA.path=C:\Users\xiaof\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\Users\xiaof\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -verbose C:\Users\xiaof\Documents\Arduino\Tiny817\Blink_Pro817\Blink_Pro817.ino
Using board 'atxy7o' from platform in folder: C:\Users\xiaof\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.1
Using core 'megatinycore' from platform in folder: C:\Users\xiaof\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.1
Warning: Board DxCore:megaavr:microchip doesn't define a 'build.board' preference. Auto-set to: MEGAAVR_MICROCHIP
Detecting libraries used...
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\DxCore\\tools\\avr-gcc\\7.3.0-atmel3.6.1-azduino6/bin/avr-g++" -c -g -Os -Wall -std=gnu++17 -fpermissive -Wno-sized-deallocation -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=attiny817 -DF_CPU=20000000L -DCLOCK_SOURCE=0 -DTWI_MORS -DMILLIS_USE_TIMERD0 -DCORE_ATTACH_ALL -DARDUINO=10819 -DARDUINO_AVR_ATtiny817 -DARDUINO_ARCH_MEGAAVR "-DMEGATINYCORE=\"2.6.1\"" -DMEGATINYCORE_MAJOR=2UL -DMEGATINYCORE_MINOR=6UL -DMEGATINYCORE_PATCH=1UL -DMEGATINYCORE_RELEASED=1 -DARDUINO_attinyxy7 -DUSING_OPTIBOOT "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\megaTinyCore\\hardware\\megaavr\\2.6.1\\cores\\megatinycore/api/deprecated" "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\megaTinyCore\\hardware\\megaavr\\2.6.1\\cores\\megatinycore" "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\megaTinyCore\\hardware\\megaavr\\2.6.1\\variants\\txy7" "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_871138\\sketch\\Blink_Pro817.ino.cpp" -o nul
Generating function prototypes...
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\DxCore\\tools\\avr-gcc\\7.3.0-atmel3.6.1-azduino6/bin/avr-g++" -c -g -Os -Wall -std=gnu++17 -fpermissive -Wno-sized-deallocation -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=attiny817 -DF_CPU=20000000L -DCLOCK_SOURCE=0 -DTWI_MORS -DMILLIS_USE_TIMERD0 -DCORE_ATTACH_ALL -DARDUINO=10819 -DARDUINO_AVR_ATtiny817 -DARDUINO_ARCH_MEGAAVR "-DMEGATINYCORE=\"2.6.1\"" -DMEGATINYCORE_MAJOR=2UL -DMEGATINYCORE_MINOR=6UL -DMEGATINYCORE_PATCH=1UL -DMEGATINYCORE_RELEASED=1 -DARDUINO_attinyxy7 -DUSING_OPTIBOOT "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\megaTinyCore\\hardware\\megaavr\\2.6.1\\cores\\megatinycore/api/deprecated" "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\megaTinyCore\\hardware\\megaavr\\2.6.1\\cores\\megatinycore" "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\megaTinyCore\\hardware\\megaavr\\2.6.1\\variants\\txy7" "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_871138\\sketch\\Blink_Pro817.ino.cpp" -o "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_871138\\preproc\\ctags_target_for_gcc_minus_e.cpp"
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\builtin\\tools\\ctags\\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_871138\\preproc\\ctags_target_for_gcc_minus_e.cpp"
Compiling sketch...
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\DxCore\\tools\\avr-gcc\\7.3.0-atmel3.6.1-azduino6/bin/avr-g++" -c -g -Os -Wall -std=gnu++17 -fpermissive -Wno-sized-deallocation -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=attiny817 -DF_CPU=20000000L -DCLOCK_SOURCE=0 -DTWI_MORS -DMILLIS_USE_TIMERD0 -DCORE_ATTACH_ALL -DARDUINO=10819 -DARDUINO_AVR_ATtiny817 -DARDUINO_ARCH_MEGAAVR "-DMEGATINYCORE=\"2.6.1\"" -DMEGATINYCORE_MAJOR=2UL -DMEGATINYCORE_MINOR=6UL -DMEGATINYCORE_PATCH=1UL -DMEGATINYCORE_RELEASED=1 -DARDUINO_attinyxy7 -DUSING_OPTIBOOT "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\megaTinyCore\\hardware\\megaavr\\2.6.1\\cores\\megatinycore/api/deprecated" "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\megaTinyCore\\hardware\\megaavr\\2.6.1\\cores\\megatinycore" "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\megaTinyCore\\hardware\\megaavr\\2.6.1\\variants\\txy7" "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_871138\\sketch\\Blink_Pro817.ino.cpp" -o "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_871138\\sketch\\Blink_Pro817.ino.cpp.o"
Compiling libraries...
Compiling core...
Using precompiled core: C:\Users\xiaof\AppData\Local\Temp\arduino_cache_553998\core\core_2583e14fd78733ada1750d98441c20a0.a
Linking everything together...
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\DxCore\\tools\\avr-gcc\\7.3.0-atmel3.6.1-azduino6/bin/avr-gcc" -Wall -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -Wl,--section-start=.text=0x200 -mmcu=attiny817 -o "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_871138/Blink_Pro817.ino.elf" "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_871138\\sketch\\Blink_Pro817.ino.cpp.o" "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_871138/..\\arduino_cache_553998\\core\\core_2583e14fd78733ada1750d98441c20a0.a" "-LC:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_871138" -lm
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\DxCore\\tools\\avr-gcc\\7.3.0-atmel3.6.1-azduino6/bin/avr-objcopy" -O binary -R .eeprom "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_871138/Blink_Pro817.ino.elf" "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_871138/Blink_Pro817.ino.bin"
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\DxCore\\tools\\avr-gcc\\7.3.0-atmel3.6.1-azduino6/bin/avr-objcopy" -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_871138/Blink_Pro817.ino.elf" "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_871138/Blink_Pro817.ino.eep"
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\DxCore\\tools\\avr-gcc\\7.3.0-atmel3.6.1-azduino6/bin/avr-objcopy" -O ihex -R .eeprom "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_871138/Blink_Pro817.ino.elf" "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_871138/Blink_Pro817.ino.hex"
cmd /C echo. && "C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\DxCore\\tools\\avr-gcc\\7.3.0-atmel3.6.1-azduino6/bin/avr-objdump" --disassemble --source --line-numbers --demangle --section=.text "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_871138/Blink_Pro817.ino.elf" > "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_871138/Blink_Pro817.ino.lst"
 
cmd /C echo. && "C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\DxCore\\tools\\avr-gcc\\7.3.0-atmel3.6.1-azduino6/bin/avr-nm" --numeric-sort --line-numbers --demangle --print-size --format=s "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_871138/Blink_Pro817.ino.elf" > "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_871138/Blink_Pro817.ino.map"
 
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\DxCore\\tools\\avr-gcc\\7.3.0-atmel3.6.1-azduino6/bin/avr-size" -A "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_871138/Blink_Pro817.ino.elf"
Sketch uses 444 bytes (5%) of program storage space. Maximum is 7680 bytes.
Global variables use 10 bytes (1%) of dynamic memory, leaving 502 bytes for local variables. Maximum is 512 bytes.
C:\Users\xiaof\AppData\Local\Arduino15\packages\DxCore\tools\avrdude\6.3.0-arduino17or18/bin/avrdude -CC:\Users\xiaof\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.1/avrdude.conf -v -pattiny817 -carduino -D -PCOM23 -PCOM23 -b115200 -Uflash:w:C:\Users\xiaof\AppData\Local\Temp\arduino_build_871138/Blink_Pro817.ino.hex:i 

avrdude: Version avrdude-main-test-libusb-compat
         Copyright (c) Brian Dean, http://www.bdmicro.com/
         Copyright (c) Joerg Wunsch

         System wide configuration file is C:\Users\xiaof\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.1\avrdude.conf

         Using Port                    : COM23
         Using Programmer              : arduino
         Overriding Baud Rate          : 115200
         AVR Part                      : ATtiny817
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         Serial program mode           : yes
         Parallel program mode         : yes
         Memory Detail                 :

                                           Block Poll               Page                       Polled
           Memory Type Alias    Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- -------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           fuse0       wdtcfg      0     0     0    0 no          1    1      0     0     0 0x00 0x00
           fuse1       bodcfg      0     0     0    0 no          1    1      0     0     0 0x00 0x00
           fuse2       osccfg      0     0     0    0 no          1    1      0     0     0 0x00 0x00
           fuse4       tcd0cfg     0     0     0    0 no          1    1      0     0     0 0x00 0x00
           fuse5       syscfg0     0     0     0    0 no          1    1      0     0     0 0x00 0x00
           fuse6       syscfg1     0     0     0    0 no          1    1      0     0     0 0x00 0x00
           fuse7       append      0     0     0    0 no          1    1      0     0     0 0x00 0x00
           fuse8       bootend     0     0     0    0 no          1    1      0     0     0 0x00 0x00
           fuses                   0     0     0    0 no          9   10      0     0     0 0x00 0x00
           lock                    0     0     0    0 no          1    1      0     0     0 0x00 0x00
           tempsense               0     0     0    0 no          2    1      0     0     0 0x00 0x00
           signature               0     0     0    0 no          3    1      0     0     0 0x00 0x00
           prodsig                 0     0     0    0 no         61   61      0     0     0 0x00 0x00
           sernum                  0     0     0    0 no         10    1      0     0     0 0x00 0x00
           osccal16                0     0     0    0 no          2    1      0     0     0 0x00 0x00
           osccal20                0     0     0    0 no          2    1      0     0     0 0x00 0x00
           osc16err                0     0     0    0 no          2    1      0     0     0 0x00 0x00
           osc20err                0     0     0    0 no          2    1      0     0     0 0x00 0x00
           data                    0     0     0    0 no          0    1      0     0     0 0x00 0x00
           userrow     usersig     0     0     0    0 no         32   32      0     0     0 0x00 0x00
           eeprom                  0     0     0    0 no        128   32      0     0     0 0x00 0x00
           flash                   0     0     0    0 no       8192   64      0     0     0 0x00 0x00

         Programmer Type : Arduino
         Description     : Arduino for bootloader using STK500 v1 protocol
         Hardware Version: 3
         Firmware Version: 9.1

avrdude: AVR device initialized and ready to accept instructions
avrdude: device signature = 0x1e9320 (probably t817)
avrdude: reading input file C:\Users\xiaof\AppData\Local\Temp\arduino_build_871138/Blink_Pro817.ino.hex for flash
         with 444 bytes in 1 section within [0x200, 0x3bb]
         using 7 pages and 4 pad bytes
avrdude: writing 444 bytes flash ...

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

avrdude: 444 bytes of flash written
avrdude: verifying flash memory against C:\Users\xiaof\AppData\Local\Temp\arduino_build_871138/Blink_Pro817.ino.hex

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

avrdude: 444 bytes of flash verified

avrdude done.  Thank you.

@mcuee
Copy link
Author

mcuee commented Dec 4, 2022

Fuse settings for reference:

C:\Users\xiaof\AppData\Local\Arduino15\packages\DxCore\tools\avrdude\6.3.0-arduino17or18/bin/avrdude 
-CC:\Users\xiaof\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.4/avrdude.conf
 -v -pattiny817 -cxplainedpro_updi -Pusb -e 
-Ufuse0:w:0x00:m -Ufuse1:w:0x00:m -Ufuse2:w:0x02:m 
-Ufuse5:w:0b11000100:m -Ufuse6:w:0x04:m -Ufuse8:w:0x02:m -Ufuse7:w:0x00:m 
-Uflash:w:C:\Users\xiaof\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.4/bootloaders/hex/optiboot_txyz.hex:i 

PS C:\work\avr\avrdude_test\avrdude_bin> .\avrdude -c xplainedpro_updi -p t817 -qqt
avrdude> dump fuses
>>> dump fuses
0000  00 00 02 ff 00 c4 04 00  02                       |.........       |

avrdude> quit
>>> quit
avrdude>

@mcuee
Copy link
Author

mcuee commented Dec 4, 2022

Basically just choose generic ATtiny817 board with optiboot and do not choose Microchip official board with optiboot. UART pins for the bootloader are PB2/PB3.

@SpenceKonde
Copy link
Owner

Can someone summarize wtf is wrong with that bootloader file and whether it can be fixed? The only thing that should be different is which bloody pin it blinks?

@mcuee
Copy link
Author

mcuee commented Dec 4, 2022

I will try to summarize.

  1. First thing, the hex file does not existing.
avrdude ioerror() OS error: file C:\Users\xiaof\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.4/bootloaders/hex/optiboot_XplainedPro817.hex is not readable: No such file or directory
  1. Even if I copy the file optiboot_xplained817.hex to optiboot_XplainedPro817.hex, it does not work. There are multiple issues with the fuse settings.
C:\Users\xiaof\AppData\Local\Arduino15\packages\DxCore\tools\avrdude\6.3.0-arduino17or18/bin/avrdude -CC:\Users\xiaof\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.4/avrdude.conf -v -pattiny817 -cxplainedpro_updi -Pusb -e -Ufuse0:w:0x00:m -Ufuse1:w:0x00:m -Ufuse2:w:0x02:m -Ufuse5:w:0b1100010{bootloader.eesavebit}:m -Ufuse6:w:0x04:m -Ufuse8:w:0x00:m -Ufuse7:w:0x00:m -Uflash:w:C:\Users\xiaof\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.4/bootloaders/hex/optiboot_XplainedPro817.hex:i 

...
avrdude: partial Family_ID returned: "tiny"
avrdude: AVR device initialized and ready to accept instructions
avrdude: device signature = 0x1e9320 (probably t817)
erasing chip
avrdude: reading input file 0x00 for fuse0
         with 1 byte in 1 section within [0, 0]
avrdude: writing 1 byte fuse0 ...
avrdude: 1 byte of fuse0 written
avrdude: verifying fuse0 memory against 0x00
avrdude: 1 byte of fuse0 verified
avrdude: reading input file 0x00 for fuse1
         with 1 byte in 1 section within [0, 0]
avrdude: writing 1 byte fuse1 ...
avrdude: 1 byte of fuse1 written
avrdude: verifying fuse1 memory against 0x00
avrdude: 1 byte of fuse1 verified
avrdude: reading input file 0x02 for fuse2
         with 1 byte in 1 section within [0, 0]
avrdude: writing 1 byte fuse2 ...
avrdude: 1 byte of fuse2 written
avrdude: verifying fuse2 memory against 0x02
avrdude: 1 byte of fuse2 verified
avrdude fileio_imm() error: invalid byte value (0b1100010{bootloader.eesavebit}) specified for immediate mode
avrdude do_op() error: read from file 0b1100010{bootloader.eesavebit} failed

avrdude done.  Thank you.

Error while burning bootloader.
  1. Even if I fixed the fuse settings, avrdude can not talk to the bootloader. So I think the hex file is not correct either.

@mcuee mcuee changed the title Issues buring bootloader for ATtiny817 Xplained Mini Issues buring bootloader for ATtiny817 Xplained Mini and Xplained Pro Dec 4, 2022
@mcuee
Copy link
Author

mcuee commented Dec 6, 2022

Using avrdude git main to illustrate the problem.

The default optiboot hex file optiboot_xplained817.hex is broken but the alternative hex file optiboot_txyz.hex is okay.

Note to myself:
LED on ATtiny817 Xplained Mini -- PC0 (Pin12)
LED on ATtiny817 Xplained Pro -- PB4 (Pin7)

C:\work\avr\avrdude_test\avrdude_bin> .\avrdude -c xplainedpro_updi -p t817 -qqt
avrdude> dump fuses
>>> dump fuses
0000  00 00 02 ff 00 c4 04 00  02                       |.........       |

avrdude> quit
>>> quit
avrdude>

C:\work\avr\avrdude_test\avrdude_bin> .\avrdude -c xplainedpro_updi -p t817 -U .\optiboot_xplained817.hex

         Vtarget                      : 3.34 V
         JTAG clock megaAVR/program   : 1000 kHz
         JTAG clock megaAVR/debug     : 1000 kHz
         JTAG clock Xmega             : 1000 kHz
         PDI/UPDI clock Xmega/megaAVR : 1000 kHz
avrdude: AVR device initialized and ready to accept instructions
avrdude: device signature = 0x1e9320 (probably t817)
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 .\optiboot_xplained817.hex for flash
         with 466 bytes in 2 sections within [0, 0x1ff]
         using 8 pages and 46 pad bytes
avrdude: writing 466 bytes flash ...

Writing | ################################################## | 100% 0.09 s

avrdude: 466 bytes of flash written
avrdude: verifying flash memory against .\optiboot_xplained817.hex

Reading | ################################################## | 100% 0.05 s

avrdude: 466 bytes of flash verified

avrdude done.  Thank you.

C:\work\avr\avrdude_test\avrdude_bin> .\avrdude -c urclock -P COM13 -p t817 -xbootsize=512
avrdude warning: attempt 1 of 10: not in sync
avrdude error: programmer is not responding; try -xstrict and/or vary -xdelay=100
avrdude warning: attempt 2 of 10: not in sync
avrdude error: programmer is not responding; try -xstrict and/or vary -xdelay=100
avrdude warning: attempt 3 of 10: not in sync
avrdude error: programmer is not responding; try -xstrict and/or vary -xdelay=100
avrdude warning: attempt 4 of 10: not in sync
avrdude error: programmer is not responding; try -xstrict and/or vary -xdelay=100
avrdude warning: attempt 5 of 10: not in sync
avrdude error: programmer is not responding; try -xstrict and/or vary -xdelay=100
avrdude warning: attempt 6 of 10: not in sync
avrdude error: programmer is not responding; try -xstrict and/or vary -xdelay=100
avrdude warning: attempt 7 of 10: not in sync
avrdude error: programmer is not responding; try -xstrict and/or vary -xdelay=100
avrdude warning: attempt 8 of 10: not in sync
avrdude error: programmer is not responding; try -xstrict and/or vary -xdelay=100
avrdude warning: attempt 9 of 10: not in sync
avrdude error: programmer is not responding; try -xstrict and/or vary -xdelay=100
avrdude warning: attempt 10 of 10: not in sync
avrdude error: programmer is not responding; try -xstrict and/or vary -xdelay=100
avrdude error: unable to open programmer urclock on port COM13

avrdude done.  Thank you.

C:\work\avr\avrdude_test\avrdude_bin> .\avrdude -c xplainedpro_updi -p t817 -U .\optiboot_txyz.hex

         Vtarget                      : 3.34 V
         JTAG clock megaAVR/program   : 1000 kHz
         JTAG clock megaAVR/debug     : 1000 kHz
         JTAG clock Xmega             : 1000 kHz
         PDI/UPDI clock Xmega/megaAVR : 1000 kHz
avrdude: AVR device initialized and ready to accept instructions
avrdude: device signature = 0x1e9320 (probably t817)
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 .\optiboot_txyz.hex for flash
         with 466 bytes in 2 sections within [0, 0x1ff]
         using 8 pages and 46 pad bytes
avrdude: writing 466 bytes flash ...

Writing | ################################################## | 100% 0.09 s

avrdude: 466 bytes of flash written
avrdude: verifying flash memory against .\optiboot_txyz.hex

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

avrdude: 466 bytes of flash verified

avrdude done.  Thank you.

C:\work\avr\avrdude_test\avrdude_bin> .\avrdude -c urclock -P COM13 -p t817 -xbootsize=512

avrdude: AVR device initialized and ready to accept instructions
avrdude: device signature = 0x1e9320 (probably t817)

avrdude done.  Thank you.

C:\work\avr\avrdude_test\avrdude_bin> .\avrdude -c urclock -P COM13 -p t817 -xbootsize=512 -xshowall

avrdude: AVR device initialized and ready to accept instructions
0 0000-00-00 00.00  application 0 store 0 meta 0 boot 512 x0.0 ......... vector 0 (RESET) ATtiny817

C:\work\avr\avrdude_test\avrdude_bin> .\avrdude_pr1208 -c urclock -P COM13 -p t817 -xbootsize=512
 -U .\Blink_817pro.ino.ino.t817opti.20c0.mD0.v264.hex

avrdude_pr1208: AVR device initialized and ready to accept instructions
avrdude_pr1208: device signature = 0x1e9320 (probably t817)
avrdude_pr1208: Note: flash memory has been specified, an erase cycle will be performed.
                To disable this feature, specify the -D option.
avrdude_pr1208: erasing chip
avrdude_pr1208: reading input file .\Blink_817pro.ino.ino.t817opti.20c0.mD0.v264.hex for flash
                with 444 bytes in 1 section within [0x200, 0x3bb]
                using 7 pages and 4 pad bytes
avrdude_pr1208: preparing flash input for device bootloader
avrdude_pr1208: writing 444 bytes flash ...

Writing | ################################################## | 100% 0.02 s

avrdude_pr1208: 444 bytes of flash written
avrdude_pr1208: verifying flash memory against .\Blink_817pro.ino.ino.t817opti.20c0.mD0.v264.hex

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

avrdude_pr1208: 444 bytes of flash verified

avrdude_pr1208 done.  Thank you.

C:\work\avr\avrdude_test\avrdude_bin> .\avrdude_pr1208 -c urclock -P COM13 -p t817 -xbootsize=512 -xshowall

avrdude_pr1208: AVR device initialized and ready to accept instructions
0 2022-12-06 11.24 Blink_817pro.ino.ino.t817opti.20c0.mD0.v264.hex 956 store 7177 meta 59 boot 512 
x0.0 ......... vector 0 (RESET) ATtiny817

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
No Plans-or not viable There are no plans to fix/change, and I do not even know that it can be Not our bug This is a bug in a third party tool and should be raised with the maintainers of that tool, if any.
Projects
None yet
Development

No branches or pull requests

2 participants