From: kyz Date: Wed, 21 Oct 2026 13:13:18 +0000 (+0800) Subject: modify freertos heap size X-Git-Url: http://kyz.pub/gitweb/?a=commitdiff_plain;h=8d767407ff3c6e1dd51689ef14b6597718a08357;p=yn%2Fdispboard.git modify freertos heap size --- diff --git a/Linker_Scatter_File/SWM34S_NoLink_SPI_Flash.sct b/Linker_Scatter_File/SWM34S_NoLink_SPI_Flash.sct index 4b1e480..8d8a2db 100644 --- a/Linker_Scatter_File/SWM34S_NoLink_SPI_Flash.sct +++ b/Linker_Scatter_File/SWM34S_NoLink_SPI_Flash.sct @@ -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 diff --git a/Middleware/FreeRTOS-Kernel/FreeRTOSConfig.h b/Middleware/FreeRTOS-Kernel/FreeRTOSConfig.h index 17ba8ff..d668019 100644 --- a/Middleware/FreeRTOS-Kernel/FreeRTOSConfig.h +++ b/Middleware/FreeRTOS-Kernel/FreeRTOSConfig.h @@ -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 diff --git a/Middleware/FreeRTOS-Kernel/portable/MemMang/heap_4.c b/Middleware/FreeRTOS-Kernel/portable/MemMang/heap_4.c index fb8e035..cf0be4b 100644 --- a/Middleware/FreeRTOS-Kernel/portable/MemMang/heap_4.c +++ b/Middleware/FreeRTOS-Kernel/portable/MemMang/heap_4.c @@ -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