Преглед на файлове

Merge branch 'bugfix/static_mem_workaround' into 'master'

esp32: Change 192KB runtime static limit workaround to a 176KB link time workaround

See merge request !1704

Ivan Grokhotkov преди 8 години
родител
ревизия
98dff491c8
променени са 2 файла, в които са добавени 5 реда и са изтрити 8 реда
  1. 0 7
      components/esp32/cpu_start.c
  2. 5 1
      components/esp32/ld/esp32.ld

+ 0 - 7
components/esp32/cpu_start.c

@@ -136,13 +136,6 @@ void IRAM_ATTR call_start_cpu0()
         esp_panic_wdt_stop();
         esp_panic_wdt_stop();
     }
     }
 
 
-    // Temporary workaround for an ugly crash, until we allow > 192KB of static DRAM
-    if ((intptr_t)&_bss_end > 0x3FFE0000) {
-        // Can't use assert() or logging here because there's no .bss
-        ets_printf("ERROR: Static .bss section extends past 0x3FFE0000. IDF cannot boot.\n");
-        abort();
-    }
-
     //Clear BSS. Please do not attempt to do any complex stuff (like early logging) before this.
     //Clear BSS. Please do not attempt to do any complex stuff (like early logging) before this.
     memset(&_bss_start, 0, (&_bss_end - &_bss_start) * sizeof(_bss_start));
     memset(&_bss_start, 0, (&_bss_end - &_bss_start) * sizeof(_bss_start));
 
 

+ 5 - 1
components/esp32/ld/esp32.ld

@@ -45,9 +45,13 @@ MEMORY
 
 
      Enabling Bluetooth & Trace Memory features in menuconfig will decrease
      Enabling Bluetooth & Trace Memory features in menuconfig will decrease
      the amount of RAM available.
      the amount of RAM available.
+
+     Note: Length of this section *should* be 0x50000, and this extra DRAM is available
+     in heap at runtime. However due to static ROM memory usage at this 176KB mark, the
+     additional static memory temporarily cannot be used.
   */
   */
   dram0_0_seg (RW) :                 org = 0x3FFB0000 + CONFIG_BT_RESERVE_DRAM,
   dram0_0_seg (RW) :                 org = 0x3FFB0000 + CONFIG_BT_RESERVE_DRAM,
-                                     len = 0x50000 - CONFIG_TRACEMEM_RESERVE_DRAM - CONFIG_BT_RESERVE_DRAM
+                                     len = 0x2c200 - CONFIG_BT_RESERVE_DRAM
 
 
   /* Flash mapped constant data */
   /* Flash mapped constant data */
   drom0_0_seg (R) :                  org = 0x3F400018, len = 0x400000-0x18
   drom0_0_seg (R) :                  org = 0x3F400018, len = 0x400000-0x18