Add option to allocate external RAM using heap_alloc_caps

This commit is contained in:
Jeroen Domburg
2017-09-05 17:29:57 +08:00
parent 538e9d83fc
commit 875ae6a134
12 changed files with 154 additions and 40 deletions

View File

@@ -255,6 +255,15 @@ void start_cpu0_default(void)
{
esp_err_t err;
esp_setup_syscall_table();
#if CONFIG_SPIRAM_BOOT_INIT && (CONFIG_SPIRAM_USE_CAPS_ALLOC || CONFIG_SPIRAM_USE_MALLOC)
esp_err_t r=esp_spiram_add_to_heapalloc();
if (r != ESP_OK) {
ESP_EARLY_LOGE(TAG, "External RAM could not be added to heap!");
abort();
}
#endif
//Enable trace memory and immediately start trace.
#if CONFIG_ESP32_TRAX
#if CONFIG_ESP32_TRAX_TWOBANKS