Until a JSON installation file is created, the old way of
installing into the Arduino filesystem is required.
Make sure your user ID is a member of the dialout group so you can access the serial port devices.
NOTE: is python[3]-pip and python[3]-pyserial installed???
Create an espressif directory within your Arduino environment.
In my case:
mkdir /opt/arduino-1.8.1P/hardware/espressif
cd into the espressif directory.
Use 'git' to install the arduino ESP32 support...
git clone https://github.com/espressif/arduino-esp32.git esp32
cd into esp32 directory.
git submodule update --init --recursive
cd into the esp32/tools directory.
Using python install the ESP32 Development tools...
python get.py
voila
Update to the latest arduino ESP32 support from within the esp32 directory...
git pull origin
Update to the latest ESP-IDF development tools from within the esp32/tools directory using...
python get.py
cd /opt/esp32
Install the cross development tools...
git clone -b xtensa-1.22.x https://github.com/espressif/crosstool-NG.git
cd crosstool-NG
./bootstrap
./configure --prefix=$PWD
make install
sudo cp ct-ng.comp /etc/bash_completion.d
More info TBD
Using Arduino libraries most likely will need rewriting to take advantage of more powerful CPU features that the simplistic AVR ones don't have.
ESP32 has 2 cores and most AVR based libraries don't handle this feature. ESP32 uses mutex locking to access hardware (HAL) features. AVR based libraries would cause mutex locking on byte basis instead of block basis, resulting in a bogged down performance for things like SPI. Thus libraries should be rewritten, or written specifically for the ESP32 to reduce overhead, by implementing multi-byte transfers
Until then, a work around, if it doesn't cause other grief, is to turn off mutex locking
by adding the following line in esp32-hal.h
#define CONFIG_DISABLE_HAL_LOCKS 1
includes may need to be wrapped in
extern "C" {}
More info TBD