-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathplatform.txt
100 lines (79 loc) · 5.87 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
94
95
96
97
98
99
# Energia CC3200 EMT Core and platform.
# ------------------------------
#
# For more info:
# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5-3rd-party-Hardware-specification
name=Energia CC3200 EMT ARM (32-bits) Boards
version=3.7.0
# CC3200 compile variables
# ----------------------
compiler.warning_flags=-w
compiler.warning_flags.none=-w
compiler.warning_flags.default=
compiler.warning_flags.more=-Wall
compiler.warning_flags.all=-Wall -Wextra
compiler.path={runtime.tools.arm-none-eabi-gcc.path}/bin/
compiler.c.cmd=arm-none-eabi-gcc
compiler.c.flags=-c -g -Os {compiler.warning_flags} -ffunction-sections -fdata-sections
compiler.cpp.elf.cmd=arm-none-eabi-g++
compiler.c.elf.flags=-Os -Wl,--gc-sections
compiler.S.cmd=arm-none-eabi-gcc
compiler.S.flags=-c -g -x assembler-with-cpp
compiler.cpp.cmd=arm-none-eabi-g++
compiler.cpp.flags=-c -g -Os {compiler.warning_flags} -ffunction-sections -fdata-sections -fno-threadsafe-statics -fno-rtti -fno-exceptions
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.driverlib.c.flags="-I{build.system.path}/driverlib" "-I{build.system.path}/inc" "-I{build.system.path}"
compiler.emt.c.flags="-I{build.core.path}/ti/runtime/wiring/" "-I{build.core.path}/ti/runtime/wiring/cc3200" "-I{runtime.platform.path}"
# this can be overriden in boards.txt
build.extra_flags=-mcpu=cortex-m4 -march=armv7e-m -mthumb -mfloat-abi=soft -mabi=aapcs -Dxdc_target_types__=gnu/targets/arm/std.h -Dxdc_target_name__=M4F -Dxdc_cfg__xheader__="configPkg/package/cfg/energia_pm4g.h" -Dxdc__nolocalstring=1 -DBOARD_{build.board}
# These can be overridden in platform.local.txt
compiler.c.extra_flags={compiler.emt.c.flags} {compiler.driverlib.c.flags}
compiler.c.elf.extra_flags=-mthumb -mcpu=cortex-m4 -mfloat-abi=soft -mabi=aapcs
compiler.cpp.extra_flags={compiler.emt.c.flags} {compiler.driverlib.c.flags}
compiler.S.extra_flags=
compiler.ar.extra_flags=
compiler.elf2hex.extra_flags=
# 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"
# CC3200 compile patterns
# ---------------------
# TI's ino2ccp
build.ino2cpp.path={runtime.tools.ino2cpp.path}
build.ino2cpp.cmd.path={runtime.tools.ino2cpp.path}/ino2cpp.jar
recipe.hooks.sketch.prebuild.1.pattern="java" "-jar" "{build.ino2cpp.cmd.path}" -o "{build.path}/sketch/" -T "{build.ino2cpp.path}/templates/Variables.mk.template" -r "{build.ino2cpp.path}" -n {build.project_name} "{build.project_path}" cc3200emt:CC3200_LAUNCHXL"
## Compile c files
recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {build.extra_flags} {compiler.c.flags} -mcpu={build.mcu} -mthumb -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DENERGIA={runtime.ide.version} -DENERGIA_{build.board} -DENERGIA_ARCH_{build.arch} {compiler.c.extra_flags} {compiler.emt.c.flags} {compiler.driverlib.c.flags} {includes} "{source_file}" -o "{object_file}"
## Compile c++ files
recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {build.extra_flags} {compiler.cpp.flags} -mcpu={build.mcu} -mthumb -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DENERGIA={runtime.ide.version} -DENERGIA_{build.board} -DENERGIA_ARCH_{build.arch} {compiler.cpp.extra_flags} {compiler.emt.c.flags} {compiler.driverlib.c.flags} {includes} "{source_file}" -o "{object_file}"
## Compile S files
recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -mcpu={build.mcu} -mthumb -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DENERGIA={runtime.ide.version} -DENERGIA_{build.board} -DENERGIA_ARCH_{build.arch} {compiler.S.extra_flags} {compiler.emt.c.flags} {build.extra_flags} {compiler.driverlib.c.flags} {includes} "{source_file}" -o "{object_file}"
## Create archives
recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}"
## Combine gc-sections, archives, and objects
recipe.c.combine.pattern="{compiler.path}{compiler.cpp.elf.cmd}" -mcpu={build.mcu} -mthumb -nostartfiles {compiler.c.elf.flags} "-Wl,-u,main" "-Wl,-Map,{build.path}/{build.project_name}.map" {compiler.c.elf.extra_flags} -o "{build.path}/{build.project_name}.elf" {object_files} "-L{build.path}" "-L{build.core.path}" "-L{build.core.path}/ti/runtime/wiring/cc3200" "-L{build.core.path}/ti/runtime/wiring/cc3200/variants/{build.variant}" -Wl,--check-sections -Wl,--gc-sections "{build.path}/{archive_file}" "-Wl,-T{build.core.path}/{build.ldscript}" "-L{build.core.path}/gnu/targets/arm/libs/install-native/arm-none-eabi/lib/armv7e-m/softfp" "{build.system.path}/driverlib/gcc/exe/libdriver.a" -lstdc++ -lgcc -lc -lm -lnosys
## Create output (.bin file)
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"
## Save hex
recipe.output.tmp_file={build.project_name}.bin
recipe.output.save_file={build.project_name}.{build.variant}.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]+).*
# Energia's cc3200prog
tools.cc3200prog.upload.params.verbose=
tools.cc3200prog.upload.params.quiet=
tools.cc3200prog.path={runtime.tools.cc3200prog.path}
tools.cc3200prog.config.path={path}
tools.cc3200prog.cmd.path={path}/cc3200prog
tools.cc3200prog.upload.pattern={cmd.path} {serial.port} "{build.path}/{build.project_name}.bin"