PlatformIO Community

Can't seem to upload using usbasp to ATTINY828

Trying to upload to ATTINY828 using usbasp, it compiles but doesn’t upload

My platformio.ini:

[env:attiny828]
platform = atmelavr
board = attiny828
framework = arduino
upload_protocol = usbasp

Result:

avrdude: AVR Part "attiny828" not found.

Valid parts are:
  uc3a0512 = AT32UC3A0512
  c128     = AT90CAN128
...........
  x8e5     = ATxmega8E5
  ucr2     = deprecated, use 'uc3a0512'

*** [upload] Error 1

Seems like it’s not using the correct avrdude.conf. See https://github.com/SpenceKonde/ATTinyCore/issues/318. Needs to use https://github.com/SpenceKonde/ATTinyCore/blob/master/avr/avrdude.conf.

Could you do a pio run -t upload -v (verbose upload) and post the output?

I didn’t include the compiling or the long list of parts not found. I did see that other post which helped me to get it working from Ardunio IDE, not sure what to do in pio to make it properly read the correct conf file.

DATA:    [          ]   1.8% (used 9 bytes from 512 bytes)
PROGRAM: [=         ]   9.8% (used 800 bytes from 8192 bytes)
.pio\build\attiny828\firmware.elf  :
section                    size      addr
.data                         0   8388864
.text                       800         0
.bss                          9   8388864
.comment                     48         0
.note.gnu.avr.deviceinfo     60         0
.debug_info                1740         0
.debug_abbrev              1646         0
.debug_line                  26         0
.debug_str                  606         0
Total                      4935
<lambda>(["upload"], [".pio\build\attiny828\firmware.hex"])
AVAILABLE: usbasp
CURRENT: upload_protocol = usbasp
BeforeUpload(["upload"], [".pio\build\attiny828\firmware.hex"])
avrdude -v -p attiny828 -C C:\Users\MatCat\.platformio\packages\tool-avrdude\avrdude.conf -c usbasp -e -D -U flash:w:.pio\build\attiny828\firmware.hex:i

avrdude: Version 6.3, compiled on Sep 12 2016 at 17:24:16
     Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
     Copyright (c) 2007-2014 Joerg Wunsch

     System wide configuration file is "C:\Users\MatCat\.platformio\packages\tool-    avrdude\avrdude.conf"

avrdude: AVR Part "attiny828" not found.

Could you, as a test, back up this file on your computer

and then replace it with https://github.com/SpenceKonde/ATTinyCore/blob/master/avr/avrdude.conf?

Yes that does work, but I would prefer a more elegant solution that doesn’t require modifying stock config files :slight_smile:

See Specifying alternative avrdude.conf? for a python extra_script that replaces the avrdude.conf path during runtime, so no stock config modification needed.

This is a bug in PIO though for the entire ATTinyCore, so it should primarily get fixed there. Could you please open an issue in https://github.com/platformio/platform-atmelavr and just link this conversion.

1 Like

Please request a feature at https://github.com/platformio/platform-atmelavr/issues and provide all details. Thanks!