-
Notifications
You must be signed in to change notification settings - Fork 17
/
platform.txt
164 lines (126 loc) · 7.84 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
# Silicon Labs Arduino Core
###########################
name=Silicon Labs
version=2.2.0
# Compiler 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.path={runtime.tools.gcc-arm-none-eabi-12.2.rel1.path}/bin/
compiler.c.cmd=arm-none-eabi-gcc
compiler.c.flags={build.c_flags}
compiler.c.elf.cmd=arm-none-eabi-gcc
compiler.c.elf.flags=
compiler.S.cmd=arm-none-eabi-gcc
compiler.S.flags={build.s_flags}
compiler.cpp.cmd=arm-none-eabi-g++
compiler.cpp.flags={build.cpp_flags}
compiler.ar.cmd=arm-none-eabi-ar
compiler.ar.flags=rcs
compiler.objcopy.cmd=arm-none-eabi-objcopy
compiler.objcopy.eep.flags=
compiler.elf2bin.flags=-O binary
compiler.elf2bin.cmd=arm-none-eabi-objcopy
compiler.elf2hex.flags=-O ihex
compiler.elf2hex.cmd=arm-none-eabi-objcopy
compiler.ldflags={build.ld_flags} -Wl,--no-warn-rwx-segments
compiler.ldlibs={build.ld_libs}
compiler.size.cmd=arm-none-eabi-size
compiler.define=-DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_SILABS="{version}" -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch}
compiler.optimization_flags=-Os
compiler.optimization_flags.release=-Os
compiler.optimization_flags.debug=-O0
compiler.mapfile_path="{build.path}/{build.project_name}.map"
build.extra_flags=
# Add the include list and the precompiled libraries for the selected board
compiler.silabs.flags={build.include_list}
compiler.silabs.precompiled_libs={build.precompiled_libs}
compiler.silabs.precompiled_gsdk={build.precompiled_gsdk}
# 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.elf2bin.extra_flags=
compiler.elf2hex.extra_flags=
# Compile patterns
##################
## Compile c files
recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} {compiler.optimization_flags} {compiler.define} {compiler.c.extra_flags} "-I{build.core.path}/api/deprecated" {build.extra_flags} {compiler.silabs.flags} {includes} -MMD -MP -MF "{object_file}.d" "{source_file}" -o "{object_file}"
## Compile c++ files
recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} {compiler.optimization_flags} {compiler.define} {compiler.cpp.extra_flags} "-I{build.core.path}/api/deprecated" {build.extra_flags} {compiler.silabs.flags} {includes} "{source_file}" -o "{object_file}"
## Compile S files
recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} {compiler.optimization_flags} {compiler.define} {compiler.S.extra_flags} {build.extra_flags} {compiler.silabs.flags} {includes} "{source_file}" -o "{object_file}"
## Create archives
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}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} "-T{build.ldscript}" {compiler.ldflags} {object_files} -Wl,-whole-archive "{build.path}/{archive_file}" {compiler.silabs.precompiled_gsdk} -Wl,-no-whole-archive -Wl,--start-group {compiler.ldlibs} {compiler.silabs.precompiled_libs} -Wl,--end-group -o "{build.path}/{build.project_name}.elf"
## Create output (bin file)
recipe.objcopy.bin.pattern="{compiler.path}{compiler.elf2bin.cmd}" {compiler.elf2bin.flags} {compiler.elf2bin.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin"
## Create output (hex file)
recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex"
## Save bin
recipe.output.tmp_file_bin={build.project_name}.bin
recipe.output.save_file_bin={build.project_name}.save.bin
## Save hex
recipe.output.tmp_file_hex={build.project_name}.hex
recipe.output.save_file_hex={build.project_name}.save.hex
## Compute size
recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf"
recipe.size.regex=^(?:\.text|\.data|\.rodata)\s+([0-9]+).*
recipe.size.regex.data=^(?:\.data|\.bss|\.noinit)\s+([0-9]+).*
## Export Compiled Binary
recipe.output.tmp_file={build.project_name}.hex
recipe.output.save_file={build.project_name}.{build.variant}.hex
# Debugger configuration
# ----------------------------------------
tools.gdb.path={runtime.tools.arm-none-eabi-gcc-12.2.rel1.path}/bin/
tools.gdb.cmd=arm-none-eabi-gdb
tools.gdb.cmd.windows=arm-none-eabi-gdb.exe
debug.executable={build.path}/{build.project_name}.elf
debug.toolchain=gcc
debug.toolchain.path={runtime.tools.gcc-arm-none-eabi-12.2.rel1.path}/bin/
debug.toolchain.prefix=arm-none-eabi
debug.server.openocd.path={runtime.tools.openocd-0.12.0-arduino1-static.path}/bin/openocd
debug.server.openocd.scripts_dir={runtime.tools.openocd-0.12.0-arduino1-static.path}/share/openocd/scripts/
debug.server.jlink.path=
debug.server.jlink.scripts_dir=
debug.server.jlink.script=
# Silicon Labs Simplicity Commander (flashing/erasing)
######################################################
tools.simplicitycommander.path={runtime.tools.simplicitycommander.path}
tools.simplicitycommander.cmd.macosx=Commander.app/Contents/MacOS/commander
tools.simplicitycommander.cmd.windows=commander.exe
tools.simplicitycommander.cmd.linux=commander
tools.simplicitycommander.upload.params.verbose=-v
tools.simplicitycommander.upload.params.quiet=
tools.simplicitycommander.upload.pattern="{path}/{cmd}" flash {build.path}/{build.project_name}.hex --identifybyserialport {serial.port} {upload.verbose}
tools.simplicitycommander.program.params.verbose=-v
tools.simplicitycommander.program.params.quiet=
tools.simplicitycommander.program.pattern="{path}/{cmd}" flash {build.path}/{build.project_name}.hex --identifybyserialport {serial.port} {program.verbose}
tools.simplicitycommander.erase.params.verbose=-v
tools.simplicitycommander.erase.params.quiet=
tools.simplicitycommander.erase.pattern="{path}/{cmd}" device masserase --identifybyserialport {serial.port} {erase.verbose}
tools.simplicitycommander.bootloader.params.verbose=-v
tools.simplicitycommander.bootloader.params.quiet=
tools.simplicitycommander.bootloader.pattern="{path}/{cmd}" flash {runtime.platform.path}/bootloaders/{bootloader.file} --identifybyserialport {serial.port} {bootloader.verbose}
# OpenOCD (flashing/erasing)
##########################
tools.openocd.path={runtime.tools.openocd-0.12.0-arduino1-static.path}
tools.openocd.cmd={path}/bin/openocd
tools.openocd.upload.params.verbose=-d2
tools.openocd.upload.params.quiet=-d0
tools.openocd.upload.pattern="{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f interface/cmsis-dap.cfg -f target/efm32s2_g23.cfg -c "init; reset_config srst_nogate; reset halt; program {{build.path}/{build.project_name}.hex}; reset; exit"
tools.openocd.program.params.verbose=-d2
tools.openocd.program.params.quiet=-d0
tools.openocd.program.pattern="{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f interface/cmsis-dap.cfg -f target/efm32s2_g23.cfg -c "init; reset_config srst_nogate; reset halt; program {{build.path}/{build.project_name}.hex}; reset; exit"
tools.openocd.erase.params.verbose=-d2
tools.openocd.erase.params.quiet=-d0
tools.openocd.erase.pattern="{cmd}" {erase.verbose} -s "{path}/share/openocd/scripts/" -f interface/cmsis-dap.cfg -f target/efm32s2_g23.cfg -c "init; reset_config srst_nogate; reset halt; flash erase_sector 0 1 last; exit"
tools.openocd.bootloader.params.verbose=-d2
tools.openocd.bootloader.params.quiet=-d0
tools.openocd.bootloader.pattern="{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f interface/cmsis-dap.cfg -f target/efm32s2_g23.cfg -c "init; reset_config srst_nogate; reset halt; program {{runtime.platform.path}/bootloaders/{bootloader.file}}; reset; exit"