-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathplatform.txt
170 lines (144 loc) · 10.1 KB
/
platform.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
name=Tlera Corp STM32WB Boards
version=0.1.0
# Compile variables
# -----------------
compiler.warning_flags=-w
compiler.warning_flags.none=-w
compiler.warning_flags.default=
compiler.warning_flags.more=-Wall
compiler.warning_flags.all=-Wall -Wextra
compiler.optimization_flags=-g -Os
compiler.optimization_flags.release=-g -Os
compiler.optimization_flags.debug=-g3 -Og
compiler.path={runtime.tools.arm-none-eabi-gcc-7-2017q4.path}/bin/
compiler.c.cmd=arm-none-eabi-gcc
compiler.c.flags=-mcpu={build.mcu} -march={build.architecture} -mfpu={build.fpu} -mthumb -mabi=aapcs -mfloat-abi={build.float-abi} -c {compiler.optimization_flags} {compiler.warning_flags} -std=gnu11 -ffunction-sections -fdata-sections -nostdlib -MMD
compiler.c.elf.cmd=arm-none-eabi-gcc
compiler.c.elf.flags=-g {compiler.optimization_flags} -Wl,--gc-sections -save-temps
compiler.S.cmd=arm-none-eabi-gcc
compiler.S.flags=-c -g -x assembler-with-cpp -mcpu={build.mcu} -march={build.architecture} -mfpu={build.fpu} -mthumb -mabi=aapcs -mfloat-abi={build.float-abi}
compiler.cpp.cmd=arm-none-eabi-g++
compiler.cpp.flags=-mcpu={build.mcu} -march={build.architecture} -mfpu={build.fpu} -mthumb -mabi=aapcs -mfloat-abi={build.float-abi} -c {compiler.optimization_flags} {compiler.warning_flags} -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib -fno-rtti -fno-exceptions -MMD
compiler.ar.cmd=arm-none-eabi-ar
compiler.ar.flags=rcs
compiler.ldflags=-mcpu={build.mcu} -march={build.architecture} -mfpu={build.fpu} -mthumb -mabi=aapcs -mfloat-abi={build.float-abi} -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--defsym=__RTC_EPOCH__={extra.time.utc} -Wl,--defsym=__RTC_ZONE__={extra.time.zone} -Wl,--defsym=__RTC_DST__={extra.time.dst} -Wl,--defsym=__RTC_LEAP_SECONDS=18
compiler.size.cmd=arm-none-eabi-size
compiler.define=-DARDUINO=
# this can be overriden in boards.txt
build.extra_flags=
build.security_flags=
# These can be overridden in platform.local.txt
compiler.c.extra_flags=
compiler.c.elf.extra_flags=
compiler.cpp.extra_flags=
compiler.S.extra_flags=
compiler.ar.extra_flags=
compiler.libraries.ldflags=
# USB Flags
# ---------
build.usb_flags=-DUSB_VID={build.usb_vid} -DUSB_PID={build.usb_pid} '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}' '-DUSB_TYPE={build.usb_type}'
# STORAGE Flags
# ---------
build.storage_flags=-DSTORAGE_TYPE={build.storage_type}
# Compile patterns
# ----------------
## Compile c files
recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.c.extra_flags} {build.extra_flags} {build.variant_system_include} {includes} "{source_file}" -o "{object_file}"
## Compile c++ files
recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {build.variant_system_include} {includes} "{source_file}" -o "{object_file}"
## Compile S files
recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {build.variant_system_include} {includes} "{source_file}" -o "{object_file}"
## Create archives
# archive_file_path is needed for backwards compatibility with IDE 1.6.5 or older, IDE 1.6.6 or newer overrides this value
archive_file_path={build.path}/{archive_file}
recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}"
## Combine gc-sections, archives, and objects
recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} {build.extra_flags} "-T{runtime.platform.path}/system/STM32WBxx/LdScripts/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" --specs=nano.specs {compiler.ldflags} -o "{build.path}/{build.project_name}.elf" {object_files} -Wl,--start-group "{build.path}/{archive_file}" {compiler.libraries.ldflags} {build.variant_system_libs} -lc -lm -Wl,--end-group
## Create output (bin file)
recipe.objcopy.bin.pattern="{tools.elfsign.path}/{tools.elfsign.cmd}" {tools.elfsign.flags} {build.security_flags} -b "{build.path}/{build.project_name}.bin" -d "{build.path}/{build.project_name}.dfu" -o "{build.path}/{build.project_name}.ota" -x "{build.path}/{build.project_name}.hex" "{build.path}/{build.project_name}.elf"
## Save output (hex file)
recipe.output.tmp_file={build.project_name}.hex
recipe.output.save_file={build.project_name}.{build.variant}.hex
## Save output (dfu file)
recipe.hooks.savehex.postsavehex.1.pattern.linux=cp "{build.path}/{build.project_name}.dfu" "{sketch_path}/{build.project_name}.{build.variant}.dfu"
recipe.hooks.savehex.postsavehex.1.pattern.macosx=cp "{build.path}/{build.project_name}.dfu" "{sketch_path}/{build.project_name}.{build.variant}.dfu"
recipe.hooks.savehex.postsavehex.1.pattern.windows=cmd /C copy "{build.path}\{build.project_name}.dfu" "{sketch_path}\{build.project_name}.{build.variant}.dfu"
## Save output (ota file)
recipe.hooks.savehex.postsavehex.2.pattern.linux=cp "{build.path}/{build.project_name}.ota" "{sketch_path}/{build.project_name}.{build.variant}.ota"
recipe.hooks.savehex.postsavehex.2.pattern.macosx=cp "{build.path}/{build.project_name}.ota" "{sketch_path}/{build.project_name}.{build.variant}.ota"
recipe.hooks.savehex.postsavehex.2.pattern.windows=cmd /C copy "{build.path}\{build.project_name}.ota" "{sketch_path}\{build.project_name}.{build.variant}.ota"
## Compute size
recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf"
recipe.size.regex=^(?:\.text|\.rodata|\.data|\.cctext)\s+([0-9]+).*
recipe.size.regex.data=^(?:\.data|\.bss|\.noinit|\.dma)\s+([0-9]+).*
# GDB
tools.gdb.cmd.linux=arm-none-eabi-gdb
tools.gdb.cmd.macos=arm-none-eabi-gdb
tools.gdb.cmd.windows=arm-none-eabi-gdb.exe
tools.gdb.path={runtime.tools.arm-none-eabi-gcc-7-2017q4.path}/bin/
debug.executable={build.path}/{build.project_name}.elf
debug.toolchain=gcc
debug.toolchain.path={runtime.tools.arm-none-eabi-gcc-7-2017q4.path}/bin/
debug.toolchain.prefix=arm-none-eabi-
debug.server=openocd
debug.server.openocd.path.linux={runtime.platform.path}/tools/linux/openocd
debug.server.openocd.path.macosx={runtime.platform.path}/tools/macosx/openocd
debug.server.openocd.path.windows={runtime.platform.path}/tools/windows/openocd.exe
debug.server.openocd.scripts_dir={runtime.platform.path}/tools/share/openocd/scripts/
debug.server.openocd.scripts.0={programmer.interface}
debug.server.openocd.scripts.1={programmer.transport}
debug.server.openocd.scripts.2={programmer.target}
#debug.cortex-debug.custom.showDevDebugOutput=raw
debug.cortex-debug.custom.rtos=auto
#debug.cortex-debug.custom.rttConfig.enabled=[boolean]true
#debug.cortex-debug.custom.rttConfig.address=0x20039000
#debug.cortex-debug.custom.rttConfig.searchId=SEGGER RTT
#debug.cortex-debug.custom.rttConfig.searchSize=[number]4096
#debug.cortex-debug.custom.rttConfig.decoders.0.port=[number]0
#debug.cortex-debug.custom.rttConfig.decoders.0.type=console
debug.cortex-debug.custom.openOCDLaunchCommands.0=reset_config srst_only srst_nogate connect_assert_srst
debug.cortex-debug.custom.request=attach
debug.cortex-debug.custom.postAttachCommands.0=set remote hardware-watchpoint-limit 4
debug.cortex-debug.custom.postAttachCommands.1=monitor reset halt
debug.cortex-debug.custom.postAttachCommands.2=monitor gdb_sync
debug.cortex-debug.custom.postAttachCommands.3=c
debug.cortex-debug.custom.overrideRestartCommands.0=monitor reset halt
debug.cortex-debug.custom.overrideRestartCommands.1=monitor gdb_sync
debug.cortex-debug.custom.overrideRestartCommands.2=c
# DFU-UTIL
tools.dfu-util.cmd.linux=dfu-util
tools.dfu-util.cmd.macosx=dfu-util
tools.dfu-util.cmd.windows=dfu-util.exe
tools.dfu-util.path.linux={runtime.platform.path}/tools/linux
tools.dfu-util.path.macosx={runtime.platform.path}/tools/macosx
tools.dfu-util.path.windows={runtime.platform.path}/tools/windows
tools.dfu-util.upload.params.verbose=
tools.dfu-util.upload.params.quiet=
tools.dfu-util.upload.pattern="{path}/{cmd}" -R -d {upload.vid}:{upload.pid},0x0483:0xdf11 -a {upload.interface} -s {upload.address}:leave -D "{build.path}/{build.project_name}.bin"
tools.dfu-util.program.params.verbose=
tools.dfu-util.program.params.quiet=
tools.dfu-util.program.pattern="{path}/{cmd}" -R -d {upload.vid}:{upload.pid},0x0483:0xdf11 -a {upload.interface} -s {upload.address}:leave -D "{build.path}/{build.project_name}.bin"
# OPENOCD
tools.openocd.cmd.linux=openocd
tools.openocd.cmd.macosx=openocd
tools.openocd.cmd.windows=openocd.exe
tools.openocd.path.linux={runtime.platform.path}/tools/linux
tools.openocd.path.macosx={runtime.platform.path}/tools/macosx
tools.openocd.path.windows={runtime.platform.path}/tools/windows
tools.openocd.upload.params.verbose=-d2
tools.openocd.upload.params.quiet=-d0
tools.openocd.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{runtime.platform.path}/tools/share/openocd/scripts/" -f "{programmer.interface}" -f "{programmer.transport}" -f "{programmer.target}" -c "telnet_port disabled; init; reset init; halt; program {{build.path}/{build.project_name}.elf}; reset run; shutdown"
tools.openocd.program.params.verbose=-d2
tools.openocd.program.params.quiet=-d0
tools.openocd.program.pattern="{path}/{cmd}" {program.verbose} -s "{runtime.platform.path}/tools/share/openocd/scripts/" -f "{programmer.interface}" -f "{programmer.transport}" -f "{programmer.target}" -c "telnet_port disabled; init; reset init; halt; program {{build.path}/{build.project_name}.elf}; reset run; shutdown"
tools.openocd.erase.params.verbose=-d3
tools.openocd.erase.params.quiet=-d0
tools.openocd.erase.pattern=
# ELFSIGN
tools.elfsign.cmd.linux=elfsign
tools.elfsign.cmd.macosx=elfsign
tools.elfsign.cmd.windows=elfsign.exe
tools.elfsign.path.linux={runtime.platform.path}/tools/linux
tools.elfsign.path.macosx={runtime.platform.path}/tools/macosx
tools.elfsign.path.windows={runtime.platform.path}/tools/windows
tools.elfsign.flags=-u {build.uuid} -v {build.usb_vid} -p {build.usb_pid}