Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upload_port is not honored without a framework specified #313

Closed
countrodrigo opened this issue Oct 26, 2015 · 6 comments
Closed

upload_port is not honored without a framework specified #313

countrodrigo opened this issue Oct 26, 2015 · 6 comments
Assignees
Labels
Milestone

Comments

@countrodrigo
Copy link

The upload_port environment option doesn't seem to be honored when not using a framework. Here is my platform.ini:

[env:arduino_pro5v]
platform = atmelavr

#framework = arduino
#board = uno

board_mcu = atmega328
board_f_cpu = 16000000L

upload_protocol = arduino
upload_port = /dev/cu.usbmodem1451
upload_speed = 115200

targets = upload

If I use the framework and board options that are commented instead of the direct settings, it works just fine.

The avrdude command it tries to run is:
/Users/countrodrigo/.platformio/packages/tool-avrdude/avrdude" -v -p atmega328 -C "/Users/countrodrigo/.platformio/packages/tool-avrdude/avrdude.conf" -c arduino -b 115200 -D -U flash:w:.pioenvs/arduino_pro5v/firmware.hex:i
This is missing the -P option. If I run that command manually and pass the -P /dev/cu.usbmodem1451, then it can program the device just fine.

@ivankravets ivankravets self-assigned this Oct 26, 2015
@ivankravets ivankravets added this to the 2.4.0 milestone Oct 26, 2015
@ivankravets
Copy link
Member

Thanks for the report, I see this bug. However, this issue isn't linked with missed framework option, but with missed board option. Try to specify similar board to you hardware which is listed in platformio boards.

@ivankravets
Copy link
Member

Please re-test it in the latest develop version http://docs.platformio.org/en/latest/installation.html#development-version

@alexbonhomme
Copy link

@ivankravets Seems to be se same problem when using target = program or -t program. As @countrodrigo says the -P argument is missing. If I use upload_flags to specified the upload port everything works as expected.

[env:attiny85]
platform = atmelavr
board = attiny85
board_f_cpu = 8000000L
framework = arduino
targets = program

upload_protocol = buspirate
upload_speed = 115200

; do not works
upload_port = "/dev/cu.usbserial-A7036H51"

; works
upload_flags = "-P/dev/cu.usbserial-A7036H51"

@ivankravets
Copy link
Member

People don't like to read documentation http://docs.platformio.org/en/latest/platforms/atmelavr.html#upload-using-programmer

@alexbonhomme
Copy link

People don't often like this kind of comments too.

The documentation isn't that obvious (as you think it is). There is some examples with the -P flags, others without and others with -P and -b one. There is not clear explanation saying that the upload_port doesn't work as expected.

I would do a PR about it. Thanks for your help.

@ivankravets
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants