-
-
Notifications
You must be signed in to change notification settings - Fork 799
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 to Arduino embedded custom board #221
Comments
Hi @ncolomer ! Your board is similar to Ardino Uno, so just try to add
|
@ncolomer please upgrade PlatformIO to [env:WeatherMote_v01]
platform = atmelavr
framework = arduino
board = uno
upload_protocol=usbasp -B5
build_flags = -Llibs -DDEBUG -Wl,-u,vfprintf -lprintf_flt
targets = upload P.S: Thanks a lot for your reported issues. It allows us to improve PlatformIO. |
Thanks @valeros @ivankravets for your answers! Well I really enjoy using platformio for my electronic projects since i'm also a dev and I know build tools are always welcome, especially when dealing with C/C++ and embedded stuff! PlatformIO simplify a lot of things and gives a clear and featureful framework for hobbyists like me. I really want to use it in all my projects... and give as much help as I can :) You're doing great, guys! So, now it compiles, but upload fails:
Fuses are what I set previously using AVRFuses software. I suppose they are not overridden. What if I want to specify others? Do I still need stuff like AVRFuses?
I have a doubt with this frequency (we program Arduino at 19200 bauds, no?), but I suppose it's the default value.
So there is a mismatch during verification that let me think the writing goes wrong. The following command is run by PlatformIO (and its embedded avrdude): And the following command is what is run by AVRFuses when burning a There is some difference, including CLI options, but I can't really explain them. |
Have you tried this? [env:WeatherMote_v01]
platform = atmelavr
framework = arduino
board = uno
upload_protocol=usbasp-clone
build_flags = -Llibs -DDEBUG -Wl,-u,vfprintf -lprintf_flt
targets = upload |
Nop :( The
Full log output:
Here is the output when I use AVRFuses:
|
Thanks, let's try a few variants: a) "/Users/ncolomer/.platformio/packages/tool-avrdude/avrdude" -v -p atmega328p -C "/Users/ncolomer/.platformio/packages/tool-avrdude/avrdude.conf" -c usbasp-clone -U flash:w:.pioenvs/WeatherMote_v01/firmware.hex:i b) "/usr/local/Cellar/avrdude/6.1/bin/avrdude" -v -p atmega328p -C "/Users/ncolomer/.platformio/packages/tool-avrdude/avrdude.conf" -c usbasp-clone -U flash:w:.pioenvs/WeatherMote_v01/firmware.hex:i c) "/Users/ncolomer/.platformio/packages/tool-avrdude/avrdude" -v -p atmega328p -C "/usr/local/Cellar/avrdude/6.1/etc/avrdude.conf" -c usbasp-clone -U flash:w:.pioenvs/WeatherMote_v01/firmware.hex:i d) "/usr/local/Cellar/avrdude/6.1/bin/avrdude" -v -c usbasp-clone -p ATmega328P -U flash:w:.pioenvs/WeatherMote_v01/firmware.hex:i All commands should be performed from project directory where |
(sorry for the delay) Here are the output of commands a) is ok
b) is ok
c) is ko
I don't really explain why, line 999 seems ok:
d) is ok
|
Thanks a lot! Could you try new |
|
Thanks! 👍 |
I have build a custom board powered with an
atmega328p
. Currently, I program it over ISP by uploading platformio's generated.hex
file via an USBasp v2 clone and AVRFuses software.I'm looking for doing the upload task directly via platformio using the
upload
target. I saw in the Project Configuration Fileplatformio.ini
documentation that some parameters (such asboard_mcu
,board_f_cpu
,upload_protocol
orupload_speed
) could help. But it is ever possible? In addition, it is possible to set MCU fuses?The two following examples mentioned in the page above seem close to what I want to achieve:
But I can't make them running: either I mention the
framework = arduino
entry inplatformio.ini
file and I have the following error:or I do not mention it and the compilation fails since I'm relying on Arduino libs in my program:
Any hints, idea (or simply can't do this way)?
The text was updated successfully, but these errors were encountered: