platformio / platform-atmelavr

Atmel AVR: development platform for PlatformIO
https://registry.platformio.org/platforms/platformio/atmelavr
Apache License 2.0
138 stars 105 forks source link

Feature Request - Upload using Programmer - Auto Negotiate Port #162

Open Sn3akyP3t3 opened 5 years ago

Sn3akyP3t3 commented 5 years ago

Feature Request Currently PlatformIO auto detects the appropriate port when uploading code to a specified board such as the Arduino UNO. Similarly I seems reasonable that the same port should be automatically detected for known boards when using the "Upload using Programmer" options. I'm not sure how this is actually being done, but parsing the available known PIDs:VIDs should get a solid match. The "Upload using Programmer" options mentioned are specified on https://docs.platformio.org/en/latest/platforms/atmelavr.html#upload-using-programmer

The end result when functional would alleviate the need to specify the upload port (and possibly speed as well). The resulting configuration would then be slightly more straightforward like so:

[env:attiny85env]
platform = atmelavr
board = attiny85
framework = arduino
upload_protocol = stk500v1
; each flag in a new line
upload_flags =
-b$UPLOAD_SPEED

; edit this maybe?
upload_speed = 19200