Skip to content

updates #93

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 18 commits into from
Apr 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ To use it, follow these steps:

5. 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.

6. 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`](https://github.com/espressif/arduino-esp32) repository.
6. If the compilation is successful you can find the Platformio framework in the `dist` folder alongside this repository.


### Documentation

Expand Down
38 changes: 4 additions & 34 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,8 @@ export TARGET="all"
BUILD_TYPE="all"
SKIP_ENV=0
COPY_OUT=0
ARCHIVE_OUT=0
if [ -z $DEPLOY_OUT ]; then
DEPLOY_OUT=0
fi
ARCHIVE_OUT=1
DEPLOY_OUT=0

function print_help() {
echo "Usage: build.sh [-s] [-A <arduino_branch>] [-I <idf_branch>] [-i <idf_commit>] [-c <path>] [-t <target>] [-b <build|menuconfig|reconfigure|idf-libs|copy-bootloader|mem-variant>] [config ...]"
Expand All @@ -26,8 +24,6 @@ function print_help() {
echo " -I Set which branch of ESP-IDF to be used for compilation"
echo " -i Set which commit of ESP-IDF to be used for compilation"
echo " -e Archive the build to dist"
echo " -d Deploy the build to github arduino-esp32"
echo " -c Set the arduino-esp32 folder to copy the result to. ex. '$HOME/Arduino/hardware/espressif/esp32'"
echo " -t Set the build target(chip) ex. 'esp32s3' or select multiple targets(chips) by separating them with comma ex. 'esp32,esp32s3,esp32c3'"
echo " -b Set the build type. ex. 'build' to build the project and prepare for uploading to a board"
echo " ... Specify additional configs to be applied. ex. 'qio 80m' to compile for QIO Flash@80MHz. Requires -b"
Expand All @@ -39,16 +35,9 @@ while getopts ":A:I:i:c:t:b:sde" opt; do
s )
SKIP_ENV=1
;;
d )
DEPLOY_OUT=1
;;
e )
ARCHIVE_OUT=1
;;
c )
export ESP32_ARDUINO="$OPTARG"
COPY_OUT=1
;;
A )
export AR_BRANCH="$OPTARG"
;;
Expand Down Expand Up @@ -275,13 +264,6 @@ done

export IDF_COMMIT=$(git -C "$IDF_PATH" rev-parse --short HEAD)

# update package_esp32_index.template.json
if [ "$BUILD_TYPE" = "all" ]; then
python3 ./tools/gen_tools_json.py -i "$IDF_PATH" -j "$AR_COMPS/arduino/package/package_esp32_index.template.json" -o "$AR_OUT/"
python3 ./tools/gen_tools_json.py -i "$IDF_PATH" -o "$TOOLS_JSON_OUT/"
if [ $? -ne 0 ]; then exit 1; fi
fi

# Generate PlatformIO library manifest file
if [ "$BUILD_TYPE" = "all" ]; then
python3 ./tools/gen_pio_lib_manifest.py -o "$TOOLS_JSON_OUT/" -s "v$IDF_VERSION" -c "$IDF_COMMIT"
Expand All @@ -305,20 +287,8 @@ echo "#define ARDUINO_ESP32_GIT_VER 0x$AR_Commit_short
#define ARDUINO_ESP32_RELEASE_$AR_VERSION_UNDERSCORE
#define ARDUINO_ESP32_RELEASE \"$AR_VERSION_UNDERSCORE\"" >> "$AR_ROOT/core_version.h"

# copy everything to arduino-esp32 installation
if [ $COPY_OUT -eq 1 ] && [ -d "$ESP32_ARDUINO" ]; then
./tools/copy-to-arduino.sh
if [ $? -ne 0 ]; then exit 1; fi
fi

# push changes to esp32-arduino-libs and create pull request into arduino-esp32
if [ $DEPLOY_OUT -eq 1 ]; then
./tools/push-to-arduino.sh
if [ $? -ne 0 ]; then exit 1; fi
fi

# archive the build
if [ "$BUILD_TYPE" = "all" ]; then
./tools/archive-build.sh
if [ $ARCHIVE_OUT -eq 1 ]; then
./tools/archive-build.sh "$TARGET"
if [ $? -ne 0 ]; then exit 1; fi
fi
13 changes: 2 additions & 11 deletions configs/builds.json
Original file line number Diff line number Diff line change
Expand Up @@ -131,26 +131,17 @@
{
"target": "esp32s3",
"features":[],
"idf_libs":["qio","80m","opi_ram"],
"idf_libs":["qio","120m","opi_ram"],
"bootloaders":[
["qio","120m","qio_ram"],
["qio","120m","opi_ram"],
["qio","80m","qio_ram"],
["qio","80m","opi_ram"],
["opi","120m","qio_ram"],
["opi","120m","opi_ram"],
["opi","80m","qio_ram"],
["opi","80m","opi_ram"]
],
"mem_variants":[
["qio","120m","qio_ram"],
["qio","120m","opi_ram"],
["qio","80m","qio_ram"],
["qio","80m","opi_ram"],
["opi","120m","qio_ram"],
["opi","120m","opi_ram"],
["opi","80m","qio_ram"],
["opi","80m","opi_ram"]
["opi","120m","qio_ram"]
]
}
]
Expand Down
1 change: 1 addition & 0 deletions configs/defconfig.common
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ CONFIG_TEMP_SENSOR_SUPPRESS_DEPRECATE_WARN=y
CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_SIZE=y
CONFIG_COMPILER_OPTIMIZATION_SIZE=y
CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE=y
CONFIG_COMPILER_OPTIMIZATION_CHECKS_SILENT=y
CONFIG_COMPILER_STACK_CHECK_MODE_NONE=y
# CONFIG_COMPILER_WARN_WRITE_STRINGS is not set
# CONFIG_ESP_ERR_TO_NAME_LOOKUP is not set
Expand Down
1 change: 0 additions & 1 deletion configs/defconfig.dout

This file was deleted.

2 changes: 1 addition & 1 deletion configs/defconfig.esp32
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
CONFIG_BT_ENABLED=y
CONFIG_BT_STACK_NO_LOG=y
# CONFIG_BT_BLE_42_FEATURES_SUPPORTED is not set
# CONFIG_BLE_MESH is not set
# CONFIG_BLE_MESH is not set
CONFIG_BT_NIMBLE_ENABLED=y
CONFIG_BT_NIMBLE_LOG_LEVEL_NONE=y
CONFIG_BT_NIMBLE_MAX_CONNECTIONS=1
Expand Down
4 changes: 3 additions & 1 deletion configs/defconfig.esp32c2
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
CONFIG_XTAL_FREQ_26=y
CONFIG_XTAL_FREQ=26

CONFIG_COMPILER_FLOAT_LIB_FROM_RVFPLIB=y

#
# Bluetooth
#
CONFIG_BT_ENABLED=y
CONFIG_BT_STACK_NO_LOG=y
# CONFIG_BT_BLE_42_FEATURES_SUPPORTED is not set
# CONFIG_BLE_MESH is not set
# CONFIG_BLE_MESH is not set
CONFIG_BT_NIMBLE_ENABLED=y
CONFIG_BT_NIMBLE_LOG_LEVEL_NONE=y
CONFIG_BT_NIMBLE_MAX_CONNECTIONS=1
Expand Down
2 changes: 2 additions & 0 deletions configs/defconfig.esp32c6
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# C6 has full Newlib in Rom
# CONFIG_NEWLIB_NANO_FORMAT is not set

CONFIG_COMPILER_FLOAT_LIB_FROM_RVFPLIB=y

# Enable LP Core
CONFIG_ULP_COPROC_ENABLED=y
CONFIG_ULP_COPROC_TYPE_LP_CORE=y
Expand Down
37 changes: 0 additions & 37 deletions configs/defconfig.esp_sr

This file was deleted.

11 changes: 10 additions & 1 deletion configs/defconfig.opi_ram
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
CONFIG_SPIRAM_MODE_OCT=y
CONFIG_SPIRAM_IGNORE_NOTFOUND=y
# CONFIG_SPIRAM_MEMTEST is not set
# CONFIG_SPIRAM_MEMTEST is not set
CONFIG_LCD_RGB_ISR_IRAM_SAFE=y
CONFIG_GDMA_CTRL_FUNC_IN_IRAM=y
# bounce buffer mode relies on GDMA EOF interrupt to be service-able
CONFIG_GDMA_ISR_IRAM_SAFE=y
# place non-ISR FreeRTOS functions in Flash
CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y
# Enable the XIP-PSRAM feature, so the ext-mem cache won't be disabled when SPI1 is operating the main flash
CONFIG_SPIRAM_FETCH_INSTRUCTIONS=y
CONFIG_SPIRAM_RODATA=y
1 change: 0 additions & 1 deletion configs/defconfig.qout

This file was deleted.

121 changes: 0 additions & 121 deletions tools/add_sdk_json.py

This file was deleted.

4 changes: 3 additions & 1 deletion tools/archive-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ cp ../core_version.h arduino-esp32/cores/esp32/core_version.h
mv arduino-esp32/ framework-arduinoespressif32/
cd framework-arduinoespressif32/libraries
rm -rf **/examples
cd ../../
cd ../tools/esp32-arduino-libs
rm -rf **/flags
cd ../../../
# If the framework is needed as tar.gz uncomment next line
# tar --exclude=.* -zcf ../$pio_archive_path framework-arduinoespressif32/
7z a -mx=9 -tzip -xr'!.*' ../$pio_zip_archive_path framework-arduinoespressif32/
Loading