Skip to content

Commit 02f48ef

Browse files
committed
Corrected the linker script selection for l0 & l1 examples.
1 parent 520e752 commit 02f48ef

9 files changed

Lines changed: 69 additions & 7 deletions

File tree

examples/stm32/l0/stm32l0538-disco/miniblink/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
BINARY = miniblink
2121

22-
LDSCRIPT = $(OPENCM3_DIR)/lib/stm32/l0/stm32l0xx8.ld
22+
LDSCRIPT = ../stm32l0538-discovery.ld
2323

2424
include ../../Makefile.include
2525

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/*
2+
* This file is part of the libopencm3 project.
3+
*
4+
* Copyright (C) 2021 Piotr Esden-Tempski <piotr@esden.net>
5+
*
6+
* This library is free software: you can redistribute it and/or modify
7+
* it under the terms of the GNU Lesser General Public License as published by
8+
* the Free Software Foundation, either version 3 of the License, or
9+
* (at your option) any later version.
10+
*
11+
* This library is distributed in the hope that it will be useful,
12+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
* GNU Lesser General Public License for more details.
15+
*
16+
* You should have received a copy of the GNU Lesser General Public License
17+
* along with this library. If not, see <http://www.gnu.org/licenses/>.
18+
*/
19+
20+
/* Linker script for ST STM32L0538DISCOVERY (STM32L053C8T6, 64K flash, 8K RAM). */
21+
22+
/* Define memory regions. */
23+
MEMORY
24+
{
25+
rom (rx) : ORIGIN = 0x08000000, LENGTH = 64K
26+
ram (rwx) : ORIGIN = 0x20000000, LENGTH = 8K
27+
}
28+
29+
/* Include the common ld script. */
30+
INCLUDE cortex-m-generic.ld
31+

examples/stm32/l1/stm32l-discovery/button-irq-printf-lowpower/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
BINARY = main
2121

22-
LDSCRIPT = $(OPENCM3_DIR)/lib/stm32/l1/stm32l15xxb.ld
22+
LDSCRIPT = ../stm32l-discovery.ld
2323

2424
include ../../Makefile.include
2525

examples/stm32/l1/stm32l-discovery/button-irq-printf/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
BINARY = main
2121

22-
LDSCRIPT = $(OPENCM3_DIR)/lib/stm32/l1/stm32l15xxb.ld
22+
LDSCRIPT = ../stm32l-discovery.ld
2323

2424
include ../../Makefile.include
2525

examples/stm32/l1/stm32l-discovery/lcd-display/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
BINARY = lcd-hello
2121

22-
LDSCRIPT = $(OPENCM3_DIR)/lib/stm32/l1/stm32l15xxb.ld
22+
LDSCRIPT = ../stm32l-discovery.ld
2323

2424
include ../../Makefile.include
2525

examples/stm32/l1/stm32l-discovery/miniblink/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
BINARY = miniblink
2121

22-
LDSCRIPT = $(OPENCM3_DIR)/lib/stm32/l1/stm32l15xxb.ld
22+
LDSCRIPT = ../stm32l-discovery.ld
2323

2424
include ../../Makefile.include
2525

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/*
2+
* This file is part of the libopencm3 project.
3+
*
4+
* Copyright (C) 2021 Piotr Esden-Tempski <piotr@esden.net>
5+
*
6+
* This library is free software: you can redistribute it and/or modify
7+
* it under the terms of the GNU Lesser General Public License as published by
8+
* the Free Software Foundation, either version 3 of the License, or
9+
* (at your option) any later version.
10+
*
11+
* This library is distributed in the hope that it will be useful,
12+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
* GNU Lesser General Public License for more details.
15+
*
16+
* You should have received a copy of the GNU Lesser General Public License
17+
* along with this library. If not, see <http://www.gnu.org/licenses/>.
18+
*/
19+
20+
/* Linker script for ST STM32L-DISCOVERY (STM32L152RCT6, 256K flash, 32K RAM). */
21+
22+
/* Define memory regions. */
23+
MEMORY
24+
{
25+
rom (rx) : ORIGIN = 0x08000000, LENGTH = 64K
26+
ram (rwx) : ORIGIN = 0x20000000, LENGTH = 8K
27+
}
28+
29+
/* Include the common ld script. */
30+
INCLUDE cortex-m-generic.ld
31+

examples/stm32/l1/stm32l-discovery/usart-semihosting/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
BINARY = usart-semihosting
2121

22-
LDSCRIPT = $(OPENCM3_DIR)/lib/stm32/l1/stm32l15xxb.ld
22+
LDSCRIPT = ../stm32l-discovery.ld
2323

2424
# To disable, run "make ENABLE_SEMIHOSTING=0" or comment next line out
2525
ENABLE_SEMIHOSTING ?= 1

examples/stm32/l1/stm32l-discovery/usart/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
BINARY = usart
2121

22-
LDSCRIPT = $(OPENCM3_DIR)/lib/stm32/l1/stm32l15xxb.ld
22+
LDSCRIPT = ../stm32l-discovery.ld
2323

2424
include ../../Makefile.include
2525

0 commit comments

Comments
 (0)