Modify linker scripts for IAR and ARM compilers to support bootloader on NUCLEO_L073RZ

pull/9792/head
Sarah Marsh 2019-02-21 16:37:19 +00:00
parent 44bc123483
commit 22abea324d
4 changed files with 33 additions and 10 deletions
targets/TARGET_STM/TARGET_STM32L0/TARGET_NUCLEO_L073RZ/device
TOOLCHAIN_ARM_MICRO
TOOLCHAIN_ARM_STD
TOOLCHAIN_GCC_ARM
TOOLCHAIN_IAR

View File

@ -27,10 +27,18 @@
; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; STM32L073RZ: 192KB FLASH (0x30000) + 20KB RAM (0x5000)
LR_IROM1 0x08000000 0x30000 { ; load region size_region
#if !defined(MBED_APP_START)
#define MBED_APP_START 0x08000000
#endif
ER_IROM1 0x08000000 0x30000 { ; load address = execution address
#if !defined(MBED_APP_SIZE)
#define MBED_APP_SIZE 0x30000
#endif
; STM32L073RZ: 192KB FLASH (0x30000) + 20KB RAM (0x5000)
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)

View File

@ -32,12 +32,20 @@
#define MBED_BOOT_STACK_SIZE 0x400
#endif
#if !defined(MBED_APP_START)
#define MBED_APP_START 0x08000000
#endif
#if !defined(MBED_APP_SIZE)
#define MBED_APP_SIZE 0x30000
#endif
#define Stack_Size MBED_BOOT_STACK_SIZE
; STM32L073RZ: 192KB FLASH (0x30000) + 20KB RAM (0x5000)
LR_IROM1 0x08000000 0x30000 { ; load region size_region
LR_IROM1 MBED_APP_START MBED_APP_SIZE { ; load region size_region
ER_IROM1 0x08000000 0x30000 { ; load address = execution address
ER_IROM1 MBED_APP_START MBED_APP_SIZE { ; load address = execution address
*.o (RESET, +First)
*(InRoot$$Sections)
.ANY (+RO)

View File

@ -31,7 +31,7 @@
#endif
#if !defined(MBED_APP_SIZE)
#define MBED_APP_SIZE 0x2EE00
#define MBED_APP_SIZE 0x30000
#endif
#if !defined(MBED_BOOT_STACK_SIZE)

View File

@ -1,7 +1,14 @@
/* [ROM = 192kb = 0x30000] */
define symbol __intvec_start__ = 0x08000000;
define symbol __region_ROM_start__ = 0x08000000;
define symbol __region_ROM_end__ = 0x0802FFFF;
if (!isdefinedsymbol(MBED_APP_START)) {
define symbol MBED_APP_START = 0x08000000;
}
if (!isdefinedsymbol(MBED_APP_SIZE)) {
define symbol MBED_APP_SIZE = 0x3000;
}
define symbol __intvec_start__ = MBED_APP_START;
define symbol __region_ROM_start__ = MBED_APP_SIZE;
define symbol __region_ROM_end__ = MBED_APP_START - MBED_APP_SIZE - 1;
/* [RAM = 20kb = 0x5000] Vector table dynamic copy: 48 vectors = 192 bytes (0xC0) to be reserved in RAM */
define symbol __NVIC_start__ = 0x20000000;