Skip to content

Commit e01dd70

Browse files
Update platform.txt
This copies platform.txt from Arduino git master verbatim, except the name and version are changed. Compared to the previous platform.txt, this adds -DARDUINO_{build.board} and -DARDUINO_ARCH_{build.arch} and adds a recipe for compiling .S files.
1 parent 13aeffe commit e01dd70

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

hardware/pinoccio/avr/platform.txt

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
1+
# Pinoccio AVR Core and platform.
2+
name=Pinoccio AVR boards
3+
version=1.0.0
24
# AVR compile variables
35
# ---------------------
46

5-
name=Arduino AVR Boards
67
# Default "compiler.path" is correct, change only if you want to overidde the initial value
78
#compiler.path={ide.path}/tools/avr/bin/..
89
compiler.c.cmd=avr-gcc
@@ -27,10 +28,13 @@ build.extra_flags=
2728
# --------------------
2829

2930
## Compile c files
30-
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} {build.extra_flags} {includes} "{source_file}" -o "{object_file}"
31+
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} {build.extra_flags} {includes} "{source_file}" -o "{object_file}"
3132

3233
## Compile c++ files
33-
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} {build.extra_flags} {includes} "{source_file}" -o "{object_file}"
34+
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} {build.extra_flags} {includes} "{source_file}" -o "{object_file}"
35+
36+
## Compile S files
37+
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} {build.extra_flags} {includes} "{source_file}" -o "{object_file}"
3438

3539
## Create archives
3640
recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} "{build.path}/{archive_file}" "{object_file}"
@@ -45,12 +49,14 @@ recipe.objcopy.eep.pattern="{compiler.path}{compiler.objcopy.cmd}" {compiler.obj
4549
recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex"
4650

4751
## Compute size
48-
recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.hex"
49-
recipe.size.regex=Total\s+([0-9]+).*
52+
recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf"
53+
recipe.size.regex=^(?:\.text|\.data|\.bootloader)\s+([0-9]+).*
54+
recipe.size.regex.data=^(?:\.data|\.bss|\.noinit)\s+([0-9]+).*
55+
recipe.size.regex.eeprom=^(?:\.eeprom)\s+([0-9]+).*
5056

5157

5258
# AVR Uploader/Programmers tools
53-
# -------------------
59+
# ------------------------------
5460

5561
tools.avrdude.cmd.path={runtime.ide.path}/hardware/tools/avr/bin/avrdude
5662
tools.avrdude.config.path={runtime.ide.path}/hardware/tools/avr/etc/avrdude.conf

0 commit comments

Comments
 (0)