diff options
| author | Your Name <you@example.com> | 2026-05-21 06:20:45 +0530 |
|---|---|---|
| committer | Your Name <you@example.com> | 2026-05-21 06:20:45 +0530 |
| commit | 716daafce3eaa5ebfd246c1ef9915a2972b4c6fd (patch) | |
| tree | 79535bd62e66a82b248d96174b57a1c0f861cc2d /sdkconfig.defaults | |
| parent | 60797e35dda136e08b0a6c966fa92107095e6e64 (diff) | |
fix: TLS allocation, stack overflow, DNS bind — mint now reachable
Root cause: mbedtls SSL buffers (16KB) couldn't allocate from fragmented
internal RAM (largest block 8KB). Fix by lowering SPIRAM_MALLOC_ALWAYSINTERNAL
from 16KB to 4KB, allowing SSL buffers to go to PSRAM.
Additional fixes:
- DNS server binds to AP IP only (prevents self-hijacking)
- start_services() moved from esp_timer (2KB stack) to dedicated FreeRTOS
task (16KB stack) — was causing stack overflow with dynamic buffers
- Mint health probe now logs errors and exposes last_err in API
- Debug endpoint shows internal/PSRAM heap breakdown and DNS resolve test
- Enabled CONFIG_MBEDTLS_DYNAMIC_BUFFER for better memory management
- Board C config: mint_url → testnut-nutshell.mints.orangesync.tech
Diffstat (limited to 'sdkconfig.defaults')
| -rw-r--r-- | sdkconfig.defaults | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sdkconfig.defaults b/sdkconfig.defaults index e2e1f4e..bed04fe 100644 --- a/sdkconfig.defaults +++ b/sdkconfig.defaults | |||
| @@ -37,11 +37,15 @@ CONFIG_PARTITION_TABLE_FILENAME="partitions.csv" | |||
| 37 | 37 | ||
| 38 | # mbedTLS (needed for HTTPS to mint) | 38 | # mbedTLS (needed for HTTPS to mint) |
| 39 | CONFIG_MBEDTLS_CERTIFICATE_BUNDLE=y | 39 | CONFIG_MBEDTLS_CERTIFICATE_BUNDLE=y |
| 40 | CONFIG_MBEDTLS_DYNAMIC_BUFFER=y | ||
| 41 | CONFIG_MBEDTLS_SSL_IN_CONTENT_LEN=4096 | ||
| 42 | CONFIG_MBEDTLS_SSL_OUT_CONTENT_LEN=4096 | ||
| 40 | 43 | ||
| 41 | # PSRAM (ESP32-S3 has 8MB) | 44 | # PSRAM (ESP32-S3 has 8MB) |
| 42 | CONFIG_SPIRAM=y | 45 | CONFIG_SPIRAM=y |
| 43 | CONFIG_SPIRAM_MODE_OCT=y | 46 | CONFIG_SPIRAM_MODE_OCT=y |
| 44 | CONFIG_SPIRAM_SPEED_80M=y | 47 | CONFIG_SPIRAM_SPEED_80M=y |
| 45 | CONFIG_SPIRAM_USE_MALLOC=y | 48 | CONFIG_SPIRAM_USE_MALLOC=y |
| 46 | CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=16384 | 49 | CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=4096 |
| 47 | CONFIG_SPIRAM_MALLOC_RESERVE_INTERNAL=32768 | 50 | CONFIG_SPIRAM_MALLOC_RESERVE_INTERNAL=32768 |
| 51 | CONFIG_MBEDTLS_DYNAMIC_BUFFER=y | ||