boarchuz / HULP

ESP32 ULP Coprocessor Helper
MIT License
180 stars 18 forks source link

RTC LOW Memory limit for platformio / arduino #33

Closed ssriblo closed 3 months ago

ssriblo commented 6 months ago

Hello @boarchuz ! ULP uses RTC 8K SRAM, but looks like platfmormio (arduino) build has small limit:

E (1052) ulp: program too big: 129 words, max is 128 words E (1053) HULP: [hulp_ulp_load] load error (0x1201) ESP_ERROR_CHECK failed: esp_err_t 0x1201 (ESP_ERR_ULP_SIZE_TOO_BIG) at 0x4008820c

I see that similar problem was fixed before, but maybe not for my configuration

my platformio.ini: [env:esp32dev] board = esp32dev framework = arduino platform = espressif32

Note: works well if

framework = espidf and at sdconfig.defaults: CONFIG_ESP32_ULP_COPROC_ENABLED=y CONFIG_ESP32_ULP_COPROC_RESERVE_MEM=1024

boarchuz commented 6 months ago

Arduino uses mostly pre-built ESP-IDF components for simplicity and fast iteration. You're stuck with whatever config was selected at the time, including CONFIG_ESP32_ULP_COPROC_RESERVE_MEM=512.

Use ESP-IDF if you need to increase it.