[136] | 1 |
|
---|
| 2 | # Arduino SAM Core and platform.
|
---|
| 3 | #
|
---|
| 4 | # For more info:
|
---|
| 5 | # https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification
|
---|
| 6 |
|
---|
| 7 | name=Arduino ARM (32-bits) Boards
|
---|
| 8 | version=1.7.0
|
---|
| 9 |
|
---|
| 10 | # SAMD compile variables
|
---|
| 11 | # ----------------------
|
---|
| 12 |
|
---|
| 13 | compiler.path={runtime.ide.path}/hardware/tools/gcc-arm-none-eabi-4.8.3-2014q1/bin/
|
---|
| 14 | compiler.c.cmd=arm-none-eabi-gcc
|
---|
[259] | 15 | compiler.c.flags=-c -g -Os -w -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -Dprintf=iprintf -MMD
|
---|
[136] | 16 | #-std=gnu99
|
---|
| 17 | compiler.c.elf.cmd=arm-none-eabi-g++
|
---|
| 18 | compiler.c.elf.flags=-Os -Wl,--gc-sections
|
---|
| 19 | compiler.S.flags=-c -g -x assembler-with-cpp
|
---|
| 20 | compiler.cpp.cmd=arm-none-eabi-g++
|
---|
[259] | 21 | compiler.cpp.flags=-c -g -Os -w -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -Dprintf=iprintf -MMD
|
---|
[136] | 22 | #-std=gnu++11
|
---|
| 23 | compiler.ar.cmd=arm-none-eabi-ar
|
---|
| 24 | compiler.ar.flags=rcs
|
---|
| 25 | compiler.objcopy.cmd=arm-none-eabi-objcopy
|
---|
| 26 | compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0
|
---|
| 27 | compiler.elf2hex.bin.flags=-O binary
|
---|
| 28 | compiler.elf2hex.flags=-O ihex -R .eeprom
|
---|
| 29 | compiler.elf2hex.cmd=arm-none-eabi-objcopy
|
---|
| 30 |
|
---|
| 31 | compiler.ldflags=
|
---|
| 32 | compiler.size.cmd=arm-none-eabi-size
|
---|
| 33 | compiler.define=-DARDUINO=
|
---|
| 34 | # this can be overriden in boards.txt
|
---|
| 35 | build.extra_flags=
|
---|
| 36 |
|
---|
| 37 |
|
---|
| 38 | compiler.arm.cmsis.path="-I{runtime.ide.path}/hardware/tools/CMSIS/CMSIS/Include/" "-I{runtime.ide.path}/hardware/tools/CMSIS/Device/ATMEL/"
|
---|
| 39 |
|
---|
| 40 | # USB Flags
|
---|
| 41 | # ---------
|
---|
| 42 | build.usb_flags=-DUSB_VID={build.vid} -DUSB_PID={build.pid} -DUSBCON '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}'
|
---|
| 43 |
|
---|
| 44 | # Default usb manufacturer will be replaced at compile time using
|
---|
| 45 | # numeric vendor ID if available or by board's specific value.
|
---|
| 46 | build.usb_manufacturer=
|
---|
| 47 |
|
---|
| 48 |
|
---|
| 49 | # SAMD compile patterns
|
---|
| 50 | # ---------------------
|
---|
| 51 |
|
---|
| 52 | ## Compile c files
|
---|
| 53 | recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -mcpu={build.mcu} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {build.extra_flags} {compiler.arm.cmsis.path} {includes} "{source_file}" -o "{object_file}"
|
---|
| 54 |
|
---|
| 55 | ## Compile c++ files
|
---|
| 56 | recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -mcpu={build.mcu} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {build.extra_flags} {compiler.arm.cmsis.path} {includes} "{source_file}" -o "{object_file}"
|
---|
| 57 |
|
---|
| 58 | ## Create archives
|
---|
| 59 | recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} "{build.path}/{archive_file}" "{object_file}"
|
---|
| 60 |
|
---|
| 61 | ## Combine gc-sections, archives, and objects
|
---|
| 62 | #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" -o "{build.path}/{build.project_name}.elf" --specs=nano.specs "-L{build.path}" -Wl,--start-group -lm -lgcc -Wl,--end-group -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--entry=Reset_Handler -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align -Wl,--warn-unresolved-symbols -Wl,--start-group {object_files} "{build.path}/{archive_file}" -Wl,--end-group
|
---|
| 63 | #recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.flags} -Wa,-a,-ad -mcpu={build.mcu} "-T{build.variant.path}/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" -o "{build.path}/{build.project_name}.elf" --specs=nano.specs "-L{build.path}" -Wl,--start-group -lm -lgcc -Wl,--end-group -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--entry=Reset_Handler -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align -Wl,--warn-unresolved-symbols -Wl,--start-group {object_files} "{build.path}/{archive_file}" -Wl,--end-group
|
---|
| 64 | #recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.flags} -save-temps -mcpu={build.mcu} "-T{build.variant.path}/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" -o "{build.path}/{build.project_name}.elf" --specs=nano.specs "-L{build.path}" -Wl,--start-group -lm -lgcc -Wl,--end-group -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--entry=Reset_Handler -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align -Wl,--warn-unresolved-symbols -Wl,--start-group {object_files} "{build.path}/{archive_file}" -Wl,--end-group
|
---|
| 65 | #recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.flags} -save-temps -mcpu={build.mcu} "-T{build.variant.path}/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" -o "{build.path}/{build.project_name}.elf" --specs=nano.specs "-L{build.path}" -Wl,--start-group -lm -lgcc -Wl,--end-group -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--entry=Reset_Handler -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align -Wl,--warn-unresolved-symbols -Wl,--start-group {object_files} "{build.path}/{archive_file}" -Wl,--end-group -Wl,--section-start=.text={build.section.start}
|
---|
| 66 |
|
---|
[259] | 67 | # alfran - fix GITHUB Issue: Arduino Zero Pro alignment problem #3
|
---|
[136] | 68 | recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.flags} -save-temps -mcpu={build.mcu} "-T{build.variant.path}/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" -o "{build.path}/{build.project_name}.elf" --specs=nano.specs "-L{build.path}" -Wl,--start-group -lm -lgcc -Wl,--end-group -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--entry=Reset_Handler -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align -Wl,--warn-unresolved-symbols -Wl,--start-group "{build.path}/syscalls.c.o" {object_files} "{build.path}/{archive_file}" -Wl,--end-group -Wl,--section-start=.text={build.section.start}
|
---|
| 69 |
|
---|
| 70 | ## Create eeprom
|
---|
| 71 | recipe.objcopy.eep.pattern=
|
---|
| 72 |
|
---|
| 73 | ## Create hex
|
---|
| 74 | recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex"
|
---|
| 75 |
|
---|
| 76 | ## Create bin
|
---|
| 77 | recipe.objcopy.bin.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.bin.flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin"
|
---|
| 78 |
|
---|
| 79 | ## Compute size
|
---|
| 80 | recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf"
|
---|
| 81 | recipe.size.regex=\.text\s+([0-9]+).*
|
---|
| 82 |
|
---|
| 83 |
|
---|
| 84 | # SAMD Uploader tools
|
---|
| 85 | # -------------------
|
---|
| 86 |
|
---|
| 87 | tools.openocd.cmd=bin/openocd
|
---|
| 88 | tools.openocd.cmd.windows=bin/openocd.exe
|
---|
| 89 | tools.openocd.path={runtime.ide.path}/hardware/tools/OpenOCD-0.9.0-arduino
|
---|
| 90 | tools.openocd.cmd.macosx=bin/openocd
|
---|
| 91 |
|
---|
| 92 | tools.openocd.upload.params.verbose=
|
---|
| 93 | tools.openocd.upload.params.quiet=
|
---|
| 94 | tools.openocd.upload.pattern="{path}/{cmd}" -s "{path}/share/openocd/scripts/" -f ../../../../../arduino/samd/variants/{build.variant}/{build.openocdscript} -c "program {{{build.path}/{build.project_name}.bin}} verify {build.section.start} reset exit"
|
---|
| 95 |
|
---|
| 96 | tools.openocd.erase.params.verbose=
|
---|
| 97 | tools.openocd.erase.params.quiet=
|
---|
| 98 | #tools.openocd.erase.pattern="{path}/{cmd}" -s "{path}/share/openocd/scripts/" -f ../../../../../arduino/samd/variants/{build.variant}/{build.openocdscript} -c "init" -c "halt" -c "{bootloader.cmd_unprotect}" -c "reset" -c "exit"
|
---|
| 99 | tools.openocd.erase.pattern=
|
---|
| 100 | tools.openocd.bootloader.params.verbose=
|
---|
| 101 | tools.openocd.bootloader.params.quiet=
|
---|
| 102 | #tools.openocd.bootloader.pattern="{path}/{cmd}" -s "{path}/share/openocd/scripts/" -f ../../../../../arduino/samd/variants/{build.variant}/{build.openocdscript} -c "init" -c "halt" -c "program {bootloader.file} verify" -c "{bootloader.cmd_protect}" -c "{bootloader.cmd_protect_verify}" -c "reset" -c "exit"
|
---|
| 103 | tools.openocd.bootloader.pattern="{path}/{cmd}" -s "{path}/share/openocd/scripts/" -f ../../../../../arduino/samd/variants/{build.variant}/{build.openocdscript} -c "init" -c "halt" -c "{bootloader.cmd_unprotect}" -c "program ../../../../../arduino/samd/bootloaders/{bootloader.file} verify" -c "{bootloader.cmd_protect}" -c "{bootloader.cmd_protect_verify}" -c "reset" -c "exit"
|
---|
| 104 | # AVR Uploader/Programmers tools
|
---|
| 105 | # ------------------------------
|
---|
| 106 |
|
---|
| 107 | tools.avrdude.cmd.path={runtime.ide.path}/hardware/tools/avr/bin/avrdude
|
---|
| 108 | tools.avrdude.config.path={runtime.ide.path}/hardware/tools/avr/etc/avrdude.conf
|
---|
| 109 |
|
---|
| 110 | tools.avrdude.upload.params.verbose=-v -v
|
---|
| 111 | tools.avrdude.upload.params.quiet=-q -q
|
---|
| 112 | #tools.avrdude.upload.pattern="{cmd.path}" "-C{config.path}" {upload.verbose} -p{build.emu.mcu} -c{upload.protocol} -P{serial.port} -b{upload.speed} -D "-Uflash:w:{build.path}/{build.project_name}.hex:i"
|
---|
| 113 | tools.avrdude.upload.pattern="{cmd.path}" "-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"
|
---|
| 114 |
|
---|
| 115 | #tools.avrdude.program.params.verbose=-v -v
|
---|
| 116 | #tools.avrdude.program.params.quiet=-q -q
|
---|
| 117 | #tools.avrdude.program.pattern="{cmd.path}" "-C{config.path}" {program.verbose} -p{build.emu.mcu} -c{protocol} {program.extra_params} "-Uflash:w:{build.path}/{build.project_name}.hex:i"
|
---|
| 118 |
|
---|
| 119 | #tools.avrdude.erase.params.verbose=-v -v -v -v
|
---|
| 120 | #tools.avrdude.erase.params.quiet=-q -q
|
---|
| 121 | #tools.avrdude.erase.pattern="{cmd.path}" "-C{config.path}" {erase.verbose} -p{build.emu.mcu} -c{protocol} {program.extra_params} -e -Ulock:w:{bootloader.unlock_bits}:m -Uefuse:w:{bootloader.extended_fuses}:m -Uhfuse:w:{bootloader.high_fuses}:m -Ulfuse:w:{bootloader.low_fuses}:m
|
---|
| 122 |
|
---|
| 123 | #tools.avrdude.bootloader.params.verbose=-v -v -v -v
|
---|
| 124 | #tools.avrdude.bootloader.params.quiet=-q -q
|
---|
| 125 | #tools.avrdude.bootloader.pattern="{cmd.path}" "-C{config.path}" {bootloader.verbose} -p{build.emu.mcu} -c{protocol} {program.extra_params} "-Uflash:w:{runtime.platform.path}/bootloaders/{bootloader.file}:i" -Ulock:w:{bootloader.lock_bits}:m
|
---|