mirror of https://github.com/ARMmbed/mbed-os.git
Target_NXP: Setup heap limit and size
parent
b2e189f453
commit
57b9ccc517
|
@ -138,6 +138,7 @@ SECTIONS
|
|||
__end__ = .;
|
||||
end = __end__;
|
||||
*(.heap*)
|
||||
. = ORIGIN(RAM) + LENGTH(RAM) - STACK_SIZE;
|
||||
__HeapLimit = .;
|
||||
} > RAM
|
||||
|
||||
|
|
|
@ -138,6 +138,7 @@ SECTIONS
|
|||
__end__ = .;
|
||||
end = __end__;
|
||||
*(.heap*)
|
||||
. = ORIGIN(RAM) + LENGTH(RAM) - STACK_SIZE;
|
||||
__HeapLimit = .;
|
||||
} > RAM
|
||||
|
||||
|
|
|
@ -136,6 +136,7 @@ SECTIONS
|
|||
__end__ = .;
|
||||
end = __end__;
|
||||
*(.heap*)
|
||||
. = ORIGIN(RAM) + LENGTH(RAM) - STACK_SIZE;
|
||||
__HeapLimit = .;
|
||||
} > RAM
|
||||
|
||||
|
|
|
@ -136,6 +136,7 @@ SECTIONS
|
|||
__end__ = .;
|
||||
end = __end__;
|
||||
*(.heap*)
|
||||
. = ORIGIN(RAM) + LENGTH(RAM) - STACK_SIZE;
|
||||
__HeapLimit = .;
|
||||
} > RAM
|
||||
|
||||
|
|
|
@ -136,6 +136,7 @@ SECTIONS
|
|||
__end__ = .;
|
||||
end = __end__;
|
||||
*(.heap*)
|
||||
. = ORIGIN(RAM) + LENGTH(RAM) - STACK_SIZE;
|
||||
__HeapLimit = .;
|
||||
} > RAM
|
||||
|
||||
|
|
|
@ -136,6 +136,7 @@ SECTIONS
|
|||
__end__ = .;
|
||||
end = __end__;
|
||||
*(.heap*)
|
||||
. = ORIGIN(RAM) + LENGTH(RAM) - STACK_SIZE;
|
||||
__HeapLimit = .;
|
||||
} > RAM
|
||||
|
||||
|
|
|
@ -137,6 +137,7 @@ SECTIONS
|
|||
__end__ = .;
|
||||
end = __end__;
|
||||
*(.heap*)
|
||||
. = ORIGIN(RAM) + LENGTH(RAM) - STACK_SIZE;
|
||||
__HeapLimit = .;
|
||||
} > RAM
|
||||
|
||||
|
|
|
@ -136,6 +136,7 @@ SECTIONS
|
|||
__end__ = .;
|
||||
end = __end__;
|
||||
*(.heap*)
|
||||
. = ORIGIN(RAM) + LENGTH(RAM) - STACK_SIZE;
|
||||
__HeapLimit = .;
|
||||
} > RAM
|
||||
|
||||
|
|
|
@ -136,6 +136,7 @@ SECTIONS
|
|||
__end__ = .;
|
||||
end = __end__;
|
||||
*(.heap*)
|
||||
. = ORIGIN(RAM) + LENGTH(RAM) - STACK_SIZE;
|
||||
__HeapLimit = .;
|
||||
} > RAM
|
||||
|
||||
|
|
|
@ -138,6 +138,7 @@ SECTIONS
|
|||
__end__ = .;
|
||||
end = __end__;
|
||||
*(.heap*)
|
||||
. = ORIGIN(RAM) + LENGTH(RAM) - STACK_SIZE;
|
||||
__HeapLimit = .;
|
||||
} > RAM
|
||||
|
||||
|
|
|
@ -133,6 +133,7 @@ SECTIONS
|
|||
__end__ = .;
|
||||
end = __end__;
|
||||
*(.heap*)
|
||||
. = ORIGIN(RAM) + LENGTH(RAM) - STACK_SIZE;
|
||||
__HeapLimit = .;
|
||||
} > RAM
|
||||
|
||||
|
|
|
@ -133,6 +133,7 @@ SECTIONS
|
|||
__end__ = .;
|
||||
end = __end__;
|
||||
*(.heap*)
|
||||
. = ORIGIN(RAM) + LENGTH(RAM) - STACK_SIZE;
|
||||
__HeapLimit = .;
|
||||
} > RAM
|
||||
|
||||
|
|
|
@ -133,6 +133,7 @@ SECTIONS
|
|||
__end__ = .;
|
||||
end = __end__;
|
||||
*(.heap*)
|
||||
. = ORIGIN(RAM) + LENGTH(RAM) - STACK_SIZE;
|
||||
__HeapLimit = .;
|
||||
} > RAM
|
||||
|
||||
|
|
|
@ -150,6 +150,7 @@ SECTIONS
|
|||
__end__ = .;
|
||||
end = __end__;
|
||||
*(.heap*)
|
||||
. = ORIGIN(RAM) + LENGTH(RAM) - STACK_SIZE;
|
||||
__HeapLimit = .;
|
||||
} > RAM
|
||||
|
||||
|
|
|
@ -137,6 +137,7 @@ SECTIONS
|
|||
__end__ = .;
|
||||
end = __end__;
|
||||
*(.heap*)
|
||||
. = ORIGIN(RAM) + LENGTH(RAM) - STACK_SIZE;
|
||||
__HeapLimit = .;
|
||||
} > RAM
|
||||
|
||||
|
|
|
@ -137,6 +137,7 @@ SECTIONS
|
|||
__end__ = .;
|
||||
end = __end__;
|
||||
*(.heap*)
|
||||
. = ORIGIN(RAM) + LENGTH(RAM) - STACK_SIZE;
|
||||
__HeapLimit = .;
|
||||
} > RAM
|
||||
|
||||
|
|
|
@ -139,6 +139,7 @@ SECTIONS
|
|||
__end__ = .;
|
||||
end = __end__;
|
||||
*(.heap*)
|
||||
. = ORIGIN(RAM1) + LENGTH(RAM1) - STACK_SIZE;
|
||||
__HeapLimit = .;
|
||||
} > RAM1
|
||||
|
||||
|
|
|
@ -133,6 +133,7 @@ SECTIONS
|
|||
__end__ = .;
|
||||
end = __end__;
|
||||
*(.heap*)
|
||||
. = ORIGIN(RAM) + LENGTH(RAM) - STACK_SIZE;
|
||||
__HeapLimit = .;
|
||||
} > RAM
|
||||
|
||||
|
|
|
@ -133,6 +133,7 @@ SECTIONS
|
|||
__end__ = .;
|
||||
end = __end__;
|
||||
*(.heap*)
|
||||
. = ORIGIN(RAM) + LENGTH(RAM) - STACK_SIZE;
|
||||
__HeapLimit = .;
|
||||
} > RAM
|
||||
|
||||
|
|
|
@ -133,6 +133,7 @@ SECTIONS
|
|||
__end__ = .;
|
||||
end = __end__;
|
||||
*(.heap*)
|
||||
. = ORIGIN(RAM) + LENGTH(RAM) - STACK_SIZE;
|
||||
__HeapLimit = .;
|
||||
} > RAM
|
||||
|
||||
|
|
|
@ -133,6 +133,7 @@ SECTIONS
|
|||
__end__ = .;
|
||||
end = __end__;
|
||||
*(.heap*)
|
||||
. = ORIGIN(RAM) + LENGTH(RAM) - STACK_SIZE;
|
||||
__HeapLimit = .;
|
||||
} > RAM
|
||||
|
||||
|
|
|
@ -134,6 +134,7 @@ SECTIONS
|
|||
__end__ = .;
|
||||
end = __end__;
|
||||
*(.heap*)
|
||||
. = ORIGIN(RAM) + LENGTH(RAM) - STACK_SIZE;
|
||||
__HeapLimit = .;
|
||||
} > RAM
|
||||
|
||||
|
|
|
@ -85,9 +85,6 @@ __ram_vector_table__ = 1;
|
|||
#endif
|
||||
|
||||
__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;
|
||||
M_VECTOR_RAM_SIZE = DEFINED(__ram_vector_table__) ? 0xE4 : 0x0;
|
||||
RPMSG_SHMEM_SIZE = DEFINED(__use_shmem__) ? 0x1800 : 0;
|
||||
|
@ -273,7 +270,7 @@ SECTIONS
|
|||
__end__ = .;
|
||||
PROVIDE(end = .);
|
||||
__HeapBase = .;
|
||||
. += HEAP_SIZE;
|
||||
. = ORIGIN(m_data) + LENGTH(m_data) - STACK_SIZE;
|
||||
__HeapLimit = .;
|
||||
__heap_limit = .; /* Add for _sbrk */
|
||||
} > m_data
|
||||
|
|
|
@ -53,9 +53,6 @@ __ram_vector_table__ = 1;
|
|||
#endif
|
||||
|
||||
__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;
|
||||
M_VECTOR_RAM_SIZE = DEFINED(__ram_vector_table__) ? 0x400 : 0x0;
|
||||
|
||||
|
@ -223,7 +220,7 @@ SECTIONS
|
|||
__end__ = .;
|
||||
PROVIDE(end = .);
|
||||
__HeapBase = .;
|
||||
. += HEAP_SIZE;
|
||||
. = ORIGIN(m_data) + LENGTH(m_data) - STACK_SIZE;
|
||||
__HeapLimit = .;
|
||||
__heap_limit = .; /* Add for _sbrk */
|
||||
} > m_data
|
||||
|
|
|
@ -63,9 +63,7 @@ __ram_vector_table__ = 1;
|
|||
#endif
|
||||
|
||||
__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;
|
||||
M_VECTOR_RAM_SIZE = DEFINED(__ram_vector_table__) ? 0x0400 : 0x0;
|
||||
|
||||
|
@ -286,7 +284,7 @@ SECTIONS
|
|||
__end__ = .;
|
||||
PROVIDE(end = .);
|
||||
__HeapBase = .;
|
||||
. += HEAP_SIZE;
|
||||
. = ORIGIN(m_data) + LENGTH(m_data) - STACK_SIZE;
|
||||
__HeapLimit = .;
|
||||
__heap_limit = .; /* Add for _sbrk */
|
||||
} > m_data
|
||||
|
|
|
@ -97,24 +97,13 @@
|
|||
|
||||
#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$$Length[];
|
||||
extern uint32_t Image$$ARM_LIB_STACK$$ZI$$Base[];
|
||||
extern uint32_t Image$$ARM_LIB_STACK$$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)
|
||||
#define HEAP_START Image$$RW_IRAM1$$ZI$$Base
|
||||
#define HEAP_SIZE Image$$RW_IRAM1$$ZI$$Length
|
||||
#elif defined(__GNUC__)
|
||||
extern uint32_t __StackTop[];
|
||||
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))
|
||||
/* No region declarations needed */
|
||||
#elif defined(__ICCARM__)
|
||||
/* No region declarations needed */
|
||||
#else
|
||||
|
|
Loading…
Reference in New Issue