mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
ports/mimxrt: Update linker script.
Add more GC blocks, and separate the main GC heap from main memory.
This commit is contained in:
parent
c79b3aecbb
commit
d51a11edbf
@ -69,6 +69,18 @@ _vospi_buf = ORIGIN(OMV_VOSPI_MEMORY) + OMV_VOSPI_MEMORY_OFFSET;
|
|||||||
// _micropy_hw_internal_flash_storage_start = ORIGIN(FLASH_FFS);
|
// _micropy_hw_internal_flash_storage_start = ORIGIN(FLASH_FFS);
|
||||||
// _micropy_hw_internal_flash_storage_end = ORIGIN(FLASH_FFS) + LENGTH(FLASH_FFS);
|
// _micropy_hw_internal_flash_storage_end = ORIGIN(FLASH_FFS) + LENGTH(FLASH_FFS);
|
||||||
|
|
||||||
|
#define OMV_DEFINE_GC_BLOCK(n) \
|
||||||
|
.gc_block##n (NOLOAD) : \
|
||||||
|
{ \
|
||||||
|
. = ALIGN(4); \
|
||||||
|
. += OMV_GC_BLOCK##n##_SIZE; \
|
||||||
|
. = ALIGN(4); \
|
||||||
|
} >OMV_GC_BLOCK##n##_MEMORY \
|
||||||
|
|
||||||
|
#define OMV_ADD_GC_BLOCK(n) \
|
||||||
|
LONG (ADDR(.gc_block##n)) \
|
||||||
|
LONG (SIZEOF(.gc_block##n) / 4)
|
||||||
|
|
||||||
/* Define output sections */
|
/* Define output sections */
|
||||||
SECTIONS
|
SECTIONS
|
||||||
{
|
{
|
||||||
@ -173,8 +185,7 @@ SECTIONS
|
|||||||
|
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
_heap_end = .;
|
_heap_end = .;
|
||||||
|
} >OMV_HEAP_MEMORY
|
||||||
} > OMV_MAIN_MEMORY
|
|
||||||
|
|
||||||
._stack (NOLOAD) :
|
._stack (NOLOAD) :
|
||||||
{
|
{
|
||||||
@ -188,21 +199,27 @@ SECTIONS
|
|||||||
} >OMV_STACK_MEMORY
|
} >OMV_STACK_MEMORY
|
||||||
|
|
||||||
#if defined(OMV_GC_BLOCK0_MEMORY)
|
#if defined(OMV_GC_BLOCK0_MEMORY)
|
||||||
.gc_block0 (NOLOAD) :
|
OMV_DEFINE_GC_BLOCK(0)
|
||||||
{
|
#endif
|
||||||
. = ALIGN(4);
|
#if defined(OMV_GC_BLOCK1_MEMORY)
|
||||||
. += OMV_GC_BLOCK0_SIZE;
|
OMV_DEFINE_GC_BLOCK(1)
|
||||||
. = ALIGN(4);
|
#endif
|
||||||
} >OMV_GC_BLOCK0_MEMORY
|
#if defined(OMV_GC_BLOCK2_MEMORY)
|
||||||
|
OMV_DEFINE_GC_BLOCK(2)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
.gc_blocks_table :
|
.gc_blocks_table (READONLY) :
|
||||||
{
|
{
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
_gc_blocks_table_start = .;
|
_gc_blocks_table_start = .;
|
||||||
#if defined(OMV_GC_BLOCK0_MEMORY)
|
#if defined(OMV_GC_BLOCK0_MEMORY)
|
||||||
LONG (ADDR(.gc_block0))
|
OMV_ADD_GC_BLOCK(0)
|
||||||
LONG (SIZEOF(.gc_block0) / 4)
|
#endif
|
||||||
|
#if defined(OMV_GC_BLOCK1_MEMORY)
|
||||||
|
OMV_ADD_GC_BLOCK(1)
|
||||||
|
#endif
|
||||||
|
#if defined(OMV_GC_BLOCK2_MEMORY)
|
||||||
|
OMV_ADD_GC_BLOCK(2)
|
||||||
#endif
|
#endif
|
||||||
_gc_blocks_table_end = .;
|
_gc_blocks_table_end = .;
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user