-
Notifications
You must be signed in to change notification settings - Fork 45
Using external cores with the 1.6.7 architecture
After introducing the 1.6.7 version of the compiler, we can no longer change the include paths used during the compilation because the Arduino-builder uses predefined include paths and tools for each architecture and each variant.
In order for the Arduino-builder to access any core files other than the default ones, the extra files need to be placed in the v167/hardware directory.
At the time of writing this document, three external cores have been used with the 1.6.7 compiler, each of which has to be added in a specific directory. Below you can see the desired structure as it's used in the development version of the compiler, used for compiling chibitronics, microchip chipKit and esp8266 projects.
/path/to/arduino-core-files/v167/hardware$ tree -L 4 chibitronics/
chibitronics/
└── hardware
└── esplanade
└── 1.6.0
├── boards.txt
├── cores
├── platform.txt
├── programmers.txt
└── variants
5 directories, 3 files
/path/to/arduino-core-files/v167/hardware$ tree -L 2 chipKIT
chipKIT
└── pic32
├── boards.txt
├── bootloaders.txt
├── compiler
├── cores
├── libraries
├── platformManual.txt
├── platforms.txt
├── platform.txt
├── platformURL.txt
├── tools
├── unsupported_boards.txt
└── variants
6 directories, 7 files
/path/to/arduino-core-files/v167/hardware$ tree -L 2 esp8266/
esp8266/
└── esp8266
├── boards.txt
├── bootloaders
├── cores
├── doc
├── ISSUE_TEMPLATE.md
├── libraries
├── LICENSE
├── package
├── platform.txt
├── programmers.txt
├── README.md
├── tests
├── tools
└── variants
9 directories, 6 files
Follow the steps below in order to end up with this structure.
The core just needs to be cloned in the /v167/hardware
directory.
$ cd /path/to/arduino-core-files/v167/hardware
$ git clone https://github.com/xobs/arduino-esplanade.git chibitronics
The fqbn used for the chibitronics esplanade board is chibitronics:esplanade:code
.
For the chipKit core, the respective Github release has been used, but a couple hacks are also necessary in order to use the core. The compiler binary used for chipKit projects is a 32-bit binary file and some extra libraries need to be added to the system in order for the compiler to be executed. Furthermore, a config property is missing from the chipKit board definition and had to be manually added.
$ wget -q https://chipkit.s3.amazonaws.com/chipkit-core/builds/linux64/chipkit-core-linux64.16778040.master-v1.2.0-4-g3088e62.zip
$ unzip -qq chipkit-core-linux64.16778040.master-v1.2.0-4-g3088e62.zip && rm chipkit-core-linux64.16778040.master-v1.2.0-4-g3088e62.zip
$ mv chipkit-core chipKIT
# 32-bit binaries compatibility on 64-bit archs
$ sudo apt-get update && sudo apt-get -y install lib32z1 lib32ncurses5 lib32bz2-1.0
The open the chipKIT/pic32/platform.txt
. In the ## Save hex
section add the following
recipe.output.tmp_file={build.project_name}.hex
In order to use the esp8266 core, the core files and compilation tools need to be downloaded separately. Also, the boards.txt section referring to the Huzzah Feather needs to be modified.