Standalone bench program (src/bin/sd_fat.rs, `just flash-sd`) that mounts FAT over the EPD's shared SPI2 bus and proves the persistence module's atomic save: write .tmp, fsync, rename, read back and compare. Runs SD-only: the EPD's SpiBusDriver holds an exclusive bus lock for its lifetime, so an arbitrated SD device can't be live alongside it yet. Keeps CRC required and maps a card that rejects CMD59 to a clear "use a genuine card" message rather than running the user's notes over an unchecked bus. sdkconfig gains CONFIG_FATFS_LFN_HEAP (the atomic-save .tmp name isn't valid 8.3) and, temporarily, CONFIG_LOG_MAXIMUM_LEVEL_DEBUG to read the drivers' per-command R1 bytes during bring-up.
33 lines
1.7 KiB
Plaintext
33 lines
1.7 KiB
Plaintext
# Rust often needs a bit of an extra main task stack size compared to C (the default is 3K)
|
|
# You might have to increase this further if you allocate large stack variables in the main task.
|
|
# Bumped for the TLS handshake (Spike 6): mbedtls runs on the calling task and
|
|
# wants several KB of stack on top of the app's own usage.
|
|
CONFIG_ESP_MAIN_TASK_STACK_SIZE=12288
|
|
|
|
# Increase a bit these stack sizes as they are also a bit too small by default
|
|
CONFIG_ESP_SYSTEM_EVENT_TASK_STACK_SIZE=4096
|
|
CONFIG_FREERTOS_IDLE_TASK_STACKSIZE=4096
|
|
|
|
# You might have to increase this further if you spawn your own Rust threads
|
|
# that allocate large stack variables; or better yet - use
|
|
# `std::thread::Builder::new().stack_size(XXX)` for spawning
|
|
CONFIG_PTHREAD_TASK_STACK_SIZE_DEFAULT=4096
|
|
|
|
# Raise the compile-time log ceiling so the sdmmc/sdspi drivers' per-command
|
|
# DEBUG logs (the raw R1 response bytes) are built in. Runtime level stays INFO
|
|
# by default; the SD spike bumps just the sdmmc/sdspi tags to DEBUG so we can see
|
|
# exactly what each init command returns. (Diagnostic for Spike 3 init failures.)
|
|
CONFIG_LOG_MAXIMUM_LEVEL_DEBUG=y
|
|
|
|
# FatFS long filenames (Spike 3 — SD). Default is 8.3-only, which rejects the
|
|
# persistence module's atomic-save temp name (`notes.md.tmp` has two dots).
|
|
# LFN on the heap keeps the working buffer off the (small) task stack.
|
|
CONFIG_FATFS_LFN_HEAP=y
|
|
|
|
# TLS trust store (Spike 6 — Wi-Fi + TLS, the gate for Spike 7 gitoxide push).
|
|
# The certificate bundle backs esp_crt_bundle_attach so an HTTPS GET to
|
|
# api.github.com validates against real roots. FULL rather than the common
|
|
# subset so a less common CA in the chain can't surprise us on the bench.
|
|
CONFIG_MBEDTLS_CERTIFICATE_BUNDLE=y
|
|
CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_FULL=y
|