mirror of
https://github.com/apache/nuttx.git
synced 2025-12-11 04:47:47 +08:00
imxrt: make DTCM heap size configurable
By default, the full configured DTCM region is assigned to the heap for dynamic allocation. In scenarios requiring deterministic memory regions for static buffers or control structures, you can reduce the heap allocation to reserve part of DTCM for manual/static use. This kconfig symbol allows to limit the size. Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
This commit is contained in:
committed by
Matteo Golin
parent
2ecd2722cd
commit
e6c982892b
@@ -2633,7 +2633,17 @@ config IMXRT_DTCM_HEAP
|
||||
bool "Add DTCM to heap"
|
||||
depends on IMXRT_DTCM > 0
|
||||
---help---
|
||||
Select to add the entire DTCM to the heap
|
||||
Select to add the DTCM to the heap
|
||||
|
||||
config IMXRT_DTCM_HEAP_SIZE
|
||||
int "DTCM heap Size in K"
|
||||
depends on IMXRT_DTCM_HEAP
|
||||
default IMXRT_DTCM
|
||||
---help---
|
||||
By default, the full configured DTCM region is assigned to the heap for
|
||||
dynamic allocation. In scenarios requiring deterministic memory regions
|
||||
for static buffers or control structures, you can reduce the heap
|
||||
allocation to reserve part of DTCM for manual/static use.
|
||||
|
||||
config IMXRT_BOOTLOADER_HEAP
|
||||
bool "Add ROM bootloader 40Kib RAM to heap"
|
||||
|
||||
@@ -203,7 +203,7 @@ extern const uint32_t _ram_size[]; /* See linker script */
|
||||
# define IMXRT_OCRAM_ASSIGNED 1
|
||||
#elif defined(CONFIG_IMXRT_DTCM_HEAP) && !defined(IMXRT_DCTM_ASSIGNED)
|
||||
# define REGION1_RAM_START IMXRT_DTCM_BASE
|
||||
# define REGION1_RAM_SIZE CONFIG_DTCM_USED
|
||||
# define REGION1_RAM_SIZE (CONFIG_IMXRT_DTCM_HEAP_SIZE * 1024)
|
||||
# define IMXRT_DCTM_ASSIGNED 1
|
||||
#elif defined(CONFIG_IMXRT_SDRAM_HEAP) && !defined(IMXRT_SDRAM_ASSIGNED)
|
||||
# define REGION1_RAM_START (CONFIG_IMXRT_SDRAM_START + CONFIG_IMXRT_SDRAM_HEAPOFFSET)
|
||||
|
||||
Reference in New Issue
Block a user