diff --git a/examples/stm32/l0/stm32l0538-disco/miniblink/Makefile b/examples/stm32/l0/stm32l0538-disco/miniblink/Makefile index 019534a..fea9cb2 100644 --- a/examples/stm32/l0/stm32l0538-disco/miniblink/Makefile +++ b/examples/stm32/l0/stm32l0538-disco/miniblink/Makefile @@ -19,7 +19,7 @@ BINARY = miniblink -LDSCRIPT = $(OPENCM3_DIR)/lib/stm32/l0/stm32l0xx8.ld +LDSCRIPT = ../stm32l0538-discovery.ld include ../../Makefile.include diff --git a/examples/stm32/l0/stm32l0538-disco/stm32l0538-discovery.ld b/examples/stm32/l0/stm32l0538-disco/stm32l0538-discovery.ld new file mode 100644 index 0000000..c279dae --- /dev/null +++ b/examples/stm32/l0/stm32l0538-disco/stm32l0538-discovery.ld @@ -0,0 +1,31 @@ +/* + * This file is part of the libopencm3 project. + * + * Copyright (C) 2021 Piotr Esden-Tempski + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . + */ + +/* Linker script for ST STM32L0538DISCOVERY (STM32L053C8T6, 64K flash, 8K RAM). */ + +/* Define memory regions. */ +MEMORY +{ + rom (rx) : ORIGIN = 0x08000000, LENGTH = 64K + ram (rwx) : ORIGIN = 0x20000000, LENGTH = 8K +} + +/* Include the common ld script. */ +INCLUDE cortex-m-generic.ld + diff --git a/examples/stm32/l1/stm32l-discovery/button-irq-printf-lowpower/Makefile b/examples/stm32/l1/stm32l-discovery/button-irq-printf-lowpower/Makefile index e2b5060..9f72c94 100644 --- a/examples/stm32/l1/stm32l-discovery/button-irq-printf-lowpower/Makefile +++ b/examples/stm32/l1/stm32l-discovery/button-irq-printf-lowpower/Makefile @@ -19,7 +19,7 @@ BINARY = main -LDSCRIPT = $(OPENCM3_DIR)/lib/stm32/l1/stm32l15xxb.ld +LDSCRIPT = ../stm32l-discovery.ld include ../../Makefile.include diff --git a/examples/stm32/l1/stm32l-discovery/button-irq-printf/Makefile b/examples/stm32/l1/stm32l-discovery/button-irq-printf/Makefile index e2b5060..9f72c94 100644 --- a/examples/stm32/l1/stm32l-discovery/button-irq-printf/Makefile +++ b/examples/stm32/l1/stm32l-discovery/button-irq-printf/Makefile @@ -19,7 +19,7 @@ BINARY = main -LDSCRIPT = $(OPENCM3_DIR)/lib/stm32/l1/stm32l15xxb.ld +LDSCRIPT = ../stm32l-discovery.ld include ../../Makefile.include diff --git a/examples/stm32/l1/stm32l-discovery/lcd-display/Makefile b/examples/stm32/l1/stm32l-discovery/lcd-display/Makefile index c2c988a..ff0624c 100644 --- a/examples/stm32/l1/stm32l-discovery/lcd-display/Makefile +++ b/examples/stm32/l1/stm32l-discovery/lcd-display/Makefile @@ -19,7 +19,7 @@ BINARY = lcd-hello -LDSCRIPT = $(OPENCM3_DIR)/lib/stm32/l1/stm32l15xxb.ld +LDSCRIPT = ../stm32l-discovery.ld include ../../Makefile.include diff --git a/examples/stm32/l1/stm32l-discovery/miniblink/Makefile b/examples/stm32/l1/stm32l-discovery/miniblink/Makefile index 199baed..58d76c9 100644 --- a/examples/stm32/l1/stm32l-discovery/miniblink/Makefile +++ b/examples/stm32/l1/stm32l-discovery/miniblink/Makefile @@ -19,7 +19,7 @@ BINARY = miniblink -LDSCRIPT = $(OPENCM3_DIR)/lib/stm32/l1/stm32l15xxb.ld +LDSCRIPT = ../stm32l-discovery.ld include ../../Makefile.include diff --git a/examples/stm32/l1/stm32l-discovery/stm32l-discovery.ld b/examples/stm32/l1/stm32l-discovery/stm32l-discovery.ld new file mode 100644 index 0000000..aaa5354 --- /dev/null +++ b/examples/stm32/l1/stm32l-discovery/stm32l-discovery.ld @@ -0,0 +1,31 @@ +/* + * This file is part of the libopencm3 project. + * + * Copyright (C) 2021 Piotr Esden-Tempski + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . + */ + +/* Linker script for ST STM32L-DISCOVERY (STM32L152RCT6, 256K flash, 32K RAM). */ + +/* Define memory regions. */ +MEMORY +{ + rom (rx) : ORIGIN = 0x08000000, LENGTH = 64K + ram (rwx) : ORIGIN = 0x20000000, LENGTH = 8K +} + +/* Include the common ld script. */ +INCLUDE cortex-m-generic.ld + diff --git a/examples/stm32/l1/stm32l-discovery/usart-semihosting/Makefile b/examples/stm32/l1/stm32l-discovery/usart-semihosting/Makefile index 6dd01e1..c3370be 100644 --- a/examples/stm32/l1/stm32l-discovery/usart-semihosting/Makefile +++ b/examples/stm32/l1/stm32l-discovery/usart-semihosting/Makefile @@ -19,7 +19,7 @@ BINARY = usart-semihosting -LDSCRIPT = $(OPENCM3_DIR)/lib/stm32/l1/stm32l15xxb.ld +LDSCRIPT = ../stm32l-discovery.ld # To disable, run "make ENABLE_SEMIHOSTING=0" or comment next line out ENABLE_SEMIHOSTING ?= 1 diff --git a/examples/stm32/l1/stm32l-discovery/usart/Makefile b/examples/stm32/l1/stm32l-discovery/usart/Makefile index 19aa3d4..67992af 100644 --- a/examples/stm32/l1/stm32l-discovery/usart/Makefile +++ b/examples/stm32/l1/stm32l-discovery/usart/Makefile @@ -19,7 +19,7 @@ BINARY = usart -LDSCRIPT = $(OPENCM3_DIR)/lib/stm32/l1/stm32l15xxb.ld +LDSCRIPT = ../stm32l-discovery.ld include ../../Makefile.include