Target_NXP: Setup heap limit and size

pull/9571/head
Deepika 2019-02-07 09:29:34 -06:00 committed by deepikabhavnani
parent b2e189f453
commit 57b9ccc517
26 changed files with 29 additions and 26 deletions

View File

@ -138,6 +138,7 @@ SECTIONS
__end__ = .; __end__ = .;
end = __end__; end = __end__;
*(.heap*) *(.heap*)
. = ORIGIN(RAM) + LENGTH(RAM) - STACK_SIZE;
__HeapLimit = .; __HeapLimit = .;
} > RAM } > RAM

View File

@ -138,6 +138,7 @@ SECTIONS
__end__ = .; __end__ = .;
end = __end__; end = __end__;
*(.heap*) *(.heap*)
. = ORIGIN(RAM) + LENGTH(RAM) - STACK_SIZE;
__HeapLimit = .; __HeapLimit = .;
} > RAM } > RAM

View File

@ -136,6 +136,7 @@ SECTIONS
__end__ = .; __end__ = .;
end = __end__; end = __end__;
*(.heap*) *(.heap*)
. = ORIGIN(RAM) + LENGTH(RAM) - STACK_SIZE;
__HeapLimit = .; __HeapLimit = .;
} > RAM } > RAM

View File

@ -136,6 +136,7 @@ SECTIONS
__end__ = .; __end__ = .;
end = __end__; end = __end__;
*(.heap*) *(.heap*)
. = ORIGIN(RAM) + LENGTH(RAM) - STACK_SIZE;
__HeapLimit = .; __HeapLimit = .;
} > RAM } > RAM

View File

@ -136,6 +136,7 @@ SECTIONS
__end__ = .; __end__ = .;
end = __end__; end = __end__;
*(.heap*) *(.heap*)
. = ORIGIN(RAM) + LENGTH(RAM) - STACK_SIZE;
__HeapLimit = .; __HeapLimit = .;
} > RAM } > RAM

View File

@ -136,6 +136,7 @@ SECTIONS
__end__ = .; __end__ = .;
end = __end__; end = __end__;
*(.heap*) *(.heap*)
. = ORIGIN(RAM) + LENGTH(RAM) - STACK_SIZE;
__HeapLimit = .; __HeapLimit = .;
} > RAM } > RAM

View File

@ -137,6 +137,7 @@ SECTIONS
__end__ = .; __end__ = .;
end = __end__; end = __end__;
*(.heap*) *(.heap*)
. = ORIGIN(RAM) + LENGTH(RAM) - STACK_SIZE;
__HeapLimit = .; __HeapLimit = .;
} > RAM } > RAM

View File

@ -136,6 +136,7 @@ SECTIONS
__end__ = .; __end__ = .;
end = __end__; end = __end__;
*(.heap*) *(.heap*)
. = ORIGIN(RAM) + LENGTH(RAM) - STACK_SIZE;
__HeapLimit = .; __HeapLimit = .;
} > RAM } > RAM

View File

@ -136,6 +136,7 @@ SECTIONS
__end__ = .; __end__ = .;
end = __end__; end = __end__;
*(.heap*) *(.heap*)
. = ORIGIN(RAM) + LENGTH(RAM) - STACK_SIZE;
__HeapLimit = .; __HeapLimit = .;
} > RAM } > RAM

View File

@ -138,6 +138,7 @@ SECTIONS
__end__ = .; __end__ = .;
end = __end__; end = __end__;
*(.heap*) *(.heap*)
. = ORIGIN(RAM) + LENGTH(RAM) - STACK_SIZE;
__HeapLimit = .; __HeapLimit = .;
} > RAM } > RAM

View File

@ -133,6 +133,7 @@ SECTIONS
__end__ = .; __end__ = .;
end = __end__; end = __end__;
*(.heap*) *(.heap*)
. = ORIGIN(RAM) + LENGTH(RAM) - STACK_SIZE;
__HeapLimit = .; __HeapLimit = .;
} > RAM } > RAM

View File

@ -133,6 +133,7 @@ SECTIONS
__end__ = .; __end__ = .;
end = __end__; end = __end__;
*(.heap*) *(.heap*)
. = ORIGIN(RAM) + LENGTH(RAM) - STACK_SIZE;
__HeapLimit = .; __HeapLimit = .;
} > RAM } > RAM

View File

@ -133,6 +133,7 @@ SECTIONS
__end__ = .; __end__ = .;
end = __end__; end = __end__;
*(.heap*) *(.heap*)
. = ORIGIN(RAM) + LENGTH(RAM) - STACK_SIZE;
__HeapLimit = .; __HeapLimit = .;
} > RAM } > RAM

View File

@ -150,6 +150,7 @@ SECTIONS
__end__ = .; __end__ = .;
end = __end__; end = __end__;
*(.heap*) *(.heap*)
. = ORIGIN(RAM) + LENGTH(RAM) - STACK_SIZE;
__HeapLimit = .; __HeapLimit = .;
} > RAM } > RAM

View File

@ -137,6 +137,7 @@ SECTIONS
__end__ = .; __end__ = .;
end = __end__; end = __end__;
*(.heap*) *(.heap*)
. = ORIGIN(RAM) + LENGTH(RAM) - STACK_SIZE;
__HeapLimit = .; __HeapLimit = .;
} > RAM } > RAM

View File

@ -137,6 +137,7 @@ SECTIONS
__end__ = .; __end__ = .;
end = __end__; end = __end__;
*(.heap*) *(.heap*)
. = ORIGIN(RAM) + LENGTH(RAM) - STACK_SIZE;
__HeapLimit = .; __HeapLimit = .;
} > RAM } > RAM

View File

@ -139,6 +139,7 @@ SECTIONS
__end__ = .; __end__ = .;
end = __end__; end = __end__;
*(.heap*) *(.heap*)
. = ORIGIN(RAM1) + LENGTH(RAM1) - STACK_SIZE;
__HeapLimit = .; __HeapLimit = .;
} > RAM1 } > RAM1

View File

@ -133,6 +133,7 @@ SECTIONS
__end__ = .; __end__ = .;
end = __end__; end = __end__;
*(.heap*) *(.heap*)
. = ORIGIN(RAM) + LENGTH(RAM) - STACK_SIZE;
__HeapLimit = .; __HeapLimit = .;
} > RAM } > RAM

View File

@ -133,6 +133,7 @@ SECTIONS
__end__ = .; __end__ = .;
end = __end__; end = __end__;
*(.heap*) *(.heap*)
. = ORIGIN(RAM) + LENGTH(RAM) - STACK_SIZE;
__HeapLimit = .; __HeapLimit = .;
} > RAM } > RAM

View File

@ -133,6 +133,7 @@ SECTIONS
__end__ = .; __end__ = .;
end = __end__; end = __end__;
*(.heap*) *(.heap*)
. = ORIGIN(RAM) + LENGTH(RAM) - STACK_SIZE;
__HeapLimit = .; __HeapLimit = .;
} > RAM } > RAM

View File

@ -133,6 +133,7 @@ SECTIONS
__end__ = .; __end__ = .;
end = __end__; end = __end__;
*(.heap*) *(.heap*)
. = ORIGIN(RAM) + LENGTH(RAM) - STACK_SIZE;
__HeapLimit = .; __HeapLimit = .;
} > RAM } > RAM

View File

@ -134,6 +134,7 @@ SECTIONS
__end__ = .; __end__ = .;
end = __end__; end = __end__;
*(.heap*) *(.heap*)
. = ORIGIN(RAM) + LENGTH(RAM) - STACK_SIZE;
__HeapLimit = .; __HeapLimit = .;
} > RAM } > RAM

View File

@ -85,9 +85,6 @@ __ram_vector_table__ = 1;
#endif #endif
__stack_size__ = MBED_BOOT_STACK_SIZE; __stack_size__ = MBED_BOOT_STACK_SIZE;
__heap_size__ = 0x4000;
HEAP_SIZE = DEFINED(__heap_size__) ? __heap_size__ : 0x0400;
STACK_SIZE = DEFINED(__stack_size__) ? __stack_size__ : 0x0800; STACK_SIZE = DEFINED(__stack_size__) ? __stack_size__ : 0x0800;
M_VECTOR_RAM_SIZE = DEFINED(__ram_vector_table__) ? 0xE4 : 0x0; M_VECTOR_RAM_SIZE = DEFINED(__ram_vector_table__) ? 0xE4 : 0x0;
RPMSG_SHMEM_SIZE = DEFINED(__use_shmem__) ? 0x1800 : 0; RPMSG_SHMEM_SIZE = DEFINED(__use_shmem__) ? 0x1800 : 0;
@ -273,7 +270,7 @@ SECTIONS
__end__ = .; __end__ = .;
PROVIDE(end = .); PROVIDE(end = .);
__HeapBase = .; __HeapBase = .;
. += HEAP_SIZE; . = ORIGIN(m_data) + LENGTH(m_data) - STACK_SIZE;
__HeapLimit = .; __HeapLimit = .;
__heap_limit = .; /* Add for _sbrk */ __heap_limit = .; /* Add for _sbrk */
} > m_data } > m_data

View File

@ -53,9 +53,6 @@ __ram_vector_table__ = 1;
#endif #endif
__stack_size__ = MBED_BOOT_STACK_SIZE; __stack_size__ = MBED_BOOT_STACK_SIZE;
__heap_size__ = 0xC000;
HEAP_SIZE = DEFINED(__heap_size__) ? __heap_size__ : 0x0400;
STACK_SIZE = DEFINED(__stack_size__) ? __stack_size__ : 0x0800; STACK_SIZE = DEFINED(__stack_size__) ? __stack_size__ : 0x0800;
M_VECTOR_RAM_SIZE = DEFINED(__ram_vector_table__) ? 0x400 : 0x0; M_VECTOR_RAM_SIZE = DEFINED(__ram_vector_table__) ? 0x400 : 0x0;
@ -223,7 +220,7 @@ SECTIONS
__end__ = .; __end__ = .;
PROVIDE(end = .); PROVIDE(end = .);
__HeapBase = .; __HeapBase = .;
. += HEAP_SIZE; . = ORIGIN(m_data) + LENGTH(m_data) - STACK_SIZE;
__HeapLimit = .; __HeapLimit = .;
__heap_limit = .; /* Add for _sbrk */ __heap_limit = .; /* Add for _sbrk */
} > m_data } > m_data

View File

@ -63,9 +63,7 @@ __ram_vector_table__ = 1;
#endif #endif
__stack_size__ = MBED_BOOT_STACK_SIZE; __stack_size__ = MBED_BOOT_STACK_SIZE;
__heap_size__ = 0x10000;
HEAP_SIZE = DEFINED(__heap_size__) ? __heap_size__ : 0x0400;
STACK_SIZE = DEFINED(__stack_size__) ? __stack_size__ : 0x0400; STACK_SIZE = DEFINED(__stack_size__) ? __stack_size__ : 0x0400;
M_VECTOR_RAM_SIZE = DEFINED(__ram_vector_table__) ? 0x0400 : 0x0; M_VECTOR_RAM_SIZE = DEFINED(__ram_vector_table__) ? 0x0400 : 0x0;
@ -286,7 +284,7 @@ SECTIONS
__end__ = .; __end__ = .;
PROVIDE(end = .); PROVIDE(end = .);
__HeapBase = .; __HeapBase = .;
. += HEAP_SIZE; . = ORIGIN(m_data) + LENGTH(m_data) - STACK_SIZE;
__HeapLimit = .; __HeapLimit = .;
__heap_limit = .; /* Add for _sbrk */ __heap_limit = .; /* Add for _sbrk */
} > m_data } > m_data

View File

@ -97,24 +97,13 @@
#elif defined(TARGET_MIMXRT1050_EVK) #elif defined(TARGET_MIMXRT1050_EVK)
#if defined(__CC_ARM) || (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)) #if defined(__ARMCC_VERSION)
extern uint32_t Image$$RW_IRAM1$$ZI$$Base[]; extern uint32_t Image$$RW_IRAM1$$ZI$$Base[];
extern uint32_t Image$$RW_IRAM1$$ZI$$Length[]; extern uint32_t Image$$RW_IRAM1$$ZI$$Length[];
extern uint32_t Image$$ARM_LIB_STACK$$ZI$$Base[]; #define HEAP_START Image$$RW_IRAM1$$ZI$$Base
extern uint32_t Image$$ARM_LIB_STACK$$ZI$$Length[]; #define HEAP_SIZE Image$$RW_IRAM1$$ZI$$Length
#define HEAP_START ((unsigned char*) Image$$RW_IRAM1$$ZI$$Base)
#define HEAP_SIZE ((uint32_t) Image$$RW_IRAM1$$ZI$$Length)
#define ISR_STACK_START ((unsigned char*)Image$$ARM_LIB_STACK$$ZI$$Base)
#define ISR_STACK_SIZE ((uint32_t)Image$$ARM_LIB_STACK$$ZI$$Length)
#elif defined(__GNUC__) #elif defined(__GNUC__)
extern uint32_t __StackTop[]; /* No region declarations needed */
extern uint32_t __StackLimit[];
extern uint32_t __end__;
extern uint32_t __HeapLimit[];
#define HEAP_START ((unsigned char*)&__end__)
#define HEAP_SIZE ((uint32_t)((uint32_t)__HeapLimit - (uint32_t)HEAP_START))
#define ISR_STACK_START ((unsigned char*)__StackLimit)
#define ISR_STACK_SIZE ((uint32_t)((uint32_t)__StackTop - (uint32_t)__StackLimit))
#elif defined(__ICCARM__) #elif defined(__ICCARM__)
/* No region declarations needed */ /* No region declarations needed */
#else #else