@@ -8,14 +8,15 @@ target="$1"
88buildtype=" $2 "
99
1010if [ -z " $target " ]; then
11- echo " Usage: $0 target"
12- echo " Usage: $0 <esp32 or unix or macOS>"
13- echo " Example: $0 unix"
14- echo " Example: $0 macOS"
15- echo " Example: $0 esp32"
16- echo " Example: $0 esp32s3"
17- echo " Example: $0 unphone"
18- echo " Example: $0 clean"
11+ echo " Usage: $0 target"
12+ echo " Usage: $0 <esp32 or esp32-small or unix or macOS>"
13+ echo " Example: $0 unix"
14+ echo " Example: $0 macOS"
15+ echo " Example: $0 esp32"
16+ echo " Example: $0 esp32-small"
17+ echo " Example: $0 esp32s3"
18+ echo " Example: $0 unphone"
19+ echo " Example: $0 clean"
1920 exit 1
2021fi
2122
@@ -106,20 +107,27 @@ popd
106107echo " Refreshing freezefs..."
107108" $codebasedir " /scripts/freezefs_mount_builtin.sh
108109
109- if [ " $target " == " esp32" -o " $target " == " esp32s3" -o " $target " == " unphone" ]; then
110- partition_size=" 4194304"
111- flash_size=" 16"
110+ if [ " $target " == " esp32" -o " $target " == " esp32s3" -o " $target " == " unphone" -o " $target " == " esp32-small " ]; then
111+ partition_size=" 4194304"
112+ flash_size=" 16"
112113 otasupport=" --ota"
113114 extra_configs=" "
114- if [ " $target " == " esp32" ]; then
115+ if [ " $target " == " esp32" ]; then
115116 BOARD=ESP32_GENERIC
116117 BOARD_VARIANT=SPIRAM
118+ elif [ " $target " == " esp32-small" ]; then
119+ BOARD=ESP32_GENERIC
120+ BOARD_VARIANT=STANDARD
121+ partition_size=" 3900000"
122+ flash_size=" 4"
123+ otasupport=" " # too small for 2 OTA partitions + internal storage
124+ # No PSRAM, so do not set SPIRAM-specific options
117125 else # esp32s3 or unphone
118- if [ " $target " == " unphone" ]; then
119- partition_size=" 3900000"
120- flash_size=" 8"
126+ if [ " $target " == " unphone" ]; then
127+ partition_size=" 3900000"
128+ flash_size=" 8"
121129 otasupport=" " # too small for 2 OTA partitions + internal storage
122- fi
130+ fi
123131 BOARD=ESP32_GENERIC_S3
124132 BOARD_VARIANT=SPIRAM_OCT
125133 # These options disable hardware AES, SHA and MPI because they give warnings in QEMU: [AES] Error reading from GDMA buffer
@@ -149,15 +157,15 @@ if [ "$target" == "esp32" -o "$target" == "esp32s3" -o "$target" == "unphone" ];
149157 # CONFIG_ADC_MIC_TASK_CORE=1 because with the default (-1) it hangs the CPU
150158 # CONFIG_SPIRAM_XIP_FROM_PSRAM: load entire firmware into RAM to reduce SD vs PSRAM contention (recommended at https://github.com/MicroPythonOS/MicroPythonOS/issues/17)
151159 python3 make.py " $otasupport " --optimize-size --partition-size=$partition_size --flash-size=$flash_size esp32 BOARD=$BOARD BOARD_VARIANT=$BOARD_VARIANT \
152- USER_C_MODULE=" $codebasedir " /micropython-camera-API/src/micropython.cmake \
153- USER_C_MODULE=" $codebasedir " /secp256k1-embedded-ecdh/micropython.cmake \
154- USER_C_MODULE=" $codebasedir " /c_mpos/micropython.cmake \
155- CONFIG_FREERTOS_USE_TRACE_FACILITY=y \
156- CONFIG_FREERTOS_VTASKLIST_INCLUDE_COREID=y \
157- CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y \
158- CONFIG_ADC_MIC_TASK_CORE=1 \
159- $extra_configs \
160- " $frozenmanifest "
160+ USER_C_MODULE=" $codebasedir " /micropython-camera-API/src/micropython.cmake \
161+ USER_C_MODULE=" $codebasedir " /secp256k1-embedded-ecdh/micropython.cmake \
162+ USER_C_MODULE=" $codebasedir " /c_mpos/micropython.cmake \
163+ CONFIG_FREERTOS_USE_TRACE_FACILITY=y \
164+ CONFIG_FREERTOS_VTASKLIST_INCLUDE_COREID=y \
165+ CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y \
166+ CONFIG_ADC_MIC_TASK_CORE=1 \
167+ $extra_configs \
168+ " $frozenmanifest "
161169
162170 popd
163171elif [ " $target " == " unix" -o " $target " == " macOS" ]; then
0 commit comments