-
-
Notifications
You must be signed in to change notification settings - Fork 801
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
Setting upload speed disables autoerase for flash memory #311
Comments
See related issue where If you don't need this option, you can remove it using extra-script. from os.path import join
from SCons.Script import DefaultEnvironment
env = DefaultEnvironment()
env.Replace(
UPLOADERFLAGS_MY=[
"-v",
"-p", "$BOARD_MCU",
"-C",
'"%s"' % join("$PIOPACKAGES_DIR", "tool-avrdude", "avrdude.conf"),
"-c", "$UPLOAD_PROTOCOL",
"-b", "$UPLOAD_SPEED",
"-P", "$UPLOAD_PORT"
],
UPLOADHEXCMD='"$UPLOADER" $UPLOADERFLAGS_MY -U flash:w:$SOURCES:i'
) P.S: I've not tested it. It just a hint. |
I can't get the extra-script to working, your example fails with I'm not familiar with SCons, so I haven't yet figured out how to work it around. |
Are you sure that Arduino IDE needs |
I've just tested it, sorry. Please see updated comment #311 (comment) |
Now it works (I just had to add Do you consider this use case as something that PlatformIO should supports? It would be great to do it without custom scripts. |
Which is default behaviour of Arduino IDE? |
It seems it depends if you program Arduino itself ( (from
I hope I understand it correctly, I'm not very familiar with this. |
Thanks. I will implement it via additional target named |
That makes sense. Thank you. |
Please re-test it using the latest development version http://docs.platformio.org/en/latest/installation.html#development-version |
Sorry for the delay. It works perfectly now. Thank you. |
Thanks for the report and that using @platformio |
I'm using PlatformIO to upload to standalone ATmega328p using Adruino Nano as programmer.
My env config:
With this config,
platformio run -t upload
fails with following error:The avrdude command is this:
I've figured out that if I remove '-D' command line option from avrdude command, it works fine.
When upload_speed is defined, the '-D' is automatically inserted:
https://github.com/platformio/platformio/blob/release/v2.3.4/platformio/builder/scripts/atmelavr.py#L35
The text was updated successfully, but these errors were encountered: