Add bare metal support to EFM32 targets

Modify scatter files to add heap load region, and remove hard coded
values. Add supported c libs and bare metal profile to `targets.json`
configurations. Affects the following targets: EFM32GG_STK3700,
TB_SENSE_12, and EFM32GG11_STK3701.
pull/14363/head
Harrison Mutai 2021-03-02 10:25:51 +00:00
parent 5b1c704622
commit ee5946c990
4 changed files with 97 additions and 20 deletions

View File

@ -11,6 +11,14 @@
#define MBED_APP_SIZE 0x00100000
#endif
#if !defined(MBED_RAM_START)
#define MBED_RAM_START 0x20000000
#endif
#if !defined(MBED_RAM_SIZE)
#define MBED_RAM_SIZE 0x20000
#endif
#if !defined(MBED_CONF_TARGET_BOOT_STACK_SIZE)
# if defined(MBED_BOOT_STACK_SIZE)
# define MBED_CONF_TARGET_BOOT_STACK_SIZE MBED_BOOT_STACK_SIZE
@ -19,19 +27,25 @@
# endif
#endif
#define Vector_Size 0xE0
#define Stack_Size MBED_CONF_TARGET_BOOT_STACK_SIZE
#define MBED_IRAM1_SIZE (MBED_RAM_SIZE - Vector_Size - Stack_Size)
#define MBED_IRAM1_START (MBED_RAM_START + Vector_Size)
#define RAM_FIXED_SIZE (Vector_Size + Stack_Size)
LR_IROM1 MBED_APP_START MBED_APP_SIZE { ; load region size_region
ER_IROM1 MBED_APP_START MBED_APP_SIZE { ; load address = execution address
*.o (RESET, +First)
*(InRoot$$Sections)
.ANY (+RO)
}
RW_IRAM1 0x200000E0 0x0001FF20-Stack_Size { ; RW data
RW_IRAM1 MBED_IRAM1_START MBED_IRAM1_SIZE { ; RW data
.ANY (+RW +ZI)
}
ARM_LIB_STACK (0x200000E0+0x0001FF20) EMPTY -Stack_Size { ; stack
ARM_LIB_HEAP AlignExpr(+0, 16) EMPTY (MBED_RAM_SIZE - RAM_FIXED_SIZE - (AlignExpr(ImageLimit(RW_IRAM1), 16) - MBED_IRAM1_START)) { ; heap growing up
}
ARM_LIB_STACK (MBED_RAM_START + MBED_RAM_SIZE) EMPTY -Stack_Size { ; stack
}
}

View File

@ -11,6 +11,14 @@
#define MBED_APP_SIZE 0x00200000
#endif
#if !defined(MBED_RAM_)
#define MBED_RAM_START 0x20000000
#endif
#if !defined(MBED_RAM_)
#define MBED_RAM_SIZE 0x80000
#endif
#if !defined(MBED_CONF_TARGET_BOOT_STACK_SIZE)
# if defined(MBED_BOOT_STACK_SIZE)
# define MBED_CONF_TARGET_BOOT_STACK_SIZE MBED_BOOT_STACK_SIZE
@ -19,19 +27,26 @@
# endif
#endif
#define Vector_Size 0x158
#define Stack_Size MBED_CONF_TARGET_BOOT_STACK_SIZE
#define MBED_IRAM1_START (MBED_RAM_START + Vector_Size)
#define MBED_IRAM1_SIZE (MBED_RAM_SIZE - Vector_Size - Stack_Size)
#define RAM_FIXED_SIZE (Vector_Size + Stack_Size)
LR_IROM1 MBED_APP_START MBED_APP_SIZE { ; load region size_region
ER_IROM1 MBED_APP_START MBED_APP_SIZE { ; load address = execution address
*.o (RESET, +First)
*(InRoot$$Sections)
.ANY (+RO)
}
RW_IRAM1 0x20000158 0x0007FEA8-Stack_Size { ; RW data
RW_IRAM1 MBED_IRAM1_START MBED_IRAM1_SIZE { ; RW data
.ANY (+RW +ZI)
}
ARM_LIB_STACK (0x20000158+0x0007FEA8) EMPTY -Stack_Size { ; stack
ARM_LIB_HEAP AlignExpr(+0, 16) EMPTY (MBED_RAM_SIZE - RAM_FIXED_SIZE - (AlignExpr(ImageLimit(RW_IRAM1), 16) - MBED_IRAM1_START)) { ; heap growing up
}
ARM_LIB_STACK (MBED_RAM_START + MBED_RAM_SIZE) EMPTY -Stack_Size { ; stack
}
}

View File

@ -11,6 +11,14 @@
#define MBED_APP_SIZE 0x00100000
#endif
#if !defined(MBED_RAM_)
#define MBED_RAM_START 0x20000000
#endif
#if !defined(MBED_RAM_)
#define MBED_RAM_SIZE 0x40000
#endif
#if !defined(MBED_CONF_TARGET_BOOT_STACK_SIZE)
# if defined(MBED_BOOT_STACK_SIZE)
# define MBED_CONF_TARGET_BOOT_STACK_SIZE MBED_BOOT_STACK_SIZE
@ -19,18 +27,25 @@
# endif
#endif
#define Vector_Size 0x110
#define Stack_Size MBED_CONF_TARGET_BOOT_STACK_SIZE
#define MBED_IRAM1_START (MBED_RAM_START + Vector_Size)
#define MBED_IRAM1_SIZE (MBED_RAM_SIZE - Vector_Size - Stack_Size)
#define RAM_FIXED_SIZE (Vector_Size + Stack_Size)
LR_IROM1 MBED_APP_START MBED_APP_SIZE { ; load region size_region
ER_IROM1 MBED_APP_START MBED_APP_SIZE { ; load address = execution address
*.o (RESET, +First)
*(InRoot$$Sections)
.ANY (+RO)
}
RW_IRAM1 0x20000110 0x0003FEF0-Stack_Size { ; RW data
RW_IRAM1 MBED_IRAM1_START MBED_IRAM1_SIZE { ; RW data
.ANY (+RW +ZI)
}
ARM_LIB_STACK (0x20000110+0x0003FEF0) EMPTY -Stack_Size { ; stack
ARM_LIB_HEAP AlignExpr(+0, 16) EMPTY (MBED_RAM_SIZE - RAM_FIXED_SIZE - (AlignExpr(ImageLimit(RW_IRAM1), 16) - MBED_IRAM1_START)) { ; heap growing up
}
ARM_LIB_STACK (MBED_RAM_START + MBED_RAM_SIZE) EMPTY -Stack_Size { ; stack
}
}

View File

@ -5265,16 +5265,27 @@
],
"supported_toolchains": [
"GCC_ARM",
"ARM",
"uARM",
"IAR"
"ARM"
],
"release_versions": [
"5"
],
"device_name": "EFM32GG990F1024",
"public": false,
"bootloader_supported": true
"bootloader_supported": true,
"supported_c_libs": {
"arm": [
"std",
"small"
],
"gcc_arm": [
"std",
"small"
]
},
"supported_application_profiles": [
"full", "bare-metal"
]
},
"EFM32GG_STK3700": {
"inherits": [
@ -5370,16 +5381,27 @@
],
"supported_toolchains": [
"GCC_ARM",
"ARM",
"uARM",
"IAR"
"ARM"
],
"release_versions": [
"5"
],
"device_name": "EFR32MG12P332F1024GL125",
"public": false,
"bootloader_supported": true
"bootloader_supported": true,
"supported_c_libs": {
"arm": [
"std",
"small"
],
"gcc_arm": [
"std",
"small"
]
},
"supported_application_profiles": [
"full", "bare-metal"
]
},
"TB_SENSE_12": {
"inherits": [
@ -5470,16 +5492,27 @@
],
"supported_toolchains": [
"GCC_ARM",
"ARM",
"uARM",
"IAR"
"ARM"
],
"release_versions": [
"5"
],
"device_name": "EFM32GG11B820F2048GL192",
"public": false,
"bootloader_supported": true
"bootloader_supported": true,
"supported_c_libs": {
"arm": [
"std",
"small"
],
"gcc_arm": [
"std",
"small"
]
},
"supported_application_profiles": [
"full", "bare-metal"
]
},
"EFM32GG11_STK3701": {
"inherits": [