Open ChasDouglass opened 3 years ago
I'm experiencing the same issue on Archlinux but it's inconsistent. I tried several times on two different 328p feathers to upload via PlatformIO: Build
in VSCode and it failed every time. However, just now I tried with pio run --target upload -v
in the terminal and it worked on both. It fails again if I drop the -v
flag, but keeping the flag doesn't always work either so it might be just coincidence.
Edit: Just coincidence, I've tried several more times in the terminal with and without -v
and can't get a successful upload.
I normally run it through the CLion plugin which does not add the "-v" and it does not work there. I used the command line version to post the problem hoping that the extra data from "-v" would give someone a clue as to what is wrong.
I'm having the same issue. I also tried adding the -v flag then it worked the first time (not sure why), but after that it didn't work anymore. Tried this on two separate feather328p units, both had the same problem.
Here is the output first time I try to program a fresh board:
avrdude: Version 6.3-20190619
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "/Users/joarandreasgjersund/.platformio/packages/tool-avrdude/avrdude.conf"
User configuration file is "/Users/joarandreasgjersund/.avrduderc"
User configuration file does not exist or is not a regular file, skipping
Using Port : /dev/cu.usbserial-01DFFD00
Using Programmer : arduino
Overriding Baud Rate : 57600
AVR Part : ATmega328P
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PC2
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
eeprom 65 20 4 0 no 1024 4 0 3600 3600 0xff 0xff
flash 65 6 128 0 yes 32768 128 256 4500 4500 0xff 0xff
lfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
efuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
lock 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
Programmer Type : Arduino
Description : Arduino
avrdude: stk500_recv(): programmer is not responding
Hardware Version: 16848187
Firmware Version: 6.2
Vtarget : 0.3 V
Varef : 0.3 V
Oscillator : 28.800 kHz
SCK period : 3.3 us
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: safemode: lfuse reads as 0
avrdude: safemode: hfuse reads as 0
avrdude: safemode: efuse reads as 0
avrdude: reading input file ".pio/build/feather328p/firmware.hex"
avrdude: writing flash (15436 bytes):
Writing | ################################################## | 100% 4.20s
avrdude: 15436 bytes of flash written
avrdude: verifying flash memory against .pio/build/feather328p/firmware.hex:
avrdude: load data flash data from input file .pio/build/feather328p/firmware.hex:
avrdude: input file .pio/build/feather328p/firmware.hex contains 15436 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 3.09s
avrdude: verifying ...
avrdude: 15436 bytes of flash verified
avrdude: safemode: lfuse reads as 0
avrdude: safemode: hfuse reads as 0
avrdude: safemode: efuse reads as 0
avrdude: safemode: Fuses OK (E:00, H:00, L:00)
avrdude done. Thank you.
And then I try to do the exact same thing again and this happens:
avrdude: Version 6.3-20190619
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "/Users/joarandreasgjersund/.platformio/packages/tool-avrdude/avrdude.conf"
User configuration file is "/Users/joarandreasgjersund/.avrduderc"
User configuration file does not exist or is not a regular file, skipping
Using Port : /dev/cu.usbserial-01DFFD00
Using Programmer : arduino
Overriding Baud Rate : 57600
AVR Part : ATmega328P
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PC2
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
eeprom 65 20 4 0 no 1024 4 0 3600 3600 0xff 0xff
flash 65 6 128 0 yes 32768 128 256 4500 4500 0xff 0xff
lfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
efuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
lock 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
Programmer Type : Arduino
Description : Arduino
avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x14
avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x03
avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x10
Hardware Version: 70731067
Firmware Version: 211434400.3
Vtarget : 0.2 V
Varef : 0.3 V
Oscillator : 28.800 kHz
SCK period : 3.3 us
avrdude: stk500_initialize(): (b) protocol error, expect=0x10, resp=0x06
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x10
avrdude done. Thank you.
Uploading using Arduino IDE seems to work perfectly fine. Here is the output:
avrdude: Version 6.3-20190619
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "/private/var/folders/tt/p5q4jr0x25x6xfh0smkyc2kc0000gn/T/AppTranslocation/6A92D8B0-94B8-454F-A4C3-18D0D8B6E01E/d/Arduino.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf"
User configuration file is "/Users/joarandreasgjersund/.avrduderc"
User configuration file does not exist or is not a regular file, skipping
Using Port : /dev/cu.usbserial-01DFFCD0
Using Programmer : arduino
Overriding Baud Rate : 57600
AVR Part : ATmega328P
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PC2
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
eeprom 65 20 4 0 no 1024 4 0 3600 3600 0xff 0xff
flash 65 6 128 0 yes 32768 128 256 4500 4500 0xff 0xff
lfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
efuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
lock 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
Programmer Type : Arduino
Description : Arduino
avrdude: stk500_recv(): programmer is not responding
Hardware Version: 77890875
Firmware Version: 6.2
Vtarget : 0.3 V
Varef : 0.3 V
Oscillator : 28.800 kHz
SCK period : 3.3 us
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: reading input file "/var/folders/tt/p5q4jr0x25x6xfh0smkyc2kc0000gn/T/arduino_build_155687/Blink.ino.hex"
avrdude: writing flash (924 bytes):
Writing | ################################################## | 100% 0.28s
avrdude: 924 bytes of flash written
avrdude: verifying flash memory against /var/folders/tt/p5q4jr0x25x6xfh0smkyc2kc0000gn/T/arduino_build_155687/Blink.ino.hex:
avrdude: load data flash data from input file /var/folders/tt/p5q4jr0x25x6xfh0smkyc2kc0000gn/T/arduino_build_155687/Blink.ino.hex:
avrdude: input file /var/folders/tt/p5q4jr0x25x6xfh0smkyc2kc0000gn/T/arduino_build_155687/Blink.ino.hex contains 924 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 0.20s
avrdude: verifying ...
avrdude: 924 bytes of flash verified
avrdude done. Thank you.
update. Looks like reburning the bootloader with arduino IDE using USBTinyISP solved the problem. Now it works fine programming in platformio as well.
Configuration
Ubuntu 20.04
PlatformIO Version (
platformio --version
):PlatformIO, version 5.0.1
Description of problem
Unable to upload to Adafruit feather328p The Arduino IDE succeeds.
Steps to Reproduce
Attempt to upload standard Blink sketch
Actual Results
Expected Results
If problems with PlatformIO Build System:
The content of
platformio.ini
:Source file to reproduce issue:
Additional info