Skip to content

Commit 2648771

Browse files
committed
Add Nucleo G071RB
Signed-off-by: Frederic.Pillon <[email protected]>
1 parent 6813fe5 commit 2648771

File tree

7 files changed

+1155
-0
lines changed

7 files changed

+1155
-0
lines changed

boards.txt

+13
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,19 @@ Nucleo_64.menu.pnum.NUCLEO_F446RE.build.product_line=STM32F446xx
242242
Nucleo_64.menu.pnum.NUCLEO_F446RE.build.variant=NUCLEO_F446RE
243243
Nucleo_64.menu.pnum.NUCLEO_F446RE.build.cmsis_lib_gcc=arm_cortexM4l_math
244244

245+
# NUCLEO_G071RB board
246+
Nucleo_64.menu.pnum.NUCLEO_G071RB=Nucleo G071RB
247+
Nucleo_64.menu.pnum.NUCLEO_G071RB.node=NODE_G071RB
248+
Nucleo_64.menu.pnum.NUCLEO_G071RB.upload.maximum_size=131072
249+
Nucleo_64.menu.pnum.NUCLEO_G071RB.upload.maximum_data_size=36864
250+
Nucleo_64.menu.pnum.NUCLEO_G071RB.build.mcu=cortex-m0plus
251+
Nucleo_64.menu.pnum.NUCLEO_G071RB.build.board=NUCLEO_G071RB
252+
Nucleo_64.menu.pnum.NUCLEO_G071RB.build.series=STM32G0xx
253+
Nucleo_64.menu.pnum.NUCLEO_G071RB.build.product_line=STM32G071xx
254+
Nucleo_64.menu.pnum.NUCLEO_G071RB.build.variant=NUCLEO_G071RB
255+
Nucleo_64.menu.pnum.NUCLEO_G071RB.build.cmsis_lib_gcc=arm_cortexM0l_math
256+
Nucleo_64.menu.pnum.NUCLEO_G071RB.build.extra_flags=-D{build.product_line} {build.enable_usb} {build.xSerial} -D__CORTEX_SC=0
257+
245258
# NUCLEO_L053R8 board
246259
# Support: Serial1 (USART1 on PA10, PA9)
247260
Nucleo_64.menu.pnum.NUCLEO_L053R8=Nucleo L053R8

variants/NUCLEO_G071RB/PeripheralPins.c

+309
Large diffs are not rendered by default.

variants/NUCLEO_G071RB/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 = NC,
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 = PB_5,
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_G071RB/ldscript.ld

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

0 commit comments

Comments
 (0)