Installation¶
Automatic installation.¶
This software has its grounding on the founding principles of Yotta, the simplest install path would be to install their tools via their handy installer.
Docker¶
A docker image is available that contains toolchains used to build codal targets. A wrapper Dockerfile is available that can be used to build your project with ease.
Then follow the build steps listed below.
Manual installation¶
- Install
git
, ensure it is available on your platforms path. - Install the relevant compilation toolchain for your desired platform:
arm-none-eabi-*
command line utilities for ARM based devicesavr-gcc
,avr-binutils
,avr-libc
for AVR based devicesxtensa-esp32-*
for xtensa based devices.
- Install CMake(Cross platform make), this is the entirety of the build system.
- If on Windows, install ninja.
- Install
Python 2.7
(if you are unfamiliar with CMake), python scripts are used to simplify the build process. - Clone this repository
Building¶
- Generate or create a
codal.json
filepython build.py ls
lists all available targetspython build.py <target-name>
generates a codal.json file for a given target
-
In the root of this repository type
python build.py
the-c
option cleans before building.- If you are not using python:
- Windows:
- In the root of the repository make a build folder.
cd build
cmake .. -G "Ninja" -DCMAKE_BUILD_TYPE=RelWithDebInfo
ninja
- Mac:
- In the root of the repository make a build folder.
cd build
cmake .. -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=RelWithDebInfo
make
- Windows:
- If you are not using python:
-
The hex file will be placed at the location specified by
codal.json
, by default this is the root.