|
|
@@ -17,7 +17,6 @@
|
|
|
#include "xtensa/config/core.h"
|
|
|
#include "xtensa/config/core-isa.h"
|
|
|
#include "xtensa/xtruntime.h"
|
|
|
-#include "esp_private/startup_internal.h" /* Required by g_spiram_ok. [refactor-todo] for g_spiram_ok */
|
|
|
#include "esp_private/esp_int_wdt.h"
|
|
|
#include "esp_heap_caps.h"
|
|
|
#include "esp_system.h"
|
|
|
@@ -29,7 +28,9 @@
|
|
|
#include "esp_heap_caps_init.h"
|
|
|
#include "esp_freertos_hooks.h"
|
|
|
#if CONFIG_SPIRAM
|
|
|
-#include "esp_private/esp_psram_extram.h" /* Required by esp_psram_extram_reserve_dma_pool() */
|
|
|
+/* Required by esp_psram_extram_reserve_dma_pool() */
|
|
|
+#include "esp_psram.h"
|
|
|
+#include "esp_private/esp_psram_extram.h"
|
|
|
#endif
|
|
|
#ifdef CONFIG_APPTRACE_ENABLE
|
|
|
#include "esp_app_trace.h"
|
|
|
@@ -182,7 +183,7 @@ static void main_task(void* args)
|
|
|
|
|
|
// Now we have startup stack RAM available for heap, enable any DMA pool memory
|
|
|
#if CONFIG_SPIRAM_MALLOC_RESERVE_INTERNAL
|
|
|
- if (g_spiram_ok) {
|
|
|
+ if (esp_psram_is_initialized()) {
|
|
|
esp_err_t r = esp_psram_extram_reserve_dma_pool(CONFIG_SPIRAM_MALLOC_RESERVE_INTERNAL);
|
|
|
if (r != ESP_OK) {
|
|
|
ESP_EARLY_LOGE(TAG, "Could not reserve internal/DMA pool (error 0x%x)", r);
|