-
Notifications
You must be signed in to change notification settings - Fork 19
/
platform.txt
140 lines (103 loc) · 6.87 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
#
# For more info:
# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5-3rd-party-Hardware-specification
name=Adafruit WICED (STM32F2 ARM Cortex M3) Boards
version=0.6.7
# compiler variables
# ----------------------
compiler.path={runtime.tools.arm-none-eabi-gcc.path}/bin/
compiler.debug_flags=
#compiler.debug_flags=-include "{runtime.platform.path}/platform_debug.h"
compiler.c.cmd=arm-none-eabi-gcc
compiler.c.flags=-std=gnu99 -c -g -O1 -w -MMD -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -DBOARD_{build.variant} -D{build.vect} -D{build.density} -DERROR_LED_PORT={build.error_led_port} -DERROR_LED_PIN={build.error_led_pin} {compiler.extra_includes} {compiler.debug_flags}
compiler.cpp.cmd=arm-none-eabi-g++
compiler.cpp.flags=-c -g -O1 -w -MMD -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -DBOARD_{build.variant} -D{build.vect} -D{build.density} -DERROR_LED_PORT={build.error_led_port} -DERROR_LED_PIN={build.error_led_pin} {compiler.extra_includes} {compiler.debug_flags}
compiler.c.elf.cmd=arm-none-eabi-g++
compiler.c.elf.flags=-O1 -Wl,--gc-sections -Wl,--defsym,FIRMWARE_MAGIC_OFFSET=512
compiler.S.cmd=arm-none-eabi-gcc
compiler.S.flags=-c -g -x assembler-with-cpp -MMD {compiler.extra_includes} -D{build.density}
compiler.ar.cmd=arm-none-eabi-ar
compiler.ar.flags=rcs
compiler.objcopy.cmd=arm-none-eabi-objcopy
compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0
compiler.elf2hex.flags=-O binary
compiler.elf2hex.cmd=arm-none-eabi-objcopy
compiler.ldflags=
compiler.size.cmd=arm-none-eabi-size
compiler.define=-DARDUINO=
# Extra option
compiler.c.extra_flags=
compiler.c.elf.extra_flags="-L{build.variant.path}/ld"
compiler.cpp.extra_flags=
compiler.S.extra_flags=
compiler.ar.extra_flags=
compiler.elf2hex.extra_flags=
compiler.extra_includes="-I{build.core.path}/libmaple"
# this can be overriden in boards.txt
build.cpu_flags=
build.hs_flag=
build.common_flags=
build.extra_flags= {build.cpu_flags} {build.hs_flag} {build.common_flags}
# USB Flags
# ---------
## build.usb_flags=-DUSB_VID={build.vid} -DUSB_PID={build.pid} -DUSBCON '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}'
# Default usb manufacturer will be replaced at compile time using
# numeric vendor ID if available or by board's specific value.
## build.usb_manufacturer="Unknown"
# build patterns
# ---------------------
## Compile c files
recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -mcpu={build.mcu} -mlittle-endian -mfloat-abi=soft -mthumb -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.c.extra_flags} {build.extra_flags} {includes} "{source_file}" -o "{object_file}"
## Compile c++ files
recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -mcpu={build.mcu} -mlittle-endian -mfloat-abi=soft -mthumb -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {build.cpu_flags} {build.hs_flag} {build.common_flags} {includes} "{source_file}" -o "{object_file}"
## Compile S files
recipe.S.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.S.flags} -mcpu={build.mcu} -mlittle-endian -mfloat-abi=soft -mthumb -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} {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} -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 {object_files} -Wl,--whole-archive "{archive_file_path}" -Wl,--no-whole-archive -Wl,--end-group
## Create eeprom
recipe.objcopy.eep.pattern=
## Create bin
recipe.objcopy.bin.pattern="{compiler.path}{compiler.elf2hex.cmd}" -O binary "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin"
## Create hex
#recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" -O ihex "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex"
## Compute size
recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf"
#recipe.size.regex=\.text\s+([0-9]+).*
recipe.size.regex=^(?:\.text|\.rodata|\.ARM.exidx)\s+([0-9]+).*
recipe.size.regex.data=^(?:\.data|\.bss|\.noinit)\s+([0-9]+).*
# Uploader tools
# -------------------
# Upload using wiced_dfu, Macos/Linux require to install libusb-1.0 and dfu-util
tools.adafruit_upload.path={runtime.tools.wiced_dfu.path}
tools.adafruit_upload.cmd=wiced_dfu
tools.adafruit_upload.dfu_util=
# feather_dfu (obsolete) Still used by windows, since wiced_dfu has driver
# issue with window 10. Will be removed when figuring out the issue
tools.adafruit_upload.path.windows={runtime.platform.path}/tools/win32-x86
tools.adafruit_upload.cmd.windows=feather_dfu/feather_dfu.exe
tools.adafruit_upload.dfu_util.windows=-u "{path}/dfu-util/dfu-util-static.exe"
tools.adafruit_upload.upload.params.verbose=-v
tools.adafruit_upload.upload.params.quiet=
tools.adafruit_upload.upload.pattern="{path}/{cmd}" {dfu_util} {upload.subcommand} "{upload.binfile}"
# Manual Git core development may need to uncomment this, and make alias to wiced_dfu to your /username/bin
#tools.adafruit_upload.upload.pattern="{cmd}" {dfu_util} {upload.subcommand} "{upload.binfile}"
# Adalink Programmer/Uploader tools
# -------------------
tools.adalink.cmd=adalink
tools.adalink.cmd.windows=adalink
tools.adalink.cmd.linux=adalink
tools.adalink.cmd.macosx=/usr/local/bin/adalink
# Programmer bootloader
tools.adalink.bootloader.params.verbose=-v
tools.adalink.bootloader.params.quiet=
tools.adalink.bootloader.pattern="{cmd}" {bootloader.verbose} stm32f2 --programmer {program.programmer} --wipe --program-hex "{runtime.platform.path}/{bootloader.file}"
# Uploader sketch
tools.adalink.program.params.verbose=-v
tools.adalink.program.params.quiet=
tools.adalink.program.pattern="{cmd}" {program.verbose} stm32f2 --programmer {program.programmer} --program-bin "{upload.binfile}" {upload.address}
# Adalink auto erase flash page while programming
tools.adalink.erase.params.verbose=
tools.adalink.erase.params.quiet=
tools.adalink.erase.pattern=