Skip to content

Commit 0be8b52

Browse files
Unify esp32s3 and esp32s3_qemu builds
1 parent cd95f55 commit 0be8b52

2 files changed

Lines changed: 11 additions & 10 deletions

File tree

scripts/build_mpos.sh

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ if [ -z "$target" ]; then
1414
echo "Example: $0 macOS"
1515
echo "Example: $0 esp32"
1616
echo "Example: $0 esp32s3"
17-
echo "Example: $0 esp32s3_qemu"
1817
exit 1
1918
fi
2019

@@ -87,18 +86,17 @@ ln -sf ../../c_mpos "$codebasedir"/lvgl_micropython/ext_mod/c_mpos
8786
echo "Refreshing freezefs..."
8887
"$codebasedir"/scripts/freezefs_mount_builtin.sh
8988

90-
if [ "$target" == "esp32" -o "$target" == "esp32s3" -o "$target" == "esp32s3_qemu" ]; then
89+
if [ "$target" == "esp32" -o "$target" == "esp32s3" ]; then
9190
extra_configs=""
9291
if [ "$target" == "esp32" ]; then
9392
BOARD=ESP32_GENERIC
9493
BOARD_VARIANT=SPIRAM
95-
else # esp32s3 or esp32s3_qemu
94+
else # esp32s3
9695
BOARD=ESP32_GENERIC_S3
9796
BOARD_VARIANT=SPIRAM_OCT
98-
if [ "$target" == "esp32s3_qemu" ]; then
99-
# CONFIG_ESPTOOLPY_FLASHMODE_DIO because QIO has an "off by 2 bytes" bug in qemu
100-
# CONFIG_MBEDTLS_HARDWARE_* because these have bugs in qemu due to warning: [AES] Error reading from GDMA buffer
101-
extra_configs="CONFIG_ESPTOOLPY_FLASHMODE_DIO=y CONFIG_MBEDTLS_HARDWARE_AES=n CONFIG_MBEDTLS_HARDWARE_SHA=n CONFIG_MBEDTLS_HARDWARE_MPI=n"
97+
# These options disable hardware AES, SHA and MPI because they give warnings in QEMU: [AES] Error reading from GDMA buffer
98+
# There's a 25% https download speed penalty for this, but that's usually not the bottleneck.
99+
extra_configs="CONFIG_MBEDTLS_HARDWARE_AES=n CONFIG_MBEDTLS_HARDWARE_SHA=n CONFIG_MBEDTLS_HARDWARE_MPI=n"
102100
fi
103101
fi
104102
manifest=$(readlink -f "$codebasedir"/manifests/manifest.py)
@@ -114,14 +112,16 @@ if [ "$target" == "esp32" -o "$target" == "esp32s3" -o "$target" == "esp32s3_qem
114112
# --debug: enable debugging from ESP-IDF but makes copying files to it very slow so that's not added
115113
# --dual-core-threads: disabled GIL, run code on both CPUs
116114
# --task-stack-size={stack size in bytes}
115+
# --py-freertos: add MicroPython FreeRTOS module to expose internals
117116
# CONFIG_* sets ESP-IDF options
118117
# listing processes on the esp32 still doesn't work because no esp32.vtask_list_threads() or something
119118
# CONFIG_FREERTOS_USE_TRACE_FACILITY=y
120119
# CONFIG_FREERTOS_VTASKLIST_INCLUDE_COREID=y
121120
# CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y
122-
# CONFIG_ADC_MIC_TASK_CORE=1 because with the default (-1) it hangs the CPU
123-
121+
# CONFIG_ADC_MIC_TASK_CORE=1 because with the default (-1) it hangs the CPU
122+
# 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)
124123
python3 make.py --ota --partition-size=4194304 --flash-size=16 esp32 BOARD=$BOARD BOARD_VARIANT=$BOARD_VARIANT \
124+
--py-freertos \
125125
USER_C_MODULE="$codebasedir"/micropython-camera-API/src/micropython.cmake \
126126
USER_C_MODULE="$codebasedir"/secp256k1-embedded-ecdh/micropython.cmake \
127127
USER_C_MODULE="$codebasedir"/c_mpos/micropython.cmake \

scripts/mklittlefs.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@ mydir=$(dirname "$mydir")
99
#size=0x520000
1010
#~/sources/mklittlefs/mklittlefs -c "$mydir"/../../../internalsd_zips_removed_gb_romart -s "$size" internalsd_zips_removed_gb_romart.bin
1111

12-
size=0x520000
12+
size=0x520000 # 16MB filesystem
13+
#size=0x460000 # 8MB filesystem
1314
~/sources/mklittlefs/mklittlefs -c "$mydir"/../internal_filesystem/ -s "$size" internal_filesystem.bin

0 commit comments

Comments
 (0)