Like make for not ESP Arduino target, is there a CLI command like esptool.py to upload in the hardware ?
I've seen makeEspArduino but seems to be not trivial ?
What about espressif ESP32 component ?
Is Visual Micro Arduino CLI (Command Line Interface) tool mature ?
-
Have you looked at github.com/arduino/arduino-builder/wiki/…Craig– Craig2018年04月05日 21:34:25 +00:00Commented Apr 5, 2018 at 21:34
-
Thanx Craig. I'll have a deep look...E.Racineux– E.Racineux2018年04月06日 22:57:02 +00:00Commented Apr 6, 2018 at 22:57
1 Answer 1
Easiest answer: Use PlatformIO. (Yes this answer is technically an advertisement, but it is the correct solution here.).
Why not the others?
makeEspArduino
is dependent on GNUmake
, hard to make modification to, hard to get support for when something goes wrong- Visual Micro Arduino is Visual Studio extension, thus native to Windows
Why PlatformIO?
On the other hand, PIO is just a framework written in python2, runs on Windows, Mac & Linux alike and supports tons of boards and frameworks. Not only is it OS-agnostic but it also IDE agnostic. It exports project files for Eclipse, Visual Studio Code, CLion, Visual Studio, Sublime, Atom and other IDEs. The Arduino IDE will always be only a (bad) syntax highlighter.
Support boards (479 of them) range from Arduino Unos to ESP8266/ESP32 over to STM32 and nRF boards. It's also possible to compile one firmware for different environments (board), so with a well-written firmware, PIO can generate firmwares for multiple boards and frameworks alike. Frameworks include Arduino cores, ESP-IDF, STM32HAL and more.
To create a new project, you'd do
user@somefolder/$ pio init --board=nodemcuv2 --ide=vscode
To compile from CLI, you just have to execute the run
target:
user@somefolder/$ pio run
To upload you'd just
user@somefolder/$ pio run -t upload
With optional --upload-port=/dev/ttyUSB0
or alike. Updating wirelessly over ArduinoOTA is also supported.
Video: https://www.youtube.com/watch?v=EIkGTwLOD7o
Documentation: http://docs.platformio.org/en/latest/
-
Thanx a lot Maximilian Gerhardt for this complete answerE.Racineux– E.Racineux2018年04月06日 22:58:20 +00:00Commented Apr 6, 2018 at 22:58