Closed sticilface closed 6 years ago
as a temporary fix using this as the upload_flags works :)
upload_flags = -P$UPLOAD_PORT" -b"$UPLOAD_SPEED
or even... the upload speed is optional so just leave
upload_flags = -P$UPLOAD_PORT
and it works
also... the pio command uses both flags -D and -e
-D: This disables erasing the chip before programming. We don't want that so don't use this command switch.
-e: This erases the chip, in general we don't use this because we auto-erase the flash before programming.
taken from http://www.ladyada.net/learn/avr/avrdude.html
Is this not counter productive? The arduino IDE does not use either of these
I have also run into an issue with the avrdude command line being invalid.
In --verbose output, pio sends this command:
avrdude "-U lfuse:w:0xe2:m -U hfuse:w:0x5f:m -U efuse:w:0xff:m" -v -p attiny85 -C /home/justin/.platformio/packages/tool-avrdude/avrdude.conf -c usbtiny -e -D -U flash:w:.pioenvs/attiny85/firmware.hex:i
Which complains about in invalid parameter for lfuse.
In my platformio.ini I have:
upload_flags = -U lfuse:w:0xe2:m -U hfuse:w:0x5f:m -U efuse:w:0xff:m
If I change the avrdude to this, without the upload_flags in quotes, it works:
avrdude -U lfuse:w:0xe2:m -U hfuse:w:0x5f:m -U efuse:w:0xff:m -v -p attiny85 -C /home/justin/.platformio/packages/tool-avrdude/avrdude.conf -c usbtiny -e -D -U flash:w:.pioenvs/attiny85/firmware.hex:i
As of 7/29/2018, I have run pio update/upgrade for the latest versions of everthing. avrdude ver 6.3.
This issue started effecting projects I have had working for over a year and appears to be related to @sticilface identified issue of stray "
.
See docs http://docs.platformio.org/en/latest/projectconf/section_env_upload.html
Please put each argument in the new line
ah ok.. in that case could you change the AVR documentation which shows it on one line http://docs.platformio.org/en/latest/platforms/atmelavr.html#upload-using-programmer
for Arduino as ISP and bus pirate
upload_protocol = buspirate
upload_flags = -P$UPLOAD_PORT -b$UPLOAD_SPEED
pio ini file
output verbose
cause of error
"
incomplete in avrdude command parametersremoving the
"
results in upload