20
20
# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification
21
21
22
22
name=Mysensors SAMD (32-bits ARM Cortex-M0+) Boards
23
- version=1.0.3
23
+ version=1.0.4
24
24
25
25
# Compile variables
26
26
# -----------------
@@ -37,18 +37,20 @@ compiler.c.flags=-mcpu={build.mcu} -mthumb -c -g -Os {compiler.warning_flags} -s
37
37
compiler.c.elf.cmd=arm-none-eabi-gcc
38
38
compiler.c.elf.flags=-Os -Wl,--gc-sections -save-temps
39
39
compiler.S.cmd=arm-none-eabi-gcc
40
- compiler.S.flags=-c -g -x assembler-with-cpp
40
+ compiler.S.flags=-c -g -x assembler-with-cpp -MMD
41
41
compiler.cpp.cmd=arm-none-eabi-g++
42
42
compiler.cpp.flags=-mcpu={build.mcu} -mthumb -c -g -Os {compiler.warning_flags} -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD
43
43
compiler.ar.cmd=arm-none-eabi-ar
44
44
compiler.ar.flags=rcs
45
45
compiler.objcopy.cmd=arm-none-eabi-objcopy
46
46
compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0
47
- compiler.elf2hex.flags=-O binary
47
+ compiler.elf2hex.bin.flags=-O binary
48
+ compiler.elf2hex.hex.flags=-O ihex -R .eeprom
48
49
compiler.elf2hex.cmd=arm-none-eabi-objcopy
49
50
compiler.ldflags=-mcpu={build.mcu} -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align
50
51
compiler.size.cmd=arm-none-eabi-size
51
52
compiler.define=-DARDUINO=
53
+ compiler.readelf.cmd=arm-none-eabi-readelf
52
54
53
55
# this can be overriden in boards.txt
54
56
build.extra_flags=
@@ -62,7 +64,8 @@ compiler.S.extra_flags=
62
64
compiler.ar.extra_flags=
63
65
compiler.elf2hex.extra_flags=
64
66
65
- compiler.arm.cmsis.path="-I{runtime.tools.CMSIS.path}/CMSIS/Include/" "-I{runtime.tools.CMSIS.path}/Device/ATMEL/"
67
+ compiler.arm.cmsis.c.flags="-I{runtime.tools.CMSIS-4.5.0.path}/CMSIS/Include/" "-I{runtime.tools.CMSIS-Atmel-1.0.0.path}/CMSIS/Device/ATMEL/"
68
+ compiler.arm.cmsis.ldflags="-L{runtime.tools.CMSIS-4.5.0.path}/CMSIS/Lib/GCC/" -larm_cortexM0l_math
66
69
67
70
# USB Flags
68
71
# ---------
@@ -72,63 +75,86 @@ build.usb_flags=-DUSB_VID={build.vid} -DUSB_PID={build.pid} -DUSBCON '-DUSB_MANU
72
75
# numeric vendor ID if available or by board's specific value.
73
76
build.usb_manufacturer="Unknown"
74
77
75
-
76
78
# Compile patterns
77
79
# ----------------
78
80
79
81
## Compile c files
80
- recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.c.extra_flags} {build.extra_flags} {compiler.arm.cmsis.path } {includes} "{source_file}" -o "{object_file}"
82
+ recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DF_CPU={build.f_cpu} -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}"
81
83
82
84
## Compile c++ files
83
- recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {compiler.arm.cmsis.path } {includes} "{source_file}" -o "{object_file}"
85
+ recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DF_CPU={build.f_cpu} -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}"
84
86
85
87
## Compile S files
86
- recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {compiler.arm.cmsis.path } {includes} "{source_file}" -o "{object_file}"
88
+ recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DF_CPU={build.f_cpu} -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}"
87
89
88
90
## Create archives
89
- #recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{build.path}/{archive_file}" "{object_file}"
91
+ # archive_file_path is needed for backwards compatibility with IDE 1.6.5 or older, IDE 1.6.6 or newer overrides this value
92
+ archive_file_path={build.path}/{archive_file}
93
+ recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}"
90
94
91
95
## Combine gc-sections, archives, and objects
92
- recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} "-T{build.variant.path}/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" --specs=nano.specs --specs=nosys.specs {compiler.ldflags} -o "{build.path}/{build.project_name}.elf" {object_files} -Wl,--start-group -lm "{build.path}/{archive_file}" -Wl,--end-group
96
+ recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} "-T{build.variant.path}/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" --specs=nano.specs --specs=nosys.specs {compiler.ldflags} -o "{build.path}/{build.project_name}.elf" {object_files} -Wl,--start-group {compiler.arm.cmsis.ldflags} -lm "{build.path}/{archive_file}" -Wl,--end-group
93
97
94
98
## Create output (bin file)
95
- 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"
99
+ recipe.objcopy.bin.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.bin.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin"
100
+
101
+ ## Create output (hex file)
102
+ recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex"
103
+
104
+ build.preferred_out_format=bin
96
105
97
106
## Save hex
98
- recipe.output.tmp_file={build.project_name}.bin
99
- recipe.output.save_file={build.project_name}.{build.variant}.bin
107
+ recipe.output.tmp_file={build.project_name}.{build.preferred_out_format}
108
+ recipe.output.save_file={build.project_name}.{build.variant}.{build.preferred_out_format}
100
109
101
110
## Compute size
102
111
recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf"
103
112
recipe.size.regex=\.text\s+([0-9]+).*
104
113
105
-
106
114
# Uploader tools
107
115
# --------------
108
116
117
+ #
118
+ # AVRDUDE
119
+ #
120
+ tools.avrdude.path={runtime.tools.avrdude.path}
121
+ tools.avrdude.cmd={path}/bin/avrdude
122
+ tools.avrdude.config.path={path}/etc/avrdude.conf
123
+
124
+ tools.avrdude.upload.params.verbose=-v -v
125
+ tools.avrdude.upload.params.quiet=-q -q
126
+ tools.avrdude.upload.params.noverify=-V
127
+ tools.avrdude.upload.pattern="{cmd}" "-C{config.path}" {upload.verbose} -p{build.emu.mcu} -c{upload.protocol} -P{serial.port} -b{upload.speed} "-Uflash:w:{build.path}/{build.project_name}.hex:i"
128
+
129
+ #temporary disabled remote upload
130
+ tools.avrdude_remote.upload.pattern=/usr/bin/XXX-run-avrdude /tmp/sketch.hex
131
+
109
132
#
110
133
# BOSSA
111
134
#
112
- tools.bossac.path={runtime.tools.bossac-1.6.1-arduino .path}
135
+ tools.bossac.path={runtime.tools.bossac-1.7.0 .path}
113
136
tools.bossac.cmd=bossac
114
137
tools.bossac.cmd.windows=bossac.exe
115
138
116
139
tools.bossac.upload.params.verbose=-i -d
117
140
tools.bossac.upload.params.quiet=
118
141
tools.bossac.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U {upload.native_usb} -i -e -w -v "{build.path}/{build.project_name}.bin" -R
119
142
143
+ tools.bossac_remote.upload.pattern=/usr/bin/run-bossac {upload.verbose} --port=ttyATH0 -U {upload.native_usb} -e -w -v /tmp/sketch.bin -R
144
+
120
145
#
121
146
# OpenOCD sketch upload
122
147
#
123
148
124
- tools.openocd.path={runtime.tools.openocd.path}
149
+ tools.openocd.path={runtime.tools.openocd-0.9.0-arduino .path}
125
150
tools.openocd.cmd=bin/openocd
126
151
tools.openocd.cmd.windows=bin/openocd.exe
127
152
128
153
tools.openocd.upload.params.verbose=-d2
129
154
tools.openocd.upload.params.quiet=-d0
130
- tools.openocd.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{{build.path}/{build.project_name}.bin}} verify reset 0x00002000 ; shutdown"
155
+ tools.openocd.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{{build.path}/{build.project_name}.bin}} verify reset 0x2000 ; shutdown"
131
156
157
+ # Program flashes the binary at 0x0000, so use the linker script without_bootloader
132
158
tools.openocd.program.params.verbose=-d2
133
159
tools.openocd.program.params.quiet=-d0
134
160
tools.openocd.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{{build.path}/{build.project_name}.elf}} verify reset; shutdown"
@@ -140,3 +166,29 @@ tools.openocd.erase.pattern=
140
166
tools.openocd.bootloader.params.verbose=-d2
141
167
tools.openocd.bootloader.params.quiet=-d0
142
168
tools.openocd.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{{runtime.platform.path}/bootloaders/{bootloader.file}}} verify reset; shutdown"
169
+
170
+ #
171
+ # OpenOCD sketch upload - version with configurable bootloader size
172
+ # FIXME: this programmer is a workaround for default options being overwritten by uploadUsingPreferences
173
+ #
174
+
175
+ tools.openocd-withbootsize.path={runtime.tools.openocd-0.9.0-arduino.path}
176
+ tools.openocd-withbootsize.cmd=bin/openocd
177
+ tools.openocd-withbootsize.cmd.windows=bin/openocd.exe
178
+
179
+ tools.openocd-withbootsize.upload.params.verbose=-d2
180
+ tools.openocd-withbootsize.upload.params.quiet=-d0
181
+ tools.openocd-withbootsize.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{{build.path}/{build.project_name}.bin}} verify reset {bootloader.size}; shutdown"
182
+
183
+ # Program flashes the binary at 0x0000, so use the linker script without_bootloader
184
+ tools.openocd-withbootsize.program.params.verbose=-d2
185
+ tools.openocd-withbootsize.program.params.quiet=-d0
186
+ tools.openocd-withbootsize.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{{build.path}/{build.project_name}.elf}} verify reset; shutdown"
187
+
188
+ tools.openocd-withbootsize.erase.params.verbose=-d3
189
+ tools.openocd-withbootsize.erase.params.quiet=-d0
190
+ tools.openocd-withbootsize.erase.pattern=
191
+
192
+ tools.openocd-withbootsize.bootloader.params.verbose=-d2
193
+ tools.openocd-withbootsize.bootloader.params.quiet=-d0
194
+ tools.openocd-withbootsize.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{{runtime.platform.path}/bootloaders/{bootloader.file}}} verify reset; shutdown"
0 commit comments