Skip to content

Commit 09e60a1

Browse files
committed
Add STM32F407VET6
Just ported from [STM32GENERIC](https://github.com/danieleff/STM32GENERIC). Using the latest stm32duino/Arduino_Core_STM32 code base to support StandardFirmataEthernet.
1 parent e144d83 commit 09e60a1

File tree

11 files changed

+2482
-0
lines changed

11 files changed

+2482
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
*.orig
22
*.swp
3+
.vscode/

boards.txt

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,59 @@ menu.usb=USB interface
88
menu.opt=Optimize
99
menu.upload_method=Upload method
1010

11+
################################################################################
12+
# STM32F407
13+
14+
STM32F407.name=STM32F407
15+
16+
#STM32F407.build.vid=0x0483
17+
#STM32F407.build.pid=0x5740
18+
#STM32F407.vid.0=0x0483
19+
#STM32F407.pid.0=0x5740
20+
21+
STM32F407.build.core=arduino
22+
STM32F407.build.board=STM32F407
23+
STM32F407.build.extra_flags=-D{build.product_line} {build.enable_usb} {build.xSerial}
24+
25+
STM32F407.upload.tool=stlink_upload
26+
STM32F407.upload.protocol=STLink
27+
28+
STM32F407.menu.upload_method.STLinkMethod=STLink [Automatic serial = SerialUSB]
29+
STM32F407.menu.upload_method.STLinkMethod.upload.protocol=STLink
30+
STM32F407.menu.upload_method.STLinkMethod.upload.tool=stlink_upload
31+
STM32F407.menu.upload_method.STLinkMethod.build.extra_flags_serial_auto=-DMENU_SERIAL_AUTO=SerialUSB
32+
33+
STM32F407.menu.upload_method.serialMethod=Serial UART1 [TX/PA9, RX/PA10, BOOT0=1, BOOT1=0]
34+
STM32F407.menu.upload_method.serialMethod.upload.protocol=maple_serial
35+
STM32F407.menu.upload_method.serialMethod.upload.tool=serial_upload
36+
STM32F407.menu.upload_method.serialMethod.build.extra_flags_serial_auto=-DMENU_SERIAL_AUTO=SerialUART1
37+
38+
STM32F407.menu.usb.SerialUSB=Serial [Virtual COM port, PA11/PA12 pins]
39+
STM32F407.menu.usb.SerialUSB.build.extra_flags_usb=-DMENU_USB_SERIAL
40+
STM32F407.menu.usb.SerialMSC=Mass storage [testing, see documentation]
41+
STM32F407.menu.usb.SerialMSC.build.extra_flags_usb=-DMENU_USB_MASS_STORAGE
42+
STM32F407.menu.usb.Disabled=Disabled, no USB
43+
44+
STM32F407.menu.serial.Automatic=Automatically selected based on upload method
45+
STM32F407.menu.serial.SerialUSB=SerialUSB
46+
STM32F407.menu.serial.SerialUSB.build.extra_flags_serial=-DMENU_SERIAL=SerialUSB
47+
STM32F407.menu.serial.SerialUART1=SerialUART1
48+
STM32F407.menu.serial.SerialUART1.build.extra_flags_serial=-DMENU_SERIAL=SerialUART1
49+
50+
# STM32F407VET6 board
51+
# Support: USB HID
52+
STM32F407.menu.pnum.STM32F407VET6=STM32F407VET6-BLACK
53+
STM32F407.menu.pnum.STM32F407VET6.node=NODE_F407VE
54+
STM32F407.menu.pnum.STM32F407VET6.upload.maximum_size=524288
55+
STM32F407.menu.pnum.STM32F407VET6.upload.maximum_data_size=131072
56+
STM32F407.menu.pnum.STM32F407VET6.build.mcu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard
57+
STM32F407.menu.pnum.STM32F407VET6.build.f_cpu=16800000L
58+
STM32F407.menu.pnum.STM32F407VET6.build.board=STM32F407VET6
59+
STM32F407.menu.pnum.STM32F407VET6.build.series=STM32F4xx
60+
STM32F407.menu.pnum.STM32F407VET6.build.product_line=STM32F407xx
61+
STM32F407.menu.pnum.STM32F407VET6.build.variant=STM32F407VET6
62+
STM32F407.menu.pnum.STM32F407VET6.build.cmsis_lib_gcc=arm_cortexM4l_math
63+
1164
################################################################################
1265
# Nucleo 144 boards
1366

variants/STM32F407VET6/PeripheralPins.c

Lines changed: 296 additions & 0 deletions
Large diffs are not rendered by default.

variants/STM32F407VET6/ldscript.ld

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

0 commit comments

Comments
 (0)