Skip to content

Commit 9234dd9

Browse files
Jason2866me-no-devP-R-O-C-H-Y
authored
Add target ESP32-C2 (#149)
* Add c2 (#70) * Adjust components and build strategy * enable rev 2 chips (preview) --------- Co-authored-by: me-no-dev <[email protected]> Co-authored-by: Jan Prochazka <[email protected]>
1 parent af683ec commit 9234dd9

File tree

8 files changed

+41
-3
lines changed

8 files changed

+41
-3
lines changed

Diff for: .github/workflows/push.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
runs-on: ubuntu-latest
1818
strategy:
1919
matrix:
20-
target: [esp32, esp32s2, esp32s3, esp32c3, esp32c6, esp32h2]
20+
target: [esp32, esp32s2, esp32s3, esp32c2, esp32c3, esp32c6, esp32h2]
2121
fail-fast: false
2222
steps:
2323
- uses: actions/checkout@v3

Diff for: build.sh

+8
Original file line numberDiff line numberDiff line change
@@ -158,12 +158,20 @@ echo $component_version >> version.txt && echo $component_version >> "$AR_TOOLS/
158158
#targets_count=`jq -c '.targets[] | length' configs/builds.json`
159159
for target_json in `jq -c '.targets[]' configs/builds.json`; do
160160
target=$(echo "$target_json" | jq -c '.target' | tr -d '"')
161+
target_skip=$(echo "$target_json" | jq -c '.skip // 0')
161162

162163
if [ "$TARGET" != "all" ] && [ "$TARGET" != "$target" ]; then
163164
echo "* Skipping Target: $target"
164165
continue
165166
fi
166167

168+
# Skip chips that should not be a part of the final libs
169+
# WARNING!!! this logic needs to be updated when cron builds are split into jobs
170+
if [ "$TARGET" = "all" ] && [ $target_skip -eq 1 ]; then
171+
echo "* Skipping Target: $target"
172+
continue
173+
fi
174+
167175
echo "* Target: $target"
168176

169177
# Build Main Configs List

Diff for: configs/builds.json

+17-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"file":"libspi_flash.a",
55
"src":"build/esp-idf/spi_flash/libspi_flash.a",
66
"out":"lib/libspi_flash.a",
7-
"targets":["esp32","esp32c3","esp32s2","esp32s3","esp32c6","esp32h2"]
7+
"targets":["esp32","esp32c2","esp32c3","esp32s2","esp32s3","esp32c6","esp32h2"]
88
},
99
{
1010
"file":"libesp_psram.a",
@@ -44,6 +44,21 @@
4444
}
4545
],
4646
"targets":[
47+
{
48+
"target": "esp32c2",
49+
"skip": 1,
50+
"features":[],
51+
"idf_libs":["qio","60m"],
52+
"bootloaders":[
53+
["qio","60m"],
54+
["dio","60m"],
55+
["qio","30m"],
56+
["dio","30m"]
57+
],
58+
"mem_variants":[
59+
["dio","60m"]
60+
]
61+
},
4762
{
4863
"target": "esp32h2",
4964
"features":[],
@@ -133,4 +148,4 @@
133148
]
134149
}
135150
]
136-
}
151+
}

Diff for: configs/defconfig.30m

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CONFIG_ESPTOOLPY_FLASHFREQ_30M=y

Diff for: configs/defconfig.60m

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CONFIG_ESPTOOLPY_FLASHFREQ_60M=y

Diff for: configs/defconfig.esp32c2

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
CONFIG_XTAL_FREQ_26=y
2+
CONFIG_XTAL_FREQ=26
3+
CONFIG_BT_BLE_BLUFI_ENABLE=y
4+
CONFIG_RTC_CLK_CAL_CYCLES=576
5+
# CONFIG_ESP_TASK_WDT_CHECK_IDLE_TASK_CPU0 is not set
6+
CONFIG_FREERTOS_IDLE_TASK_STACKSIZE=2304
7+
CONFIG_ESP32C2_REV2_DEVELOPMENT=y

Diff for: main/Kconfig.projbuild

+2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,10 @@ config LIB_BUILDER_FLASHFREQ
1111
default "120m" if ESPTOOLPY_FLASHFREQ_120M
1212
default "80m" if ESPTOOLPY_FLASHFREQ_80M
1313
default "64m" if ESPTOOLPY_FLASHFREQ_64M
14+
default "60m" if ESPTOOLPY_FLASHFREQ_60M
1415
default "40m" if ESPTOOLPY_FLASHFREQ_40M
1516
default "32m" if ESPTOOLPY_FLASHFREQ_32M
17+
default "30m" if ESPTOOLPY_FLASHFREQ_30M
1618
default "26m" if ESPTOOLPY_FLASHFREQ_26M
1719
default "20m" if ESPTOOLPY_FLASHFREQ_20M
1820
default "16m" if ESPTOOLPY_FLASHFREQ_16M

Diff for: main/idf_component.yml

+4
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,13 @@ dependencies:
55
version: "master"
66
git: https://github.com/espressif/esp32-camera.git
77
require: public
8+
rules:
9+
- if: "target in [esp32, esp32s2, esp32s3]"
810
espressif/esp-tflite-micro:
911
version: ">=1.2.0"
1012
require: public
13+
rules:
14+
- if: "target not in [esp32c2]"
1115
espressif/esp-dl:
1216
version: "master"
1317
git: https://github.com/espressif/esp-dl.git

0 commit comments

Comments
 (0)