Customs The Arduino IDE
Customs The Arduino IDE
Arduino IDE
• Arduino 1.0.5
• Arduino 1.5.x
• Arduino 1.6.x
Arduino 1.0.5
• The Arduino IDE (at least since 1.05) has the wonderful
capability of being customizable for new types of hardware.
You can add code that supports pin/port assignments or even
new kinds of processors (such as the xmega) by re-writing
the core libraries and headers and placing them into new
directories within the Arduino environment directories.
Arduino 1.0.5
• boards.txt
• The most important single file is the 'boards.txt' file, located in the
following directory:
• {ARDUINO}/hardware/arduino/boards.txt
• where '{ARDUINO}' represents the directory into which the Arduino
IDE and supporting files have been installed. This may be
'/usr/local/arduino' or '/usr/share/arduino' or one of many OTHER
possible choices depending on your operating system.
ARDUINO 1.0.5
ARDUINO 1.0.5
• Custom Libraries
• Sometimes you will need to customize a standard library for your own
use. Unfortunately this may be due to the fact that, all too often, the
libraries don't support your hardware properly, and/or do NOT have the
common decency to mark members as 'protected' rather than 'private'
(forcing you to edit the library or clone it, rather than creating a derived
class). Fortunately, the Arduino IDE allows you to put your own libraries
into a user-specific location:
• {SKETCHBOOK}/libraries
• Where '{SKETCHBOOK}' is the location of your default sketchbook
repository (as specified in 'preferences').
ARDUINO 1.0.5
• Custom Libraries
• The Arduino IDE will look in {SKETCHBOOK}/libraries for matching
library names when you '#include' a header file in the main 'INO' (or
PDE) file. So you will always need to specify the header file in the main
'INO' file so that the Arduino IDE can locate it (along with any source
files).
• Architecture configurations
Each architecture must be configured through a set of
configuration files:
• platform.txt contains definitions for the CPU architecture used
(compiler, build process parameters, tools used for upload, etc.)
• Comments
Lines starting with # are treated as comments and will be
ignored
• platform.txt
The platform.txt file contains information about a platform's specific aspects
(compilers command line flags, paths, system libraries, etc.).
• The name will be shown in the Boards menu of the Arduino IDE.
• The version is currently unused, it is reserved for future use (probably
together with the libraries manager to handle dependencies on cores).
Arduino 1.5.x
• platform.txt
The platform.txt file contains information about a platform's specific aspects
(compilers command line flags, paths, system libraries, etc.).
• The name will be shown in the Boards menu of the Arduino IDE.
• The version is currently unused, it is reserved for future use (probably
together with the libraries manager to handle dependencies on cores).
Arduino 1.5.x
boards.txt
boards.txt
• For example the board ID chosen for the Arduino Uno board is
"uno". An extract of the Uno board configuration (in boards.txt file)
looks like:
[......]
uno.name=Arduino Uno
uno.build.mcu=atmega328p
uno.build.f_cpu=16000000L
uno.build.board=AVR_UNO
uno.build.core=arduino
uno.build.variant=standard
[......]
Arduino 1.5.x
boards.txt
• Note that all the relevant keys start with the board
ID uno.xxxxx.
• The uno.name property contains the name of the board
shown in the Boards menu of the Arduino IDE.
• The uno.build.board property is used to set a compile-time
variableARDUINO_{build.board} to allow use of
conditional code between #ifdefs.
• The Arduino IDE automatically generate a build.board value
if not defined. In this case the variable defined at compile
time will be ARDUINO_AVR_UNO.
Arduino 1.5.x
boards.txt
boards.txt
boards.txt
• [.....]
• ## Arduino Duemilanove w/ ATmega328
• duemilanove.menu.cpu.atmega328=ATmega328
• duemilanove.menu.cpu.atmega328.upload.maximum_size=30720
• duemilanove.menu.cpu.atmega328.upload.speed=57600
• duemilanove.menu.cpu.atmega328.build.mcu=atmega328p
• 1.6.3
• The new Board Manager solves those issues. We had figured
out a way to add custom boards in v1.6.3 of the Arduino IDE,
but it was not officially supported by Arduino. Thanks to the
hard work of Federico Fissore and the Arduino developer
community, we can now add new boards just as easily using
officially supported methods. Let's get started.
Arduino 1.6.x
• 1.6.4
• Version 1.6.4 of the Arduino IDE introduced official support
for adding third party boards (like the Adafruit Flora and
Trinket) to the new Board Manager. This addition is great
news, because it allows users to quickly add new boards with
the click of a button. Previously the addition of new boards
required a cumbersome manual installation process, or in
certain cases, the download of a completely separate version
of the IDE with the new boards added.
Arduino 1.6.x
• https://
github.com/arduino/Arduino/wiki/Unofficial-list-of-3rd-party-b
oards-support-urls