1
-
2
1
# STM32 ARM Core and platform.
3
2
# ------------------------------
4
3
#
@@ -21,25 +20,36 @@ compiler.warning_flags.more=-Wall
21
20
compiler.warning_flags.all=-Wall -Wextra
22
21
23
22
compiler.path={runtime.tools.arm-none-eabi-gcc.path}/bin/
24
- compiler.c.cmd=arm-none-eabi-gcc
25
- compiler.c.flags=-mthumb -c {build.flags.optimize} {compiler.warning_flags} -std=gnu11 -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -Dprintf=iprintf -MMD {compiler.stm.extra_include}
26
- compiler.c.elf.cmd=arm-none-eabi-gcc
27
- compiler.c.elf.flags=-mthumb {build.flags.optimize} {build.flags.ldspecs} -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--entry=Reset_Handler -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align
23
+
28
24
compiler.S.cmd=arm-none-eabi-gcc
29
- compiler.S.flags=-mthumb -c -x assembler-with-cpp {compiler.stm.extra_include}
25
+ compiler.c.cmd=arm-none-eabi-gcc
30
26
compiler.cpp.cmd=arm-none-eabi-g++
31
- compiler.cpp.flags=-mthumb -c {build.flags.optimize} {compiler.warning_flags} -std=gnu++11 -ffunction-sections -fdata-sections -nostdlib -fno-threadsafe-statics --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD {compiler.stm.extra_include}
32
27
compiler.ar.cmd=arm-none-eabi-gcc-ar
33
- compiler.ar.flags=rcs
28
+ compiler.c.elf.cmd=arm-none-eabi-gcc
34
29
compiler.objcopy.cmd=arm-none-eabi-objcopy
30
+ compiler.elf2hex.cmd=arm-none-eabi-objcopy
31
+
32
+ compiler.extra_flags=-mcpu={build.mcu} -DF_CPU={build.f_cpu} -mthumb
33
+
34
+ compiler.S.flags={compiler.extra_flags} -c -x assembler-with-cpp {compiler.stm.extra_include}
35
+
36
+ compiler.c.flags={compiler.extra_flags} -c {build.flags.optimize} {compiler.warning_flags} -std=gnu11 -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -Dprintf=iprintf -MMD {compiler.stm.extra_include}
37
+
38
+ compiler.cpp.flags={compiler.extra_flags} -c {build.flags.optimize} {compiler.warning_flags} -std=gnu++11 -ffunction-sections -fdata-sections -nostdlib -fno-threadsafe-statics --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD {compiler.stm.extra_include}
39
+
40
+ compiler.ar.flags=rcs
41
+
42
+ compiler.c.elf.flags=-mcpu={build.mcu} -mthumb {build.flags.optimize} {build.flags.ldspecs} -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--entry=Reset_Handler -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align
43
+
35
44
compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0
45
+
36
46
compiler.elf2hex.flags=-O binary
37
- compiler.elf2hex.cmd=arm-none-eabi-objcopy
47
+
38
48
compiler.ldflags={build.flags.ldspecs}
39
49
compiler.size.cmd=arm-none-eabi-size
40
50
compiler.define=-DARDUINO=
41
51
42
- # this can be overriden in boards.txt
52
+ # These can be overriden in boards.txt
43
53
build.extra_flags=
44
54
build.ldscript=ldscript.ld
45
55
@@ -61,9 +71,7 @@ build.usb_flags=-DUSBCON -DUSBD_VID={build.vid} -DUSBD_PID={build.pid} '-DUSB_MA
61
71
# numeric vendor ID if available or by board's specific value.
62
72
build.usb_manufacturer="Unknown"
63
73
64
- #
65
74
# Defaults config
66
- #
67
75
build.xSerial=
68
76
build.enable_usb=
69
77
build.flags.optimize=
@@ -73,20 +81,19 @@ build.flags.ldspecs=
73
81
# ---------------------
74
82
75
83
## Compile c files
76
- recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -mcpu={build.mcu} -DF_CPU={build.f_cpu} - D{build.series} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.c.extra_flags} {build.extra_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}"
84
+ recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -D{build.series} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.c.extra_flags} {build.extra_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}"
77
85
78
86
## Compile c++ files
79
- recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -mcpu={build.mcu} -DF_CPU={build.f_cpu} - D{build.series} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}"
87
+ recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -D{build.series} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}"
80
88
81
89
## Compile S files
82
- recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -mcpu={build.mcu} -DF_CPU={build.f_cpu} - D{build.series} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}"
90
+ recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -D{build.series} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}"
83
91
84
92
## Create archives
85
93
recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}"
86
94
87
95
## Combine gc-sections, archives, and objects
88
- recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.flags} -mcpu={build.mcu} -DF_CPU={build.f_cpu} "-T{build.variant.path}/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" {compiler.c.elf.extra_flags} {compiler.ldflags} -o "{build.path}/{build.project_name}.elf" "-L{build.path}" -Wl,--start-group {object_files} {compiler.arm.cmsis.ldflags} -Wl,--whole-archive "{archive_file_path}" -Wl,--no-whole-archive -lc -Wl,--end-group -lm -lgcc -lstdc++ --specs=nano.specs
89
-
96
+ recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.flags} "-T{build.variant.path}/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" {compiler.c.elf.extra_flags} {compiler.ldflags} {compiler.arm.cmsis.ldflags} -o "{build.path}/{build.project_name}.elf" "-L{build.path}" -Wl,--start-group {object_files} -Wl,--whole-archive "{archive_file_path}" -Wl,--no-whole-archive -lc -Wl,--end-group -lm -lgcc -lstdc++ --specs=nano.specs
90
97
91
98
## Create output (.bin file)
92
99
recipe.objcopy.bin.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin"
@@ -105,7 +112,7 @@ recipe.size.regex.eeprom=^(?:\.eeprom)\s+([0-9]+).*
105
112
# Uploader tool
106
113
# -------------------
107
114
108
- #Upload to board via mass storage
115
+ # Upload to board via mass storage
109
116
tools.massStorageCopy.cmd=massStorageCopy
110
117
tools.massStorageCopy.cmd.windows=massStorageCopy.bat
111
118
tools.massStorageCopy.cmd.macosx=massStorageCopyMacOsX
@@ -117,7 +124,7 @@ tools.massStorageCopy.upload.params.verbose=
117
124
tools.massStorageCopy.upload.params.quiet=
118
125
tools.massStorageCopy.upload.pattern="{path}/{cmd}" {upload.verbose} -I "{build.path}/{build.project_name}.bin" -O "{node}"
119
126
120
- # stlink upload
127
+ # ST-Link upload
121
128
tools.stlink_upload.cmd=stlink_upload
122
129
tools.stlink_upload.cmd.windows=stlink_upload.bat
123
130
tools.stlink_upload.path.windows={runtime.hardware.path}/tools/win
0 commit comments