diff --git a/targets/TARGET_STM/TARGET_STM32F3/TARGET_STM32F303x8/device/TOOLCHAIN_ARM_STD/stm32f303x8.sct b/targets/TARGET_STM/TARGET_STM32F3/TARGET_STM32F303x8/device/TOOLCHAIN_ARM_STD/stm32f303x8.sct index 002d0e4f95..bb0b7faeb3 100644 --- a/targets/TARGET_STM/TARGET_STM32F3/TARGET_STM32F303x8/device/TOOLCHAIN_ARM_STD/stm32f303x8.sct +++ b/targets/TARGET_STM/TARGET_STM32F3/TARGET_STM32F303x8/device/TOOLCHAIN_ARM_STD/stm32f303x8.sct @@ -28,27 +28,49 @@ ; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#if !defined(MBED_BOOT_STACK_SIZE) - #define MBED_BOOT_STACK_SIZE 0x400 +#if !defined(MBED_APP_START) + #define MBED_APP_START 0x08000000 #endif -#define Stack_Size MBED_BOOT_STACK_SIZE +; STM32F303K8: 64KB FLASH (0x10000) +#if !defined(MBED_APP_SIZE) + #define MBED_APP_SIZE 0x10000 +#endif -; STM32F303K8: 64KB FLASH (0x10000) + 12KB SRAM (0x3000) -LR_IROM1 0x08000000 0x10000 { ; load region size_region +#if !defined(MBED_RAM_START) + #define MBED_RAM_START 0x20000000 +#endif - ER_IROM1 0x08000000 0x10000 { ; load address = execution address +;12KB SRAM (0x3000) +#if !defined(MBED_RAM_SIZE) + #define MBED_RAM_SIZE 0x3000 +#endif + + +#if !defined(MBED_BOOT_STACK_SIZE) + #define MBED_BOOT_STACK_SIZE 0x400 +#endif + +; 60 Non-Core vectors + 16 ARM Core System Handler Vectors vectors + reserved areas = 98 vectors 392 bytes (0x188) to be reserved in RAM +#define VECTOR_SIZE 0x188 + +#define RAM_FIXED_SIZE (MBED_BOOT_STACK_SIZE+VECTOR_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) } - ; 98 vectors = 392 bytes (0x188) to be reserved in RAM - RW_IRAM1 (0x20000000+0x188) (0x3000-0x188-Stack_Size) { ; RW data + RW_IRAM1 (MBED_RAM_START+VECTOR_SIZE) (MBED_RAM_SIZE-VECTOR_SIZE) { ; RW data .ANY (+RW +ZI) } - ARM_LIB_STACK (0x20000000+0x3000) EMPTY -Stack_Size { ; stack + ARM_LIB_HEAP AlignExpr(+0, 16) EMPTY (MBED_RAM_SIZE-RAM_FIXED_SIZE+MBED_RAM_START-AlignExpr(ImageLimit(RW_IRAM1), 16)) { + } + + ARM_LIB_STACK (MBED_RAM_START+MBED_RAM_SIZE) EMPTY -MBED_BOOT_STACK_SIZE { ; stack } } - diff --git a/targets/TARGET_STM/TARGET_STM32F3/TARGET_STM32F303x8/device/TOOLCHAIN_GCC_ARM/STM32F303X8.ld b/targets/TARGET_STM/TARGET_STM32F3/TARGET_STM32F303x8/device/TOOLCHAIN_GCC_ARM/STM32F303X8.ld index a2c09fe5bf..13aabc9a01 100644 --- a/targets/TARGET_STM/TARGET_STM32F3/TARGET_STM32F303x8/device/TOOLCHAIN_GCC_ARM/STM32F303X8.ld +++ b/targets/TARGET_STM/TARGET_STM32F3/TARGET_STM32F303x8/device/TOOLCHAIN_GCC_ARM/STM32F303X8.ld @@ -6,6 +6,7 @@ STACK_SIZE = MBED_BOOT_STACK_SIZE; +/* 60 Non-Core vectors + 16 ARM Core System Handler Vectors vectors + reserved areas = 392 bytes (0x188) to be reserved in RAM */ MEMORY { FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 64K diff --git a/targets/targets.json b/targets/targets.json index c530fe83b0..b84e2cc25e 100644 --- a/targets/targets.json +++ b/targets/targets.json @@ -2734,6 +2734,11 @@ "IAR", "GCC_ARM" ], + "supported_c_libs": { + "arm": ["std", "small"], + "gcc_arm": ["std", "small"], + "iar": ["std"] + }, "macros": [ "USE_HAL_DRIVER", "USE_FULL_LL_DRIVER", @@ -3558,12 +3563,14 @@ } }, "overrides": { - "lse_available": 0 + "lse_available": 0, + "boot-stack-size": "0x400", + "tickless-from-us-ticker": true }, "detect_code": [ "0775" ], - "default_lib": "small", + "c_lib": "small", "device_has_add": [ "ANALOGOUT", "CAN", @@ -3572,9 +3579,7 @@ "device_has_remove": [ "LPTICKER" ], - "release_versions": [ - "2" - ], + "supported_application_profiles":["bare-metal"], "device_name": "STM32F303K8" }, "NUCLEO_F303RE": {