aboutsummaryrefslogtreecommitdiff
path: root/platform.txt
blob: 59e2d16fbadbd64641c3ade8cc5e9dbee5788996 (plain)
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
# AVR compile variables
# --------------------- 

name=Arduino
# Default "compiler.path" is correct, change only if you want to overidde the initial value
#compiler.path={ide.path}/tools/avr/bin/..
compiler.c.cmd=avr-gcc
compiler.c.flags=-c -g -Os -w -ffunction-sections -fdata-sections
compiler.c.elf.flags=-Os -Wl,--gc-sections
compiler.c.elf.cmd=avr-gcc
compiler.S.flags=-c -g -assembler-with-cpp
compiler.cpp.cmd=avr-g++
compiler.cpp.flags=-c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections
compiler.ar.cmd=avr-ar
compiler.ar.flags=rcs
compiler.objcopy.cmd=avr-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 ihex -R .eeprom
compiler.elf2hex.cmd=avr-objcopy
compiler.ldflags=
compiler.upload.cmd=
compiler.upload.flags=

# AVR 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} -D{software}={runtime.ide.version} {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} -D{software}={runtime.ide.version} {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}

## 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} {build.path}/{archive_file} -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


# AVR Uploader/Programmers tools
# -------------------

tools.avrdude.upload.cmd=avrdude
tools.avrdude.upload.path={runtime.ide.path}/hardware/tools
tools.avrdude.upload.config.path={upload.path}/avrdude.conf
tools.avrdude.upload.params.verbose=-v -v -v -v
tools.avrdude.upload.params.quiet=-q -q
tools.avrdude.upload.pattern={upload.path}/{upload.cmd} -C{upload.config.path} {upload.verbose} -p{build.mcu} -c{upload.protocol} -P{serial.port} -b{upload.speed} -D -Uflash:w:{build.path}/{build.project_name}.hex:i

# /home/megabug/git/ARM-merged/build/linux/work/hardware/tools/avrdude 
# -C/home/megabug/git/ARM-merged/build/linux/work/hardware/tools/avrdude.conf 
# -q -q 
# -patmega328p 
# -carduino 
# -P/dev/ttyACM0 
# -b115200 
# -D 
# -Uflash:w:/tmp/build366783256629686367.tmp/Blink.cpp.hex:i 

tools.avrdude.program.cmd=avrdude
tools.avrdude.program.path={runtime.ide.path}/hardware/tools
tools.avrdude.program.config.path={program.path}/avrdude.conf
tools.avrdude.program.params.verbose=-v -v -v -v
tools.avrdude.program.params.quiet=-q -q
tools.avrdude.program.pattern={program.path}/{program.cmd} -C{program.config.path} {program.verbose} -p{build.mcu} -c{protocol} {program.extra_params} -Uflash:w:{build.path}/{build.project_name}.hex:i

# /home/megabug/git/ARM-merged/build/linux/work/hardware/tools/avrdude
# -C/home/megabug/git/ARM-merged/build/linux/work/hardware/tools/avrdude.conf
# -q -q
# -patmega328p
# -cusbasp
# -Pusb
# -Uflash:w:/tmp/build8190214930979711138.tmp/Blink.cpp.hex:i