This repository contains the scripts that produce the SDK included with esp32-arduino. It not only supports local compilation but also provides an automated compilation and SDK download process through GitHub Actions.
If you want to directly use the precompiled SDK based on the branches below, please check the arduino-esp32-SDK repository.
In comparison to the original esp32-arduino-lib-builder, this repository is used for recompiling specific versions of the SDK in arduino-esp32
and has the following branches:
-
release/*
is used to recompile the original SDK for a specified version. -
high_perf/*
is used to recompile high performance versions based on a specified SDK version. It changes some configurations (as below) and can achieve higher performance in some cases, especially for avoiding screen drifting when using RGB LCDs. (Only available for v3.x and above versions)- For ESP32-S3 SoCs:
- All:
- It changes the optimization level from
-Os
to-O2
by enablingCONFIG_COMPILER_OPTIMIZATION_PERF=y
. - It increases the size of the data cache line from
32
to64
by enablingCONFIG_ESP32S3_DATA_CACHE_LINE_64B=y
.
- It changes the optimization level from
- For ESP32-S3R8 (Octal PSRAM):
- It enables the function XIP on PSRAM by enabling
CONFIG_SPIRAM_FETCH_INSTRUCTIONS=y
andCONFIG_SPIRAM_RODATA=y
.
- It enables the function XIP on PSRAM by enabling
- All:
- For ESP32-S3 SoCs:
As only v3.x and above versions support the required high-performance configurations, the branches here are only used for compiling the high_perf version of v3.x.
- Click
Fork
to fork this repository into your account.
- Uncheck the
Copy the master branch only
option and clickCreate fork
.
- If you want to change the default configurations, follow the below steps:
-
Choose a branch based on the version you want to recompile. Here take
release/v3.0.0-alpha3
as an example. -
To change the default configurations, mofify the files in the
configs
folder based on your application requirements. -
Commit the changes.
-
Select
Create a new branch for this commit and start a pull request
, change the branch name if needed and clickPropose changes
. -
Do not create a pull request, just click
Action
. Here you can see the compilation process. (Default to compile all targets)
- If you don't need to change the default configurations or just want to compile a specific target, follow the below steps:
-
Click
Actions
, here are two workflows,Manual Build SDK For (v2) the Specific Target
is used to compile the v2.x version, andManual Build SDK For (v3) the Specific Target
is used to compile the v3.x version. -
If you want to compile the v2.x version, click
Manual Build SDK For (v2) the Specific Target
, then clickRun workflow
. Here you can select the branch (only available for thexx/v2.x.x
branches) and the target. -
If you want to compile the v3.x version, click
Manual Build SDK For (v3) the Specific Target
, then clickRun workflow
. Here you can select the branch (only available for thexx/v3.x.x
branches), the target and log level. So there are nodebug/v3.x.x
branches, you can specify the log level when compiling. -
Then the compilation process will start. After it is complete, download the zip file from the
Artifacts
.
- To replace the original SDK, please refer to the steps for more details.
- Choose a branch version based on your application requirements and download it to the local.
- Modify the files in the
configs
folder based on your application requirements. - Consult its README for compilation instructions. Note that the process involves downloading
ESP-IDF
,arduino-esp32
, and several large components, which may take a considerable amount of time. Please be patient. - After the compilation is complete, the SDK will be located in the
out
folder. - To replace the original SDK, please refer to the steps for more details.