diff --git a/components/esp_psram/esp_psram.c b/components/esp_psram/esp_psram.c index debbf9de31..59176e7c74 100644 --- a/components/esp_psram/esp_psram.c +++ b/components/esp_psram/esp_psram.c @@ -90,7 +90,7 @@ typedef struct { static psram_ctx_t s_psram_ctx; static const DRAM_ATTR char TAG[] = "esp_psram"; -ESP_SYSTEM_INIT_FN(init_psram, CORE, BIT(0), 103) +ESP_SYSTEM_INIT_FN(add_psram_to_heap, CORE, BIT(0), 103) { #if CONFIG_SPIRAM_BOOT_INIT && (CONFIG_SPIRAM_USE_CAPS_ALLOC || CONFIG_SPIRAM_USE_MALLOC) if (esp_psram_is_initialized()) { diff --git a/components/esp_system/system_init_fn.txt b/components/esp_system/system_init_fn.txt index 1ba1dcc6dc..0af7db8733 100644 --- a/components/esp_system/system_init_fn.txt +++ b/components/esp_system/system_init_fn.txt @@ -41,7 +41,12 @@ CORE: 100: init_heap in components/heap/heap_caps_init.c on BIT(0) CORE: 101: esp_timer_init_nonos in components/esp_timer/src/esp_timer_init.c on BIT(0) CORE: 102: init_newlib in components/newlib/newlib_init.c on BIT(0) -CORE: 103: init_psram in components/esp_psram/esp_psram.c on BIT(0) + +# Add the psram to heap, psram vaddr region is reserved when initialising the heap, after +# psram is initialised (and necessary reservation for psram usage), the rest of the psram +# will be added to the heap +CORE: 103: add_psram_to_heap in components/esp_psram/esp_psram.c on BIT(0) + CORE: 104: init_brownout in components/esp_system/startup_funcs.c on BIT(0) CORE: 105: init_newlib_time in components/esp_system/startup_funcs.c on BIT(0)