-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Arduino IDE 1.5 3rd party Hardware specification
WARNING
This specification is a proposal of a new 3rd party Hardware format to be used in Arduino IDE starting from 1.5 series.
The correct implementation of this specification allows a 3rd party vendor/maintainer to add support for his boards to the Arduino IDE just by unzipping a file into the hardware folder of Arduino. It should be possible also to make a singlefile-hardware-addon that means adding a new 3rd party board(s) to Arduino IDE by providing just one configuration file.
New hardware folders are structured in two levels: the first level is the vendor/mantainer name; the second level is the architecture supported.
In the example below we have three hardware vendors called respectively "arduino", "yyyyy" and "xxxxx":
hardware/arduino/avr/...
hardware/arduino/sam/...
hardware/yyyyy/avr/...
hardware/xxxxx/avr/...
as already said, each vendor folder contains a second level of folders that are the architectures supported: in the example above the vendor "arduino" has two supported architecures (avr and sam), while "xxxxx" and "yyyyy" have only avr.
Each architecture of each vendor must be configured through a set of configuration files:
boards.txt - Definitions of the boards (board's metadata, parameters for building and uploading sketches, etc.)
platform.txt - Definitions for the CPU architecture used on the boards (compiler, build process parameters, tools used for upload, etc.)
programmers.txt - Definitions for external programmers (typically used to burn bootloaders on a blank CPU/board)
Let's see the contents of these file one by one.
This file configure the compile process performed by the Arduino IDE through a list of recipes that specify how to call the compiler and which parameter should be passed to it.
TODO The recipes are defined for each type of file to be compiled (C, C++) through the variables:
recipe.c.o.pattern
recipe.cpp.o.pattern
recipe.ar.pattern
recipe.c.combine.pattern
recipe.objcopy.eep.pattern
recipe.objcopy.hex.pattern
recipe.size.pattern
recipe.size.regex
The configuration files are a list of "variable=value" properties. The value of every variable can be expressed using the value of another variable by putting his name inside brackets "{" "}". For example:
compiler.path=/tools/g++_arm_none_eabi/bin/
compiler.c.cmd=arm-none-eabi-gcc
[....]
recipe.c.o.pattern={compiler.path}{compiler.c.cmd}
in this example the variable recipe.c.o.pattern will be set to /tools/g++_arm_none_eabi/bin/arm-none-eabi-gcc that is the composition of the two variables compiler.path and compiler.c.cmd.
The Arduino IDE sets the following variables that can be used in all configurations files:
runtime.hardware.path - the absolute path to the hardware folder
runtime.ide.path - the absolute path to the Arduino IDE folder
runtime.ide.version - the version number of the Arduino IDE as a number (for example "152" for Arduino IDE 1.5.2)
runtime.os - the running OS ("linux", "windows", "macosx")
We can specify an OS-specific value for a variable. For example the following snippet:
tools.bossac.cmd=bossac
tools.bossac.cmd.windows=bossac.exe
will set the variable tools.bossac.cmd to the value bossac on linux and macos and bossac.exe on windows.