0

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 ?

2
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 GNU make, 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/

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.