platformio / platform-atmelavr

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

Use arduino-cli #107

Open justind000 opened 5 years ago

justind000 commented 5 years ago

Using the new arduino-cli tool will make supporting newer chips much easier.

https://github.com/arduino/arduino-cli for more information.

I don't know enough about the build process to use it within PlatformIO, but it would make supporting more chips easier since the majority of effort goes to making arduino projects compile in the Arduino IDE. If it compiles there, it can compile with the arduino-cli.

Example: arduino-cli compile -b arduino:avr:pro:cpu=16MHzatmega328 src/ will compile the sketch in src

There are similar commands to upload etc.

I don't expect this to replace the build system, however I think if a build target for this was created that allowed easy modification of the command line, it would let people use many more chips which are currently unsupported in PlatformIO, but are within the Arduino IDE. Maybe something like this in platformio.ini


[env:arduino-cli]
platform = arduino-cli
build_flags = compile -b arduino:avr:pro:cpu=16MHzatmega328
aster94 commented 5 years ago

I propose to move this issue to the platformio core The arduino cli could be used on all boards not only avr