forked from chipKIT32/chipKIT32-MAX
-
Notifications
You must be signed in to change notification settings - Fork 0
/
platform.txt
81 lines (72 loc) · 5.58 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
########################################################
name=chipKIT
version=1.6.0
compiler.c.cmd=pic32-gcc
compiler.path={runtime.hardware.path}/pic32/compiler/pic32-tools/bin/
# Use a high -Gnum for devices that have less than 64K of data memory
# For -G1024, objects 1024 bytes or smaller will be accessed by
# gp-relative addressing
compiler.c.flags=-O2 -c -mno-smart-io -w -ffunction-sections -fdata-sections -G1024 -g -mdebugger -Wcast-align -fno-short-double -ftoplevel-reorder
compiler.c.extra_flags=-MMD
compiler.cpp.cmd=pic32-g++
compiler.cpp.flags=-O2 -c -mno-smart-io -w -fno-exceptions -ffunction-sections -fdata-sections -G1024 -g -mdebugger -Wcast-align -fno-short-double -ftoplevel-reorder
compiler.cpp.extra_flags=-MMD
compiler.S.flags=-O2 -g1 -c -Wa,--gdwarf-2
compiler.ar.cmd=pic32-ar
compiler.ar.flags=rcs
compiler.ar.extra_flags=
compiler.objcopy.cmd=pic32-objcopy
compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0
compiler.objcopy.eep.extra_flags=
compiler.elf2hex.cmd=pic32-bin2hex
compiler.elf2hex.flags=-a
compiler.elf2hex.extra_flags=
compiler.c.elf.cmd=pic32-g++
compiler.c.elf.flags=-Os -Wl,-M={build.path}/sketch.map --gc-sections -mdebugger -mno-peripheral-libs -nostartfiles
compiler.c.elf.extra_flags=
compiler.size.cmd=pic32-size
compiler.cpudef=-mprocessor=
compiler.ldscript=chipKIT-BL.ld
compiler.upload.cmd=
compiler.includepath={0}/hardware/pic32/compiler/pic32-tools/pic32mx/include
compiler.upload.flags=
library.core.path=./hardware/pic32/cores/pic32
library.path=./hardware/pic32/libraries
ldscript=chipKIT-BL-mega.ld
ldcommon=chipKIT-application-COMMON.ld
compiler.define= -DMPIDEVER=16777998 -DMPIDE=150 -DIDE=Arduino
build.ldscript.path={build.core.path}
build.variant=Default_100
build.extra_flags=
core.header=WProgram.h
##############################################################
recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -I{build.path} -mprocessor={build.mcu} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -D_{build.board} {compiler.define} {compiler.c.extra_flags} {build.extra_flags} {includes} "{source_file}" -o "{object_file}"
recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -I{build.path} -mprocessor={build.mcu} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -D_{build.board} {compiler.define} "{compiler.cpp.extra_flags}" {build.extra_flags} {includes} "{source_file}" -o "{object_file}"
#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} {compiler.cpp.extra_flags} {build.extra_flags} {includes} "{source_file}" -o "{object_file}"
recipe.S.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.S.flags} -mprocessor={build.mcu} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -D_{build.board} {compiler.define} "{compiler.cpp.extra_flags}" {build.extra_flags} {includes} "{source_file}" -o "{object_file}"
recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{build.path}/{archive_file}" "{object_file}"
#recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{build.path}/{archive_file}" "{object_file}"
recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.flags} -mprocessor={build.mcu} {compiler.c.elf.extra_flags} -o "{build.path}/{build.project_name}.elf" {object_files} "{build.path}/{archive_file}" -L{build.path} -lm -T "{build.ldscript.path}/{ldscript}" -T "{build.core.path}/{ldcommon}"
#recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.flags} -mmcu={build.mcu} {compiler.c.elf.extra_flags} -o "{build.path}/{build.project_name}.elf" {object_files} "{build.path}/{archive_file}" "-L{build.path}" -lm
recipe.objcopy.eep.pattern="{compiler.path}{compiler.objcopy.cmd}" {compiler.objcopy.eep.flags} {compiler.objcopy.eep.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.eep"
#{0}{1} {2} {3}.elf {4}.eep
#recipe.objcopy.eep.pattern="{compiler.path}{compiler.objcopy.cmd}" {compiler.objcopy.eep.flags} {compiler.objcopy.eep.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.eep"
recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf"
#{0}{1} {2} {3}.elf
#recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf"
#########
## Compute size
recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf"
recipe.size.regex=^(?:\.reset|\.image_ptr_table|\.app_excpt|\.vector\S*|\.startup|\.init|\.fini|\.ctors|\.dtors|\.header_info|\.dinit|\.text\S*|\.rodata\S*|\.data)\s+([0-9]+).*
recipe.size.regex.data=^(?:\.ram_exchange_data|\.dbg_data|\.sdata|\.sbss|\.data\S*|\.stack|\.bss|\.comment.__use_force_isr_install|\.eh_frame|\.jcr)\s+([0-9]+).*
#recipe.size.regex.eeprom=^(?:\.eeprom)\s+([0-9]+).*
# pic32prog loader
# https://code.google.com/p/pic32prog/
# ----------
upload.tool=pic32prog
tools.pic32prog.cmd=pic32prog
tools.pic32prog.cmd.windows=pic32prog.exe
tools.pic32prog.path={runtime.hardware.path}/pic32/tools/bin
tools.pic32prog.upload.params.verbose=
tools.pic32prog.upload.params.quiet=
tools.pic32prog.upload.pattern="{path}/{cmd}" {upload.verbose} -d "{serial.port}" -b {upload.speed} "{build.path}/{build.project_name}.hex"