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 ?

asked Apr 5, 2018 at 20:55
2

1 Answer 1

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/

answered Apr 5, 2018 at 21:35
1
  • Thanx a lot Maximilian Gerhardt for this complete answer Commented Apr 6, 2018 at 22:58

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.