mirror of https://github.com/ARMmbed/mbed-os.git
Refactor definition of heap load region start
parent
18d8499979
commit
1c671c43ff
|
@ -35,16 +35,19 @@
|
||||||
#define Stack_Size MBED_CONF_TARGET_BOOT_STACK_SIZE
|
#define Stack_Size MBED_CONF_TARGET_BOOT_STACK_SIZE
|
||||||
#define RAM_FIXED_SIZE (Stack_Size + VECTOR_SIZE)
|
#define RAM_FIXED_SIZE (Stack_Size + VECTOR_SIZE)
|
||||||
|
|
||||||
|
#define MBED_RAM1_START (MBED_RAM_START+VECTOR_SIZE)
|
||||||
|
#define MBED_RAM1_SIZE (MBED_RAM_SIZE-RAM_FIXED_SIZE)
|
||||||
|
|
||||||
LR_IROM1 MBED_APP_START MBED_APP_SIZE { ; load region size_region
|
LR_IROM1 MBED_APP_START MBED_APP_SIZE { ; load region size_region
|
||||||
ER_IROM1 MBED_APP_START MBED_APP_SIZE { ; load address = execution address
|
ER_IROM1 MBED_APP_START MBED_APP_SIZE { ; load address = execution address
|
||||||
*.o (RESET, +First)
|
*.o (RESET, +First)
|
||||||
*(InRoot$$Sections)
|
*(InRoot$$Sections)
|
||||||
.ANY (+RO)
|
.ANY (+RO)
|
||||||
}
|
}
|
||||||
RW_IRAM1 (MBED_RAM_START+VECTOR_SIZE) (MBED_RAM_SIZE-RAM_FIXED_SIZE) { ; RW data
|
RW_IRAM1 MBED_RAM1_START MBED_RAM1_SIZE { ; RW data
|
||||||
.ANY (+RW +ZI)
|
.ANY (+RW +ZI)
|
||||||
}
|
}
|
||||||
ARM_LIB_HEAP AlignExpr(+0, +16) EMPTY (MBED_RAM_SIZE - RAM_FIXED_SIZE - (AlignExpr(ImageLimit(RW_IRAM1), 16) - MBED_RAM_START)){ ; heap region growing up
|
ARM_LIB_HEAP AlignExpr(+0, +16) EMPTY (MBED_RAM_SIZE - RAM_FIXED_SIZE - (AlignExpr(ImageLimit(RW_IRAM1), 16) - MBED_RAM1_START)){ ; heap region growing up
|
||||||
}
|
}
|
||||||
ARM_LIB_STACK (MBED_RAM_START+MBED_RAM_SIZE) EMPTY -Stack_Size { ; stack region growing down
|
ARM_LIB_STACK (MBED_RAM_START+MBED_RAM_SIZE) EMPTY -Stack_Size { ; stack region growing down
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,6 +32,9 @@
|
||||||
#define Stack_Size MBED_CONF_TARGET_BOOT_STACK_SIZE
|
#define Stack_Size MBED_CONF_TARGET_BOOT_STACK_SIZE
|
||||||
#define RAM_FIXED_SIZE (Stack_Size + VECTOR_SIZE)
|
#define RAM_FIXED_SIZE (Stack_Size + VECTOR_SIZE)
|
||||||
|
|
||||||
|
#define MBED_RAM1_START (MBED_RAM_START+VECTOR_SIZE)
|
||||||
|
#define MBED_RAM1_SIZE (MBED_RAM_SIZE-RAM_FIXED_SIZE)
|
||||||
|
|
||||||
LR_IROM1 MBED_APP_START MBED_APP_SIZE { ; load region size_region
|
LR_IROM1 MBED_APP_START MBED_APP_SIZE { ; load region size_region
|
||||||
ER_IROM1 MBED_APP_START MBED_APP_SIZE { ; load address = execution address
|
ER_IROM1 MBED_APP_START MBED_APP_SIZE { ; load address = execution address
|
||||||
*.o (RESET, +First)
|
*.o (RESET, +First)
|
||||||
|
@ -39,11 +42,11 @@ LR_IROM1 MBED_APP_START MBED_APP_SIZE { ; load region size_region
|
||||||
.ANY (+RO)
|
.ANY (+RO)
|
||||||
}
|
}
|
||||||
|
|
||||||
RW_IRAM1 (MBED_RAM_START+VECTOR_SIZE) (MBED_RAM_SIZE-RAM_FIXED_SIZE) { ; RW data
|
RW_IRAM1 MBED_RAM1_START MBED_RAM1_SIZE { ; RW data
|
||||||
.ANY (+RW +ZI)
|
.ANY (+RW +ZI)
|
||||||
}
|
}
|
||||||
|
|
||||||
ARM_LIB_HEAP AlignExpr(+0, +16) EMPTY (MBED_RAM_SIZE - RAM_FIXED_SIZE - (AlignExpr(ImageLimit(RW_IRAM1), 16) - MBED_RAM_START)){ ; heap region growing up
|
ARM_LIB_HEAP AlignExpr(+0, +16) EMPTY (MBED_RAM_SIZE - RAM_FIXED_SIZE - (AlignExpr(ImageLimit(RW_IRAM1), 16) - MBED_RAM1_START)){ ; heap region growing up
|
||||||
}
|
}
|
||||||
ARM_LIB_STACK (MBED_RAM_START+MBED_RAM_SIZE) EMPTY -Stack_Size { ; stack region growing down
|
ARM_LIB_STACK (MBED_RAM_START+MBED_RAM_SIZE) EMPTY -Stack_Size { ; stack region growing down
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,6 +32,9 @@
|
||||||
#define Stack_Size MBED_CONF_TARGET_BOOT_STACK_SIZE
|
#define Stack_Size MBED_CONF_TARGET_BOOT_STACK_SIZE
|
||||||
#define RAM_FIXED_SIZE (Stack_Size + VECTOR_SIZE)
|
#define RAM_FIXED_SIZE (Stack_Size + VECTOR_SIZE)
|
||||||
|
|
||||||
|
#define MBED_RAM1_START (MBED_RAM_START+VECTOR_SIZE)
|
||||||
|
#define MBED_RAM1_SIZE (MBED_RAM_SIZE-RAM_FIXED_SIZE)
|
||||||
|
|
||||||
LR_IROM1 MBED_APP_START MBED_APP_SIZE { ; load region size_region
|
LR_IROM1 MBED_APP_START MBED_APP_SIZE { ; load region size_region
|
||||||
ER_IROM1 MBED_APP_START MBED_APP_SIZE { ; load address = execution address
|
ER_IROM1 MBED_APP_START MBED_APP_SIZE { ; load address = execution address
|
||||||
*.o (RESET, +First)
|
*.o (RESET, +First)
|
||||||
|
@ -40,10 +43,10 @@ LR_IROM1 MBED_APP_START MBED_APP_SIZE { ; load region size_region
|
||||||
}
|
}
|
||||||
|
|
||||||
; [RAM] Vector table dynamic copy: 68 vectors * 4 bytes = 272 (0x110)
|
; [RAM] Vector table dynamic copy: 68 vectors * 4 bytes = 272 (0x110)
|
||||||
RW_IRAM1 (MBED_RAM_START+VECTOR_SIZE) (MBED_RAM_SIZE-RAM_FIXED_SIZE) { ; RW data
|
RW_IRAM1 MBED_RAM1_START MBED_RAM1_SIZE { ; RW data
|
||||||
.ANY (+RW +ZI)
|
.ANY (+RW +ZI)
|
||||||
}
|
}
|
||||||
ARM_LIB_HEAP AlignExpr(+0, +16) EMPTY (MBED_RAM_SIZE - RAM_FIXED_SIZE - (AlignExpr(ImageLimit(RW_IRAM1), 16) - MBED_RAM_START)){ ; heap region growing up
|
ARM_LIB_HEAP AlignExpr(+0, +16) EMPTY (MBED_RAM_SIZE - RAM_FIXED_SIZE - (AlignExpr(ImageLimit(RW_IRAM1), 16) - MBED_RAM1_START)){ ; heap region growing up
|
||||||
}
|
}
|
||||||
ARM_LIB_STACK (MBED_RAM_START+MBED_RAM_SIZE) EMPTY -Stack_Size { ; stack region growing down
|
ARM_LIB_STACK (MBED_RAM_START+MBED_RAM_SIZE) EMPTY -Stack_Size { ; stack region growing down
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,6 +33,9 @@
|
||||||
#define Stack_Size MBED_CONF_TARGET_BOOT_STACK_SIZE
|
#define Stack_Size MBED_CONF_TARGET_BOOT_STACK_SIZE
|
||||||
#define RAM_FIXED_SIZE (Stack_Size + VECTOR_SIZE)
|
#define RAM_FIXED_SIZE (Stack_Size + VECTOR_SIZE)
|
||||||
|
|
||||||
|
#define MBED_RAM1_START (MBED_RAM_START+VECTOR_SIZE)
|
||||||
|
#define MBED_RAM1_SIZE (MBED_RAM_SIZE-RAM_FIXED_SIZE)
|
||||||
|
|
||||||
LR_IROM1 MBED_APP_START MBED_APP_SIZE { ; load region size_region
|
LR_IROM1 MBED_APP_START MBED_APP_SIZE { ; load region size_region
|
||||||
ER_IROM1 MBED_APP_START MBED_APP_SIZE { ; load address = execution address
|
ER_IROM1 MBED_APP_START MBED_APP_SIZE { ; load address = execution address
|
||||||
*.o (RESET, +First)
|
*.o (RESET, +First)
|
||||||
|
@ -41,10 +44,10 @@ LR_IROM1 MBED_APP_START MBED_APP_SIZE { ; load region size_region
|
||||||
}
|
}
|
||||||
|
|
||||||
; [RAM] Vector table dynamic copy: 68 vectors * 4 bytes = 272 (0x110)
|
; [RAM] Vector table dynamic copy: 68 vectors * 4 bytes = 272 (0x110)
|
||||||
RW_IRAM1 (MBED_RAM_START+VECTOR_SIZE) (MBED_RAM_SIZE-RAM_FIXED_SIZE) { ; RW data
|
RW_IRAM1 MBED_RAM1_START MBED_RAM1_SIZE { ; RW data
|
||||||
.ANY (+RW +ZI)
|
.ANY (+RW +ZI)
|
||||||
}
|
}
|
||||||
ARM_LIB_HEAP AlignExpr(+0, +16) EMPTY (MBED_RAM_SIZE - RAM_FIXED_SIZE - (AlignExpr(ImageLimit(RW_IRAM1), 16) - MBED_RAM_START)){ ; heap region growing up
|
ARM_LIB_HEAP AlignExpr(+0, +16) EMPTY (MBED_RAM_SIZE - RAM_FIXED_SIZE - (AlignExpr(ImageLimit(RW_IRAM1), 16) - MBED_RAM1_START)){ ; heap region growing up
|
||||||
}
|
}
|
||||||
ARM_LIB_STACK (MBED_RAM_START+MBED_RAM_SIZE) EMPTY -Stack_Size { ; stack region growing down
|
ARM_LIB_STACK (MBED_RAM_START+MBED_RAM_SIZE) EMPTY -Stack_Size { ; stack region growing down
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue