This repository contains the scripts that produce the libraries included with esp32-arduino.
This repository is a variant of the espressif/esp32-arduino-lib-builder.
It contains modifications:
-
Redirects Terminal output infos to serveral files to see what is going on during build without get flooded:
- log_errors.txt : Errors of any kind.
- log_instEnviroment.txt : Log when loading and build the enviroment.
- log_idfBuild.txt : Log when bulding with ipf.py
- log_pythonBuild.txt: : Log when building with python3.
-
Modified
/tools/config.sh
to use standerd IDF & Adruiono-Branches in case you don't set his only our own withbuild.sh
-options.if [ -z $IDF_BRANCH ]; then IDF_BRANCH="release/v5.3" fi if [ -z $AR_PR_TARGET_BRANCH ]; then AR_PR_TARGET_BRANCH="release/v3.1.x" fi
-
Get it running in macOS
-
Using
osascript
- what is macOS-specific - to open the ouputs in diffrent terminals. -
Needs install of Add-on: twischi/addOns-esp32_AR_lib-builder
- Hint: It is included in Run-Build section below.
-
Runs the script
postBuild_AggregatedFolders.sh
what is located here:/../addOns-esp32_AR_lib-builder/
- Hint: Needs the script intalled:
- One folder UP:
/../
(from folder executing the build.sh) - Expecting to find:
addOns-esp32_AR_lib-builder
- One folder UP:
- Hint: Needs the script intalled:
- macOS Moneytary running on Intel
- macOS Ventura running on ARM/M1
-
Install Xcode as it provide the needed build cababilities
-
This tools are already installed with macOS or XCode: git, flex, bison, gperf
- You and simply check if installed example: git --version
-
Install Phython for macOS
- Don't forget to update the Certificates with 'Install Certificates.command' after installation!
-
Install with Homebrew
# See what already is installed brew list # All brew list wget # Check a certain package # Install what is missing - ONE BY ONE!!! NOT in one line!! like here.. brew install wget, curl, openssl, ncurses, cmake, ninja, ccache, jq, gsed, gawk, dfu-util
-
Install Python-Modules with pip
sudo pip install --upgrade pip
New module is required for esp-idf
sudo pip install pyclang
git clone https://github.com/twischi/esp32-arduino-lib-builder
git clone https://github.com/twischi/addOns-esp32_AR_lib-builder.git
cd esp32-arduino-lib-builder
./build.sh
You can more easily build the libraries using the user interface found in the tools/config_editor/
folder.
It is a Python script that allows you to select and edit the options for the libraries you want to build.
The script has mouse support and can also be pre-configured using the same command line arguments as the build.sh
script.
For more information and troubleshooting, please refer to the UI README.
To use it, follow these steps:
- Make sure you have the following prerequisites:
- Python 3.9 or later
- All the dependencies listed in the previous section
-
Install the required UI packages using
pip install -r tools/config_editor/requirements.txt
. -
Execute the script
tools/config_editor/app.py
from any folder. It will automatically detect the path to the root of the repository. -
Configure the compilation and ESP-IDF options as desired.
-
Click on the "Compile Static Libraries" button to start the compilation process.
-
The script will show the compilation output in a new screen. Note that the compilation process can take many hours, depending on the number of libraries selected and the options chosen.
-
If the compilation is successful and the option to copy the libraries to the Arduino Core folder is enabled, it will already be available for use in the Arduino IDE. Otherwise, you can find the compiled libraries in the
esp32-arduino-libs
folder alongside this repository.
- Note that the copy operation doesn't currently support the core downloaded from the Arduino IDE Boards Manager, only the manual installation from the
arduino-esp32
repository.
For more information about how to use the Library builder, please refer to this Documentation page