Skip to content

Commit ba0b439

Browse files
authored
Merge pull request stm32duino#285 from fpistm/NUCLEO-L4R5ZI
Add Nucleo-L4R5ZI and Nucleo-L4R5ZI-P support
2 parents ef2529d + 0f425f9 commit ba0b439

File tree

8 files changed

+1658
-0
lines changed

8 files changed

+1658
-0
lines changed

README.md

+4
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ For advanced user, you can use the repository: see the [Using git repository](ht
6868
* [B-L475E-IOT01A](http://www.st.com/en/evaluation-tools/b-l475e-iot01a.html)
6969

7070
### Next release
71+
* STM32L4
72+
* [Nucleo L4R5ZI](http://www.st.com/en/evaluation-tools/nucleo-l4r5zi.html)
73+
* [NUCLEO-L4R5ZI](http://www.st.com/en/evaluation-tools/nucleo-l4r5zi-p.html)
74+
7175

7276

7377
## Troubleshooting

boards.txt

+24
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,30 @@ Nucleo_144.menu.pnum.NUCLEO_L496ZG-P.build.product_line=STM32L496xx
7373
Nucleo_144.menu.pnum.NUCLEO_L496ZG-P.build.variant=NUCLEO_L496ZG
7474
Nucleo_144.menu.pnum.NUCLEO_L496ZG-P.build.cmsis_lib_gcc=arm_cortexM4l_math
7575

76+
# NUCLEO_L4R5ZI board
77+
Nucleo_144.menu.pnum.NUCLEO_L4R5ZI=Nucleo L4R5ZI
78+
Nucleo_144.menu.pnum.NUCLEO_L4R5ZI.node=NODE_L4R5ZI
79+
Nucleo_144.menu.pnum.NUCLEO_L4R5ZI.upload.maximum_size=2097152
80+
Nucleo_144.menu.pnum.NUCLEO_L4R5ZI.upload.maximum_data_size=655360
81+
Nucleo_144.menu.pnum.NUCLEO_L4R5ZI.build.mcu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard
82+
Nucleo_144.menu.pnum.NUCLEO_L4R5ZI.build.board=NUCLEO_L4R5ZI
83+
Nucleo_144.menu.pnum.NUCLEO_L4R5ZI.build.series=STM32L4xx
84+
Nucleo_144.menu.pnum.NUCLEO_L4R5ZI.build.product_line=STM32L4R5xx
85+
Nucleo_144.menu.pnum.NUCLEO_L4R5ZI.build.variant=NUCLEO_L4R5ZI
86+
Nucleo_144.menu.pnum.NUCLEO_L4R5ZI.build.cmsis_lib_gcc=arm_cortexM4l_math
87+
88+
# NUCLEO_L4R5ZI-P board
89+
Nucleo_144.menu.pnum.NUCLEO_L4R5ZI-P=Nucleo L4R5ZI-P
90+
Nucleo_144.menu.pnum.NUCLEO_L4R5ZI-P.node=NODE_L4R5ZI
91+
Nucleo_144.menu.pnum.NUCLEO_L4R5ZI-P.upload.maximum_size=2097152
92+
Nucleo_144.menu.pnum.NUCLEO_L4R5ZI-P.upload.maximum_data_size=655360
93+
Nucleo_144.menu.pnum.NUCLEO_L4R5ZI-P.build.mcu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard
94+
Nucleo_144.menu.pnum.NUCLEO_L4R5ZI-P.build.board=NUCLEO_L4R5ZI_P
95+
Nucleo_144.menu.pnum.NUCLEO_L4R5ZI-P.build.series=STM32L4xx
96+
Nucleo_144.menu.pnum.NUCLEO_L4R5ZI-P.build.product_line=STM32L4R5xx
97+
Nucleo_144.menu.pnum.NUCLEO_L4R5ZI-P.build.variant=NUCLEO_L4R5ZI
98+
Nucleo_144.menu.pnum.NUCLEO_L4R5ZI-P.build.cmsis_lib_gcc=arm_cortexM4l_math
99+
76100
# Upload menu
77101
Nucleo_144.menu.upload_method.MassStorage=Mass Storage
78102
Nucleo_144.menu.upload_method.MassStorage.upload.protocol=

variants/NUCLEO_L4R5ZI/PeripheralPins.c

+404
Large diffs are not rendered by default.

variants/NUCLEO_L4R5ZI/PinNamesVar.h

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/* SYS_WKUP */
2+
#ifdef PWR_WAKEUP_PIN1
3+
SYS_WKUP1 = PA_0,
4+
#endif
5+
#ifdef PWR_WAKEUP_PIN2
6+
SYS_WKUP2 = PC_13,
7+
#endif
8+
#ifdef PWR_WAKEUP_PIN3
9+
SYS_WKUP3 = PE_6,
10+
#endif
11+
#ifdef PWR_WAKEUP_PIN4
12+
SYS_WKUP4 = PA_2,
13+
#endif
14+
#ifdef PWR_WAKEUP_PIN5
15+
SYS_WKUP5 = PC_5,
16+
#endif
17+
#ifdef PWR_WAKEUP_PIN6
18+
SYS_WKUP6 = NC,
19+
#endif
20+
#ifdef PWR_WAKEUP_PIN7
21+
SYS_WKUP7 = NC,
22+
#endif
23+
#ifdef PWR_WAKEUP_PIN8
24+
SYS_WKUP8 = NC,
25+
#endif

variants/NUCLEO_L4R5ZI/ldscript.ld

+183
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,183 @@
1+
/*
2+
*****************************************************************************
3+
**
4+
5+
** File : LinkerScript.ld
6+
**
7+
** Abstract : Linker script for STM32L4R5ZITx Device with
8+
** 2048KByte FLASH, 640KByte RAM
9+
**
10+
** Set heap size, stack size and stack location according
11+
** to application requirements.
12+
**
13+
** Set memory bank area and size if external memory is used.
14+
**
15+
** Target : STMicroelectronics STM32
16+
**
17+
**
18+
** Distribution: The file is distributed as is, without any warranty
19+
** of any kind.
20+
**
21+
** (c)Copyright Ac6.
22+
** You may use this file as-is or modify it according to the needs of your
23+
** project. Distribution of this file (unmodified or modified) is not
24+
** permitted. Ac6 permit registered System Workbench for MCU users the
25+
** rights to distribute the assembled, compiled & linked contents of this
26+
** file as part of an application binary file, provided that it is built
27+
** using the System Workbench for MCU toolchain.
28+
**
29+
*****************************************************************************
30+
*/
31+
32+
/* Entry Point */
33+
ENTRY(Reset_Handler)
34+
35+
/* Highest address of the user mode stack */
36+
_estack = 0x200A0000; /* end of RAM */
37+
/* Generate a link error if heap and stack don't fit into RAM */
38+
_Min_Heap_Size = 0x200; /* required amount of heap */
39+
_Min_Stack_Size = 0x400; /* required amount of stack */
40+
41+
/* Specify the memory areas */
42+
MEMORY
43+
{
44+
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 640K
45+
FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 2048K
46+
}
47+
48+
/* Define output sections */
49+
SECTIONS
50+
{
51+
/* The startup code goes first into FLASH */
52+
.isr_vector :
53+
{
54+
. = ALIGN(8);
55+
KEEP(*(.isr_vector)) /* Startup code */
56+
. = ALIGN(8);
57+
} >FLASH
58+
59+
/* The program code and other data goes into FLASH */
60+
.text :
61+
{
62+
. = ALIGN(8);
63+
*(.text) /* .text sections (code) */
64+
*(.text*) /* .text* sections (code) */
65+
*(.glue_7) /* glue arm to thumb code */
66+
*(.glue_7t) /* glue thumb to arm code */
67+
*(.eh_frame)
68+
69+
KEEP (*(.init))
70+
KEEP (*(.fini))
71+
72+
. = ALIGN(8);
73+
_etext = .; /* define a global symbols at end of code */
74+
} >FLASH
75+
76+
/* Constant data goes into FLASH */
77+
.rodata :
78+
{
79+
. = ALIGN(8);
80+
*(.rodata) /* .rodata sections (constants, strings, etc.) */
81+
*(.rodata*) /* .rodata* sections (constants, strings, etc.) */
82+
. = ALIGN(8);
83+
} >FLASH
84+
85+
.ARM.extab :
86+
{
87+
. = ALIGN(8);
88+
*(.ARM.extab* .gnu.linkonce.armextab.*)
89+
. = ALIGN(8);
90+
} >FLASH
91+
.ARM : {
92+
. = ALIGN(8);
93+
__exidx_start = .;
94+
*(.ARM.exidx*)
95+
__exidx_end = .;
96+
. = ALIGN(8);
97+
} >FLASH
98+
99+
.preinit_array :
100+
{
101+
. = ALIGN(8);
102+
PROVIDE_HIDDEN (__preinit_array_start = .);
103+
KEEP (*(.preinit_array*))
104+
PROVIDE_HIDDEN (__preinit_array_end = .);
105+
. = ALIGN(8);
106+
} >FLASH
107+
108+
.init_array :
109+
{
110+
. = ALIGN(8);
111+
PROVIDE_HIDDEN (__init_array_start = .);
112+
KEEP (*(SORT(.init_array.*)))
113+
KEEP (*(.init_array*))
114+
PROVIDE_HIDDEN (__init_array_end = .);
115+
. = ALIGN(8);
116+
} >FLASH
117+
.fini_array :
118+
{
119+
. = ALIGN(8);
120+
PROVIDE_HIDDEN (__fini_array_start = .);
121+
KEEP (*(SORT(.fini_array.*)))
122+
KEEP (*(.fini_array*))
123+
PROVIDE_HIDDEN (__fini_array_end = .);
124+
. = ALIGN(8);
125+
} >FLASH
126+
127+
/* used by the startup to initialize data */
128+
_sidata = LOADADDR(.data);
129+
130+
/* Initialized data sections goes into RAM, load LMA copy after code */
131+
.data :
132+
{
133+
. = ALIGN(8);
134+
_sdata = .; /* create a global symbol at data start */
135+
*(.data) /* .data sections */
136+
*(.data*) /* .data* sections */
137+
138+
. = ALIGN(8);
139+
_edata = .; /* define a global symbol at data end */
140+
} >RAM AT> FLASH
141+
142+
143+
/* Uninitialized data section */
144+
. = ALIGN(4);
145+
.bss :
146+
{
147+
/* This is used by the startup in order to initialize the .bss secion */
148+
_sbss = .; /* define a global symbol at bss start */
149+
__bss_start__ = _sbss;
150+
*(.bss)
151+
*(.bss*)
152+
*(COMMON)
153+
154+
. = ALIGN(4);
155+
_ebss = .; /* define a global symbol at bss end */
156+
__bss_end__ = _ebss;
157+
} >RAM
158+
159+
/* User_heap_stack section, used to check that there is enough RAM left */
160+
._user_heap_stack :
161+
{
162+
. = ALIGN(8);
163+
PROVIDE ( end = . );
164+
PROVIDE ( _end = . );
165+
. = . + _Min_Heap_Size;
166+
. = . + _Min_Stack_Size;
167+
. = ALIGN(8);
168+
} >RAM
169+
170+
171+
172+
/* Remove information from the standard libraries */
173+
/DISCARD/ :
174+
{
175+
libc.a ( * )
176+
libm.a ( * )
177+
libgcc.a ( * )
178+
}
179+
180+
.ARM.attributes 0 : { *(.ARM.attributes) }
181+
}
182+
183+

0 commit comments

Comments
 (0)