-
Notifications
You must be signed in to change notification settings - Fork 3
/
platform.txt
91 lines (67 loc) · 4.53 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
# Arduino SAM Core and platform.
#
# For more info:
# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification
#atto
#name=Arduino ARM (32-bits) Boards
name=AttoDuino (32-bits) Boards
version=1.5.5
# SAM3 compile variables
# ----------------------
#atto - added specific path for Mac
#compiler.path={runtime.ide.path}/hardware/arduino/attoDuino/tools/lm4f-mac/bin/
compiler.c.cmd=arm-none-eabi-gcc
compiler.c.flags=-c -g -Os -w -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -Dprintf=iprintf
compiler.c.elf.cmd=arm-none-eabi-g++
compiler.c.elf.flags=-Os -Wl,--gc-sections
compiler.S.flags=-c -g -assembler-with-cpp
compiler.cpp.cmd=arm-none-eabi-g++
compiler.cpp.flags=-c -g -Os -w -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -Dprintf=iprintf
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=
# this can be overriden in boards.txt
build.extra_flags=
compiler.libsam.c.flags="-I{build.system.path}/libsam" "-I{build.system.path}/CMSIS/CMSIS/Include/" "-I{build.system.path}/CMSIS/Device/ATMEL/"
# 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"
# AttoDuino Compile Patterns
# --------------------------
#atto - note, c compiler is essentially identical to the compile CPP line
## Compile c files
#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.libsam.c.flags} {includes} "{source_file}" -o "{object_file}"
#atto (c, essentially identical to cpp line)
recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" -c -O0 -w -fno-rtti -fno-exceptions -ffunction-sections -fdata-sections -mthumb -mcpu={build.mcu} -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -DF_CPU={build.f_cpu} -DARM_FLOAT -MMD -DARDUINO={runtime.ide.version} -DENERGIA=13 {includes} "{source_file}" -o "{object_file}"
#atto (cpp)
recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" -c -O0 -w -fno-rtti -fno-exceptions -ffunction-sections -fdata-sections -mthumb -mcpu={build.mcu} -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -DARM_FLOAT -DF_CPU={build.f_cpu} -MMD -DARDUINO={runtime.ide.version} -DENERGIA=13 {includes} "{source_file}" -o "{object_file}"
## Create archives
recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} "{build.path}/{archive_file}" "{object_file}"
#atto linker script
recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" -O0 -nostartfiles -nostdlib -Wl,--gc-sections "-T{build.variant.path}/{build.ldscript}" -Wl,--entry=ResetISR -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -o "{build.path}/{build.project_name}.elf" {object_files} "{build.path}/{archive_file}" "-L{build.path}" -lm -lc -lgcc "-L{build.path}" -lm
## Create eeprom
recipe.objcopy.eep.pattern=
## Create hex
recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin"
## Compute size
recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf"
recipe.size.regex=\.text\s+([0-9]+).*
# AttoDuino Uploader Tools
# ------------------------
tools.sflashmac.cmd.path={runtime.ide.path}/hardware/arduino/attoDuino/tools/sflash-mac/sflash
tools.sflashwin.cmd.path={runtime.ide.path}/hardware/arduino/attoDuino/tools/sflash-win/sflash.exe
tools.sflashmac.upload.params.verbose=
tools.sflashwin.upload.params.verbose=
tools.sflashmac.upload.params.quiet=
tools.sflashwin.upload.params.quiet=
tools.sflashmac.upload.pattern="{cmd.path}" "{build.path}/{build.project_name}.bin" -p 0x2800 -c {serial.port} -b {upload.speed} -d -s 220
tools.sflashwin.upload.pattern="{cmd.path}" "{build.path}/{build.project_name}.bin" -p 0x2800 -c {serial.port} -b {upload.speed} -d -s 220