Skip to content

Commit 6148356

Browse files
edogaldofpistm
authored andcommitted
Add Black F407VE support
Signed-off-by: edogaldo <[email protected]>
1 parent a320623 commit 6148356

File tree

8 files changed

+1483
-0
lines changed

8 files changed

+1483
-0
lines changed

boards.txt

+74
Original file line numberDiff line numberDiff line change
@@ -529,6 +529,46 @@ Maple.menu.upload_method.serialMethod=Serial
529529
Maple.menu.upload_method.serialMethod.upload.protocol=maple_serial
530530
Maple.menu.upload_method.serialMethod.upload.tool=serial_upload
531531

532+
################################################################################
533+
# Generic F4
534+
535+
GenF4.name=Generic STM32F4 series
536+
537+
GenF4.build.vid=0x1EAF
538+
GenF4.build.pid=0x0004
539+
GenF4.vid.0=0x1EAF
540+
GenF4.pid.0=0x0004
541+
542+
GenF4.build.core=arduino
543+
GenF4.build.board=GenF4
544+
GenF4.build.extra_flags=-D{build.product_line} {build.enable_usb} {build.xSerial}
545+
546+
# Black F407VE
547+
# Support: Serial1 (USART1 on PA10, PA9)
548+
# Default SPI: SPI (SPI1 on PB3,PB4,PB5 - NRF24 connector and W25Q16 (on board flash))
549+
GenF4.menu.pnum.BLACK_F407VE=Black F407VE
550+
GenF4.menu.pnum.BLACK_F407VE.upload.maximum_size=524288
551+
GenF4.menu.pnum.BLACK_F407VE.upload.maximum_data_size=131072
552+
GenF4.menu.pnum.BLACK_F407VE.build.mcu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard
553+
GenF4.menu.pnum.BLACK_F407VE.build.board=BLACK_F407VE
554+
GenF4.menu.pnum.BLACK_F407VE.build.series=STM32F4xx
555+
GenF4.menu.pnum.BLACK_F407VE.build.product_line=STM32F407xx
556+
GenF4.menu.pnum.BLACK_F407VE.build.variant=BLACK_F407VE
557+
GenF4.menu.pnum.BLACK_F407VE.build.cmsis_lib_gcc=arm_cortexM4l_math
558+
559+
# Upload menu
560+
GenF4.menu.upload_method.STLink=STLink
561+
GenF4.menu.upload_method.STLink.upload.protocol=STLink
562+
GenF4.menu.upload_method.STLink.upload.tool=stlink_upload
563+
564+
GenF4.menu.upload_method.serialMethod=Serial
565+
GenF4.menu.upload_method.serialMethod.upload.protocol=maple_serial
566+
GenF4.menu.upload_method.serialMethod.upload.tool=serial_upload
567+
568+
GenF4.menu.upload_method.bmpMethod=BMP (Black Magic Probe)
569+
GenF4.menu.upload_method.bmpMethod.upload.protocol=gdb_bmp
570+
GenF4.menu.upload_method.bmpMethod.upload.tool=bmp_upload
571+
532572
###############################
533573
# RemRam
534574

@@ -607,6 +647,12 @@ Maple.menu.xserial.none.build.xSerial=-DHAL_UART_MODULE_ENABLED -DHWSERIAL_NONE
607647
Maple.menu.xserial.disabled=Disabled (No Serial)
608648
Maple.menu.xserial.disabled.build.xSerial=
609649

650+
GenF4.menu.xserial.generic=Enabled with generic Serial
651+
GenF4.menu.xserial.none=Enabled without generic Serial
652+
GenF4.menu.xserial.none.build.xSerial=-DHAL_UART_MODULE_ENABLED -DHWSERIAL_NONE
653+
GenF4.menu.xserial.disabled=Disabled (No Serial)
654+
GenF4.menu.xserial.disabled.build.xSerial=
655+
610656
RemRam.menu.xserial.generic=Enabled with generic Serial
611657
RemRam.menu.xserial.none=Enabled without generic Serial
612658
RemRam.menu.xserial.none.build.xSerial=-DHAL_UART_MODULE_ENABLED -DHWSERIAL_NONE
@@ -795,6 +841,34 @@ Maple.menu.opt.ogstd=Debug (-g)
795841
Maple.menu.opt.ogstd.build.flags.optimize=-g -Og
796842
Maple.menu.opt.ogstd.build.flags.ldspecs=
797843

844+
GenF4.menu.opt.osstd=Smallest (-Os default)
845+
GenF4.menu.opt.osstd.build.flags.optimize=-Os
846+
GenF4.menu.opt.osstd.build.flags.ldspecs=
847+
GenF4.menu.opt.oslto=Smallest (-Os) with LTO
848+
GenF4.menu.opt.oslto.build.flags.optimize=-Os -flto
849+
GenF4.menu.opt.oslto.build.flags.ldspecs=-flto
850+
GenF4.menu.opt.o1std=Fast (-O1)
851+
GenF4.menu.opt.o1std.build.flags.optimize=-O1
852+
GenF4.menu.opt.o1std.build.flags.ldspecs=
853+
GenF4.menu.opt.o1lto=Fast (-O1) with LTO
854+
GenF4.menu.opt.o1lto.build.flags.optimize=-O1 -flto
855+
GenF4.menu.opt.o1lto.build.flags.ldspecs=-flto
856+
GenF4.menu.opt.o2std=Faster (-O2)
857+
GenF4.menu.opt.o2std.build.flags.optimize=-O2
858+
GenF4.menu.opt.o2std.build.flags.ldspecs=
859+
GenF4.menu.opt.o2lto=Faster (-O2) with LTO
860+
GenF4.menu.opt.o2lto.build.flags.optimize=-O2 -flto
861+
GenF4.menu.opt.o2lto.build.flags.ldspecs=-flto
862+
GenF4.menu.opt.o3std=Fastest (-O3)
863+
GenF4.menu.opt.o3std.build.flags.optimize=-O3
864+
GenF4.menu.opt.o3std.build.flags.ldspecs=
865+
GenF4.menu.opt.o3lto=Fastest (-O3) with LTO
866+
GenF4.menu.opt.o3lto.build.flags.optimize=-O3 -flto
867+
GenF4.menu.opt.o3lto.build.flags.ldspecs=-flto
868+
GenF4.menu.opt.ogstd=Debug (-g)
869+
GenF4.menu.opt.ogstd.build.flags.optimize=-g -Og
870+
GenF4.menu.opt.ogstd.build.flags.ldspecs=
871+
798872
RemRam.menu.opt.osstd=Smallest (-Os default)
799873
RemRam.menu.opt.oslto=Smallest (-Os) with LTO
800874
RemRam.menu.opt.oslto.build.flags.optimize=-Os -flto

variants/BLACK_F407VE/PeripheralPins.c

+358
Large diffs are not rendered by default.

variants/BLACK_F407VE/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 = NC,
7+
#endif
8+
#ifdef PWR_WAKEUP_PIN3
9+
SYS_WKUP3 = NC,
10+
#endif
11+
#ifdef PWR_WAKEUP_PIN4
12+
SYS_WKUP4 = NC,
13+
#endif
14+
#ifdef PWR_WAKEUP_PIN5
15+
SYS_WKUP5 = NC,
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/BLACK_F407VE/ldscript.ld

+189
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,189 @@
1+
/*
2+
*****************************************************************************
3+
**
4+
5+
** File : LinkerScript.ld
6+
**
7+
** Abstract : Linker script for STM32F407VETx Device with
8+
** 512KByte FLASH, 128KByte 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 = 0x20020000; /* 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 = 128K
45+
CCMRAM (rw) : ORIGIN = 0x10000000, LENGTH = 64K
46+
FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 512K
47+
}
48+
49+
/* Define output sections */
50+
SECTIONS
51+
{
52+
/* The startup code goes first into FLASH */
53+
.isr_vector :
54+
{
55+
. = ALIGN(4);
56+
KEEP(*(.isr_vector)) /* Startup code */
57+
. = ALIGN(4);
58+
} >FLASH
59+
60+
/* The program code and other data goes into FLASH */
61+
.text ALIGN(8):
62+
{
63+
. = ALIGN(4);
64+
*(.text) /* .text sections (code) */
65+
*(.text*) /* .text* sections (code) */
66+
*(.glue_7) /* glue arm to thumb code */
67+
*(.glue_7t) /* glue thumb to arm code */
68+
*(.eh_frame)
69+
70+
KEEP (*(.init))
71+
KEEP (*(.fini))
72+
73+
. = ALIGN(4);
74+
_etext = .; /* define a global symbols at end of code */
75+
} >FLASH
76+
77+
/* Constant data goes into FLASH */
78+
.rodata ALIGN(4):
79+
{
80+
. = ALIGN(4);
81+
*(.rodata) /* .rodata sections (constants, strings, etc.) */
82+
*(.rodata*) /* .rodata* sections (constants, strings, etc.) */
83+
. = ALIGN(4);
84+
} >FLASH
85+
86+
.ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } >FLASH
87+
.ARM : {
88+
__exidx_start = .;
89+
*(.ARM.exidx*)
90+
__exidx_end = .;
91+
} >FLASH
92+
93+
.preinit_array :
94+
{
95+
PROVIDE_HIDDEN (__preinit_array_start = .);
96+
KEEP (*(.preinit_array*))
97+
PROVIDE_HIDDEN (__preinit_array_end = .);
98+
} >FLASH
99+
.init_array :
100+
{
101+
PROVIDE_HIDDEN (__init_array_start = .);
102+
KEEP (*(SORT(.init_array.*)))
103+
KEEP (*(.init_array*))
104+
PROVIDE_HIDDEN (__init_array_end = .);
105+
} >FLASH
106+
.fini_array :
107+
{
108+
PROVIDE_HIDDEN (__fini_array_start = .);
109+
KEEP (*(SORT(.fini_array.*)))
110+
KEEP (*(.fini_array*))
111+
PROVIDE_HIDDEN (__fini_array_end = .);
112+
} >FLASH
113+
114+
/* used by the startup to initialize data */
115+
_sidata = LOADADDR(.data);
116+
117+
/* Initialized data sections goes into RAM, load LMA copy after code */
118+
.data :
119+
{
120+
. = ALIGN(4);
121+
_sdata = .; /* create a global symbol at data start */
122+
*(.data) /* .data sections */
123+
*(.data*) /* .data* sections */
124+
125+
. = ALIGN(4);
126+
_edata = .; /* define a global symbol at data end */
127+
} >RAM AT> FLASH
128+
129+
_siccmram = LOADADDR(.ccmram);
130+
131+
/* CCM-RAM section
132+
*
133+
* IMPORTANT NOTE!
134+
* If initialized variables will be placed in this section,
135+
* the startup code needs to be modified to copy the init-values.
136+
*/
137+
.ccmram :
138+
{
139+
. = ALIGN(4);
140+
_sccmram = .; /* create a global symbol at ccmram start */
141+
*(.ccmram)
142+
*(.ccmram*)
143+
144+
. = ALIGN(4);
145+
_eccmram = .; /* create a global symbol at ccmram end */
146+
} >CCMRAM AT> FLASH
147+
148+
149+
/* Uninitialized data section */
150+
. = ALIGN(4);
151+
.bss :
152+
{
153+
/* This is used by the startup in order to initialize the .bss secion */
154+
_sbss = .; /* define a global symbol at bss start */
155+
__bss_start__ = _sbss;
156+
*(.bss)
157+
*(.bss*)
158+
*(COMMON)
159+
160+
. = ALIGN(4);
161+
_ebss = .; /* define a global symbol at bss end */
162+
__bss_end__ = _ebss;
163+
} >RAM
164+
165+
/* User_heap_stack section, used to check that there is enough RAM left */
166+
._user_heap_stack :
167+
{
168+
. = ALIGN(8);
169+
PROVIDE ( end = . );
170+
PROVIDE ( _end = . );
171+
. = . + _Min_Heap_Size;
172+
. = . + _Min_Stack_Size;
173+
. = ALIGN(8);
174+
} >RAM
175+
176+
177+
178+
/* Remove information from the standard libraries */
179+
/DISCARD/ :
180+
{
181+
libc.a ( * )
182+
libm.a ( * )
183+
libgcc.a ( * )
184+
}
185+
186+
.ARM.attributes 0 : { *(.ARM.attributes) }
187+
}
188+
189+

variants/BLACK_F407VE/readme.txt

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
See Wiki:
2+
https://github.com/stm32duino/wiki/wiki/Add-a-new-variant-(board)

0 commit comments

Comments
 (0)