1
- # Arduino STM32 Core and platform
1
+
2
+ # Arduino STM32F4 Core and platform
3
+ # ------------------------------
2
4
#
3
5
# For more info:
4
6
# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification
5
7
6
- #
7
- # edited 1 Jun 2016 - Arduino srl - Francesco Alessi (alfran) -
[email protected]
8
- #
9
-
10
- name=Arduino STM32 (32-bits) boards
11
- version=1.7.0
8
+ name=Arduino STM32F4 (32-bits ARM Cortex-M4) Boards
9
+ version=1.0.0
12
10
13
- # STM32 compiler variables
11
+ # STM32F4 compiler variables
14
12
# ------------------------
15
13
16
- compiler.path={runtime.ide.path}/hardware/ tools/gcc- arm-none-eabi-4.8.3-2014q1 /bin/
14
+ compiler.path={runtime.tools. arm-none-eabi-gcc.path} /bin/
17
15
compiler.c.cmd=arm-none-eabi-gcc
18
16
compiler.c.flags=-c -Os {compiler.warning_flags} -std=gnu11 -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -D{build.vect} -Dprintf=iprintf -MMD {compiler.libs.c.flags}
19
17
compiler.c.elf.cmd=arm-none-eabi-gcc
@@ -69,10 +67,10 @@ recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -m
69
67
recipe.S.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.S.flags} -mcpu={build.mcu} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {build.cpu_flags} {build.hs_flag} {build.common_flags} {compiler.libs.c.flags} {includes} "{source_file}" -o "{object_file}"
70
68
71
69
## Create archives
72
- recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{build.path}/{archive_file }" "{object_file}"
70
+ recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path }" "{object_file}"
73
71
74
72
## Combine gc-sections, archives, and objects
75
- recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.flags} -mcpu={build.mcu} "-T{build.variant.path}/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" {compiler.c.elf.extra_flags} -o "{build.path}/{build.project_name}.elf" "-L{build.path}" -lm -lgcc -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align -Wl,--warn-unresolved-symbols -Wl,--start-group "{build.path}/syscalls.c.o" {object_files} -Wl,--whole-archive "{build.variant.path}/{build.variant_system_lib}" -Wl,--no-whole-archive "{build.path}/{archive_file}" -Wl,--end-group
73
+ recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.flags} -mcpu={build.mcu} "-T{build.variant.path}/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" {compiler.c.elf.extra_flags} -o "{build.path}/{build.project_name}.elf" "-L{build.path}" -lm -lgcc -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align -Wl,--warn-unresolved-symbols -Wl,--start-group "{build.path}/core/ syscalls.c.o" {object_files} -Wl,--whole-archive "{build.variant.path}/{build.variant_system_lib}" -Wl,--no-whole-archive "{build.path}/{archive_file}" -Wl,--end-group
76
74
77
75
## Create eeprom
78
76
recipe.objcopy.eep.pattern=
@@ -88,53 +86,22 @@ recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build
88
86
recipe.size.regex=^(?:\.text|\.rodata|\.ARM.exidx)\s+([0-9]+).*
89
87
recipe.size.regex.data=^(?:\.data|\.bss|\.noinit)\s+([0-9]+).*
90
88
91
- # STM32 Uploader/Programmers tools
92
- # --------------------------------
93
-
94
- # Generic STM32 upload via serial to Serial Port 1 (pins PA9 and PA10) - note. Boot0 line needs to high on board reset to enable upload via serial
95
- # at the end of the upload the program is automatically run, without the board being reset
96
-
97
- tools.serial_upload.cmd=serial_upload
98
- tools.serial_upload.cmd.windows=serial_upload.bat
99
- tools.serial_upload.cmd.macosx=serial_upload
100
- #tools.serial_upload.cmd.linux=
101
-
102
- tools.serial_upload.path={runtime.hardware.path}/tools/win
103
- tools.serial_upload.path.macosx={runtime.hardware.path}/tools/macosx
104
-
105
- tools.serial_upload.upload.params.verbose=-d
106
- tools.serial_upload.upload.params.quiet=
107
- tools.serial_upload.upload.pattern="{path}/{cmd}" {serial.port.file} {upload.altID} {upload.usbID} "{build.path}/{build.project_name}.bin"
108
-
109
- # STLINK/V2
110
-
111
- tools.stlink.cmd=stlink
112
- tools.stlink.cmd.windows=stlink_upload.bat
113
- tools.stlink.cmd.macosx=stlink_upload
114
- #tools.stlink.cmd.linux=
115
-
116
- tools.stlink.path.windows={runtime.hardware.path}/tools/win
117
- tools.stlink.path.macosx={runtime.hardware.path}/tools/macosx
118
-
119
- tools.stlink.upload.params.verbose=-d
120
- tools.stlink.upload.params.quiet=
121
- tools.stlink.upload.pattern="{path}/{cmd}" {serial.port.file} {upload.altID} {upload.usbID} "{build.path}/{build.project_name}.bin"
122
-
89
+ #
123
90
# DFU Util
91
+ # --------
124
92
93
+ tools.dfu-util.path={runtime.tools.dfu-util-0.8.0-stm32-arduino1.path}
125
94
tools.dfu-util.cmd=dfu-util
126
- tools.dfu-util.cmd.windows=StAr_Write.bat
127
-
128
- tools.dfu-util.path={runtime.ide.path}/hardware/tools/dfu-util/
95
+ tools.dfu-util.cmd.windows=dfu-util.cmd
129
96
130
97
tools.dfu-util.upload.params.verbose=-v
131
98
tools.dfu-util.upload.params.quiet=
132
99
tools.dfu-util.upload.pattern="{path}/{cmd}" "{path}" {upload.usbID} {upload.altID} {upload.mem_start} "{build.path}/{build.project_name}.bin"
133
100
101
+ #
134
102
# USB Flags
135
103
# ---------
136
104
137
105
# Default usb manufacturer will be replaced at compile time using
138
106
# numeric vendor ID if available or by board's specific value.
139
107
build.usb_manufacturer="Unknown"
140
- tools.dfu-util.upload.pattern="{path}/{cmd}" "{path}" -l -d {upload.usbID} -a {upload.altID} -s {upload.mem_start} -O "{build.path}/{build.project_name}.bin" -f 0x08000000
0 commit comments