From 083c6de8fe8330d384f5e0f01ace1ef4df788419 Mon Sep 17 00:00:00 2001 From: Jason2866 <24528715+Jason2866@users.noreply.github.com> Date: Mon, 13 Nov 2023 18:33:06 +0100 Subject: [PATCH 1/3] Add c2 (#70) --- .github/workflows/push.yml | 2 +- configs/builds.json | 18 ++++++++++++++++-- configs/defconfig.30m | 1 + configs/defconfig.60m | 1 + configs/defconfig.esp32c2 | 6 ++++++ 5 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 configs/defconfig.30m create mode 100644 configs/defconfig.60m create mode 100644 configs/defconfig.esp32c2 diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 56cc7e9f7..8525bdeec 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -17,7 +17,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - target: [esp32, esp32s2, esp32s3, esp32c3, esp32c6, esp32h2] + target: [esp32, esp32s2, esp32s3, esp32c2, esp32c3, esp32c6, esp32h2] fail-fast: false steps: - uses: actions/checkout@v3 diff --git a/configs/builds.json b/configs/builds.json index ef0943054..6f29e1399 100644 --- a/configs/builds.json +++ b/configs/builds.json @@ -4,7 +4,7 @@ "file":"libspi_flash.a", "src":"build/esp-idf/spi_flash/libspi_flash.a", "out":"lib/libspi_flash.a", - "targets":["esp32","esp32c3","esp32s2","esp32s3","esp32c6","esp32h2"] + "targets":["esp32","esp32c2","esp32c3","esp32s2","esp32s3","esp32c6","esp32h2"] }, { "file":"libesp_psram.a", @@ -72,6 +72,20 @@ ["dio","80m"] ] }, + { + "target": "esp32c2", + "features":[], + "idf_libs":["qio","60m"], + "bootloaders":[ + ["qio","60m"], + ["dio","60m"], + ["qio","30m"], + ["dio","30m"] + ], + "mem_variants":[ + ["dio","60m"] + ] + }, { "target": "esp32c3", "features":[], @@ -133,4 +147,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/configs/defconfig.30m b/configs/defconfig.30m new file mode 100644 index 000000000..f915b230f --- /dev/null +++ b/configs/defconfig.30m @@ -0,0 +1 @@ +CONFIG_ESPTOOLPY_FLASHFREQ_30M=y diff --git a/configs/defconfig.60m b/configs/defconfig.60m new file mode 100644 index 000000000..797665f52 --- /dev/null +++ b/configs/defconfig.60m @@ -0,0 +1 @@ +CONFIG_ESPTOOLPY_FLASHFREQ_60M=y diff --git a/configs/defconfig.esp32c2 b/configs/defconfig.esp32c2 new file mode 100644 index 000000000..726ad4c73 --- /dev/null +++ b/configs/defconfig.esp32c2 @@ -0,0 +1,6 @@ +CONFIG_XTAL_FREQ_26=y +CONFIG_XTAL_FREQ=26 +CONFIG_BT_BLE_BLUFI_ENABLE=y +CONFIG_RTC_CLK_CAL_CYCLES=576 +# CONFIG_ESP_TASK_WDT_CHECK_IDLE_TASK_CPU0 is not set +CONFIG_FREERTOS_IDLE_TASK_STACKSIZE=2304 From 3ff36e31841300f9cd6d821c5aa285bd70410572 Mon Sep 17 00:00:00 2001 From: me-no-dev Date: Tue, 14 Nov 2023 11:24:38 +0200 Subject: [PATCH 2/3] Adjust components and build strategy --- build.sh | 8 ++++++++ configs/builds.json | 29 +++++++++++++++-------------- main/Kconfig.projbuild | 2 ++ main/idf_component.yml | 4 ++++ 4 files changed, 29 insertions(+), 14 deletions(-) diff --git a/build.sh b/build.sh index 2564da44b..b88647a85 100755 --- a/build.sh +++ b/build.sh @@ -158,12 +158,20 @@ echo $component_version >> version.txt && echo $component_version >> "$AR_TOOLS/ #targets_count=`jq -c '.targets[] | length' configs/builds.json` for target_json in `jq -c '.targets[]' configs/builds.json`; do target=$(echo "$target_json" | jq -c '.target' | tr -d '"') + target_skip=$(echo "$target_json" | jq -c '.skip // 0') if [ "$TARGET" != "all" ] && [ "$TARGET" != "$target" ]; then echo "* Skipping Target: $target" continue fi + # Skip chips that should not be a part of the final libs + # WARNING!!! this logic needs to be updated when cron builds are split into jobs + if [ "$TARGET" = "all" ] && [ $target_skip -eq 1 ]; then + echo "* Skipping Target: $target" + continue + fi + echo "* Target: $target" # Build Main Configs List diff --git a/configs/builds.json b/configs/builds.json index 6f29e1399..e34813cfa 100644 --- a/configs/builds.json +++ b/configs/builds.json @@ -44,6 +44,21 @@ } ], "targets":[ + { + "target": "esp32c2", + "skip": 1, + "features":[], + "idf_libs":["qio","60m"], + "bootloaders":[ + ["qio","60m"], + ["dio","60m"], + ["qio","30m"], + ["dio","30m"] + ], + "mem_variants":[ + ["dio","60m"] + ] + }, { "target": "esp32h2", "features":[], @@ -72,20 +87,6 @@ ["dio","80m"] ] }, - { - "target": "esp32c2", - "features":[], - "idf_libs":["qio","60m"], - "bootloaders":[ - ["qio","60m"], - ["dio","60m"], - ["qio","30m"], - ["dio","30m"] - ], - "mem_variants":[ - ["dio","60m"] - ] - }, { "target": "esp32c3", "features":[], diff --git a/main/Kconfig.projbuild b/main/Kconfig.projbuild index a5832f914..10edb39c4 100644 --- a/main/Kconfig.projbuild +++ b/main/Kconfig.projbuild @@ -11,8 +11,10 @@ config LIB_BUILDER_FLASHFREQ default "120m" if ESPTOOLPY_FLASHFREQ_120M default "80m" if ESPTOOLPY_FLASHFREQ_80M default "64m" if ESPTOOLPY_FLASHFREQ_64M + default "60m" if ESPTOOLPY_FLASHFREQ_60M default "40m" if ESPTOOLPY_FLASHFREQ_40M default "32m" if ESPTOOLPY_FLASHFREQ_32M + default "30m" if ESPTOOLPY_FLASHFREQ_30M default "26m" if ESPTOOLPY_FLASHFREQ_26M default "20m" if ESPTOOLPY_FLASHFREQ_20M default "16m" if ESPTOOLPY_FLASHFREQ_16M diff --git a/main/idf_component.yml b/main/idf_component.yml index 5c7a18368..d8bf9371e 100644 --- a/main/idf_component.yml +++ b/main/idf_component.yml @@ -5,9 +5,13 @@ dependencies: version: "master" git: https://github.com/espressif/esp32-camera.git require: public + rules: + - if: "target in [esp32, esp32s2, esp32s3]" espressif/esp-tflite-micro: version: ">=1.2.0" require: public + rules: + - if: "target not in [esp32c2]" espressif/esp-dl: version: "master" git: https://github.com/espressif/esp-dl.git From 5ac5d132d05dc3b6fba85eac84a86476aead64c2 Mon Sep 17 00:00:00 2001 From: Jan Prochazka <90197375+P-R-O-C-H-Y@users.noreply.github.com> Date: Mon, 20 Nov 2023 14:37:19 +0100 Subject: [PATCH 3/3] enable rev 2 chips (preview) --- configs/defconfig.esp32c2 | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/defconfig.esp32c2 b/configs/defconfig.esp32c2 index 726ad4c73..5f5e02505 100644 --- a/configs/defconfig.esp32c2 +++ b/configs/defconfig.esp32c2 @@ -4,3 +4,4 @@ CONFIG_BT_BLE_BLUFI_ENABLE=y CONFIG_RTC_CLK_CAL_CYCLES=576 # CONFIG_ESP_TASK_WDT_CHECK_IDLE_TASK_CPU0 is not set CONFIG_FREERTOS_IDLE_TASK_STACKSIZE=2304 +CONFIG_ESP32C2_REV2_DEVELOPMENT=y