-
Notifications
You must be signed in to change notification settings - Fork 13
/
platform.txt
93 lines (71 loc) · 4.47 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
# panStamp NRG Core and platform.
# ------------------------------
# For more info:
# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification
name=panStamp MSP430 boards
version=1.5.6
# NRG compile variables
# ---------------------
compiler.path={runtime.tools.msp430-gcc.path}/bin/
ldscript.path={runtime.platform.path}/ldscript/
# Default "compiler.path" is correct, change only if you want to overidde the initial value
compiler.c.cmd=msp430-gcc
compiler.c.flags=-c -g -Os -Wall -ffunction-sections -fdata-sections -MMD -Wno-unused-but-set-variable
compiler.c.elf.flags=-Os -Wl,--gc-sections,-u,main,-L "{ldscript.path}" -T {ldscript}.x
compiler.c.elf.cmd=msp430-gcc
compiler.S.flags=-c -g -assembler-with-cpp
compiler.cpp.cmd=msp430-g++
compiler.cpp.flags=-c -g -Os -Wall -ffunction-sections -fdata-sections -MMD -std=gnu++98 -fwrapv -fomit-frame-pointer -ggdb3 -fno-rtti -Wno-reorder
compiler.ar.cmd=msp430-ar
compiler.ar.flags=rcs
compiler.objcopy.cmd=msp430-objcopy
compiler.objcopy.eep.flags=-O ihex -R .eeprom
compiler.elf2hex.flags=-O ihex -R .eeprom
compiler.elf2hex.cmd=msp430-objcopy
compiler.ldflags=
compiler.size.cmd=msp430-size
# this can be overriden in boards.txt
# msp430 compile patterns
# --------------------
## Compile c files
recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -mmcu={build.mcu} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {includes} "{source_file}" -o "{object_file}"
## Compile c++ files
recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -mmcu={build.mcu} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {includes} "{source_file}" -o "{object_file}"
## Compile S files
recipe.S.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.S.flags} -mmcu={build.mcu} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {includes} "{source_file}" -o "{object_file}"
## Create archives
recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.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} -mmcu={build.mcu} -o "{build.path}/{build.project_name}.elf" {object_files} "{archive_file_path}" "-L{build.path}" -lm
## Create eeprom
recipe.objcopy.eep.pattern="{compiler.path}{compiler.objcopy.cmd}" {compiler.objcopy.eep.flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.eep"
## 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}.hex"
## Compute size
recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf"
recipe.size.regex=^(?:\.text|\.data|\.bootloader)\s+([0-9]+).*
recipe.size.regex.data=^(?:\.data|\.bss|\.noinit)\s+([0-9]+).*
recipe.size.regex.eeprom=^(?:\.eeprom)\s+([0-9]+).*
# msp430 Uploader/Programmers tools
# -----------------------------------
# GDB bootloader
tools.msp430-gdb.cmd.path={runtime.tools.msp430-gcc.path}/bin/msp430-gdb
tools.msp430-gdb.upload.params.verbose=
tools.msp430-gdb.upload.params.quiet=
#tools.msp430-gdb.upload.pattern={cmd.path} -b 38400 -ex 'target remote {serial.port}' -ex 'set debug remote 0' {build.path}/{build.project_name}.elf -ex 'erase' -ex 'load' -ex 'quit'
tools.msp430-gdb.upload.pattern=java -cp {runtime.tools.java-gdb.path}/ GdbLoader {cmd.path} {build.path}/{build.project_name}.elf {serial.port}
# FET430 programmer
tools.rf2500.upload.params.verbose=
tools.rf2500.upload.params.quiet=
tools.rf2500.cmd.path={runtime.ide.path}/hardware/tools/msp430/bin/mspdebug
tools.rf2500.upload.pattern={cmd.path} rf2500 'prog {build.path}/{build.project_name}.hex'
# TI's BSL
tools.ti-bsl.upload.params.verbose=--verbose-on
tools.ti-bsl.upload.params.quiet=--verbose-off
tools.ti-bsl.cmd.path={runtime.tools.java-bsl.path}/BsLoader.jar
tools.ti-bsl.upload.pattern=java -jar "{cmd.path}" "{build.path}/{build.project_name}.hex" "{serial.port}" "--verif-off" "{upload.verbose}"
# USB Default Flags
# Default blank usb manufacturer will be filled it at compile time
# - from numeric vendor ID, set to Unknown otherwise
build.usb_manufacturer=
build.usb_flags=-DUSB_VID={build.vid} -DUSB_PID={build.pid} '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}'