Closed koppa closed 5 years ago
Do you use pio run -t program
instead of pio run -t upload
? See https://docs.platformio.org/en/latest/platforms/atmelavr.html#upload-using-programmer
No I used pio run -t upload
.
The problem is the code for flushing the serial port is executed, and for user it is not obvious, that this part fails. In my opinion flushing should only be done for programmers, where the build script is sure, that this is a serial device (maybe only do it explicitly?)
Please use pio run -t program
.
Version: platform-atmelavr stable and master.
When using a avr programmer without serial interface like the dragon_isp, the following lines fail in
builder/main.py
:FlushSerialBuffer
will be called and fails, due toupload_port=usb
(in the project config):*** [upload] could not open port usb: [Errno 2] No such file or directory: 'usb'
When disabling the FlushSerialBuffer for usb devices, everything works correctly.