@@ -37,7 +37,7 @@ compiler.cpp.flags={compiler.extra_flags} -c {build.flags.optimize} {compiler.wa
3737
3838compiler.ar.flags=rcs
3939
40- compiler.c.elf.flags=-mcpu={build.mcu} -mthumb {build.flags.optimize} {build.flags.ldspecs} -Wl,--defsym=LD_MAX_SIZE={upload.maximum_size} -Wl,--defsym=LD_MAX_DATA_SIZE={upload.maximum_data_size} -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--entry=Reset_Handler -Wl,--unresolved-symbols=report-all -Wl,--warn-common
40+ compiler.c.elf.flags=-mcpu={build.mcu} -mthumb {build.flags.optimize} {build.flags.ldspecs} -Wl,--defsym=LD_FLASH_OFFSET={build.flash_offset} -Wl,--defsym= LD_MAX_SIZE={upload.maximum_size} -Wl,--defsym=LD_MAX_DATA_SIZE={upload.maximum_data_size} -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--entry=Reset_Handler -Wl,--unresolved-symbols=report-all -Wl,--warn-common
4141
4242compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0
4343
@@ -50,6 +50,7 @@ compiler.define=-DARDUINO=
5050
5151# These can be overriden in boards.txt
5252build.extra_flags=
53+ build.bootloader_flags=
5354build.ldscript=ldscript.ld
5455
5556# These can be overridden in platform.local.txt
@@ -83,6 +84,7 @@ build.usb_speed=
8384build.startup_file=
8485build.flags.optimize=-Os
8586build.flags.ldspecs=--specs=nano.specs
87+ build.flash_offset=0
8688
8789# Pre and post build hooks
8890build.opt.name=build_opt.h
@@ -166,3 +168,14 @@ tools.bmp_upload.upload.speed=230400
166168tools.bmp_upload.upload.params.verbose=-batch
167169tools.bmp_upload.upload.params.quiet=--batch-silent
168170tools.bmp_upload.upload.pattern="{path}{cmd}" -nx -b {upload.speed} {upload.verbose} -ex "set confirm off" -ex "target extended-remote {serial.port}" -ex "monitor swdp_scan" -ex "attach 1" -ex "load" -ex "compare-sections" -ex "kill" "{build.path}/{build.project_name}.elf"
171+
172+ # Upload using Maple bootloader over DFU
173+ tools.maple_upload.cmd=maple_upload
174+ tools.maple_upload.cmd.windows=maple_upload.bat
175+ tools.maple_upload.path={runtime.hardware.path}/tools/win
176+ tools.maple_upload.path.macosx={runtime.hardware.path}/tools/macosx
177+ tools.maple_upload.path.linux={runtime.hardware.path}/tools/linux
178+ tools.maple_upload.path.linux64={runtime.hardware.path}/tools/linux64
179+ tools.maple_upload.upload.params.verbose=-d
180+ tools.maple_upload.upload.params.quiet=n
181+ tools.maple_upload.upload.pattern="{path}/{cmd}" {serial.port.file} {upload.altID} {upload.usbID} "{build.path}/{build.project_name}.bin"
0 commit comments