modify freertos heap size
authorkyz <kongyuzhong@google.com>
Wed, 21 Oct 2026 13:13:18 +0000 (21:13 +0800)
committerkyz <kongyuzhong@google.com>
Wed, 21 Oct 2026 13:13:18 +0000 (21:13 +0800)
Linker_Scatter_File/SWM34S_NoLink_SPI_Flash.sct
Middleware/FreeRTOS-Kernel/FreeRTOSConfig.h
Middleware/FreeRTOS-Kernel/portable/MemMang/heap_4.c

index 4b1e480f2bef48474fae133bd3e6d24122ab922f..8d8a2db20f186acde5193584222cb819b4b4ca07 100644 (file)
@@ -18,9 +18,9 @@ LR_IROM1 0x00000000 0x00080000  {    ; load region size_region
   }
   RW_IRAM1 0x20000000 0x00010000  {  ; RW data
    .ANY (+RW +ZI)
-   *(.SRAM)
+   ;*(.SRAM)
   }
-  RW_SDRAM1 0x80000000 0x00800000  { ; RW data
+  RW_SDRAM1 0x80400000 0x00400000  { ; RW data
     *(.SDRAM1)
   }
 ;  0x00200000
index 17ba8ff800610c6438e551582c6ea3f774018208..d6680195f9296059805b6706208ac659e100b869 100644 (file)
@@ -64,7 +64,7 @@ extern uint32_t SystemCoreClock;
 #define configMINIMAL_STACK_SIZE                                               ( ( uint16_t ) 128 )
 #define configMINIMAL_SECURE_STACK_SIZE                                        ( 1024 )
 #define configMAX_TASK_NAME_LEN                                                        ( 12 )
-#define configTOTAL_HEAP_SIZE                                                  ( ( size_t ) ( 16 * 1024 ) )
+#define configTOTAL_HEAP_SIZE                                                  ( ( size_t ) ( 2 * 1024 * 1024 ) )
 
 /* Constants that build features in or out. */
 #define configUSE_MUTEXES                                                              1
index fb8e0357494b6ea6a01bd21a23dab93c9e928027..cf0be4b659a24cf155f769115eef605169f68b5c 100644 (file)
@@ -61,7 +61,7 @@
 * heap - probably so it can be placed in a special segment or address. */
     extern uint8_t ucHeap[ configTOTAL_HEAP_SIZE ];
 #else
-    PRIVILEGED_DATA static uint8_t ucHeap[ configTOTAL_HEAP_SIZE ];
+    PRIVILEGED_DATA static uint8_t ucHeap[ configTOTAL_HEAP_SIZE ]  __attribute__((section(".SDRAM1"), aligned(8))) ;
 #endif /* configAPPLICATION_ALLOCATED_HEAP */
 
 /* Define the linked list structure.  This is used to link free blocks in order