Sming Esp32 Architecture
Support building Sming for the Esp32 architecture.
This contains the base directory for the ESP-IDF toolchain used to build the framework. This variable is required and must be set accordingly.
Custom SDK settings for a project can be defined in a separate file and setting this value to the location, relative to the project source root directory.
These will be added to the default SDK settings.
To make the settings current, you must run
make sdk-config-clean. This will discard any changes made via
In order to be able to compile for the ESP32 architecture you should have ESP-IDF v4.3 installed. Some slight changes are required to enable code to compile correctly for C++, so a fork has been created here https://github.com/mikee47/esp-idf/tree/sming/release/v4.3 which you may clone.
The Sming installers do all this for you - see Getting Started.
You can find further details in the ESP-IDF documentation.
Make sure that the
IDF_PATH is set.
Also make sure that the other ESP-IDF environmental variables are set.
In Linux this can be done using the following command:
Build the framework and application as usual, specifying
SMING_ARCH =Esp32. For example:
cd $SMING_HOME/../samples/Basic_Serial make SMING_ARCH=Esp32
This builds the application. Once built the application needs to be flashed on a real Esp32 microcontroller to run. Flashing can be done using the following command:
Sming comes with pre-compiled libraries and configuration files. If needed you can re-configure ESP-IDF using the command below:
make SMING_ARCH=Esp32 sdk-menuconfig
A re-compilation is required after the change of the configuration. This can be done with the following command:
make SMING_ARCH=Esp32 Sming-build all
If you want to revert to using the default SDK settings then issue the following command:
make SMING_ARCH=Esp32 sdk-config-clean
You can also configure per-project custom settings via
Sming leverages the ESP IDF HAL to support multiple processor variants.
This is still at an early stage of development however basic applications should build for the following variants:
You can change variants like this:
Each variant uses a different build directory, e.g.
out/Esp32/esp32c3/... to avoid conflicts.
See Esp32 Core Component for further details.
Sming currently supports IDF versions 4.3, 4.4 and 5.0.
The default installed IDF version is 4.4. This can be changed as follows:
INSTALL_IDF_VER=5.0 $SMING_HOME/../Tools/install.sh esp32
The installation script creates a soft-link in
/opt/esp-idf pointing to the last version installed.
Use the IDF_PATH environment variable or change the soft-link to select which one to use.
After switching versions, run make clean components-clean before re-compiling.
Currently, switching from version 4.x to 5.0 or vice-versa requires an additional step as they use different versions of the ‘pyparsing’ Python library.
If moving from IDF 4.x to 5.0:
python -m pip install --upgrade pyparsing
Moving from IDF 5.0 to 4.x:
python -m pip install 'pyparsing<2.4'