Skip to content

Add target ESP32-C2 #149

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 4 commits into from
Nov 21, 2023
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
2 changes: 1 addition & 1 deletion .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 8 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
19 changes: 17 additions & 2 deletions configs/builds.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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":[],
Expand Down Expand Up @@ -133,4 +148,4 @@
]
}
]
}
}
1 change: 1 addition & 0 deletions configs/defconfig.30m
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CONFIG_ESPTOOLPY_FLASHFREQ_30M=y
1 change: 1 addition & 0 deletions configs/defconfig.60m
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CONFIG_ESPTOOLPY_FLASHFREQ_60M=y
7 changes: 7 additions & 0 deletions configs/defconfig.esp32c2
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
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
CONFIG_ESP32C2_REV2_DEVELOPMENT=y
2 changes: 2 additions & 0 deletions main/Kconfig.projbuild
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions main/idf_component.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down