ESP32
Arduino Setup:
On a PC you can use the board manager, with the following URL
https://dl.espressif.com/dl/package_esp32_index.json
On ARM (raspberry PI) the crosscompile toolchain is not available, although all other components are:
edit "package.json" to remove "xtensa-esp32-elf" as a dependency.
Build the toolchain yourself, following the guide https://docs.espressif.com/projects/esp-idf/en/latest/get-started/linux-setup.html
Install from arduino board manager
edit the esp32 platform.txt" to set the {runtime.tools.xtensa-esp32-elf-gcc.path} correctly (for your installation).
You can now compile and upload as normal
arduino-cli compile -b esp32:esp32:esp32 ~/Arduino/MySketch
arduino-cli upload -p /dev/ttyUSB0 -b esp32:esp32:esp32 ~/Arduino/MySketch
Their is currently a bug that prevents upload, since partitions.bin is in the wrong place, in the mean time:
$HOME/.arduino15/packages/esp32/tools/esptool_py/2.6.0/esptool.py --port /dev/ttyUSB0 write_flash 0x10000 ~/Arduino/tst/tst.esp32.esp32.esp32.bin