-
Notifications
You must be signed in to change notification settings - Fork 36
Building
-
Install depot_tools (to get
gclient
,git cl
, andninja
). -
Install
g++-multilib
(sudo apt-get g++-multilib
) as Dartino requires 32-bit binaries. -
Set up GitHub ssh keys on your system (if you plan to contribute).
Start by cloning the repo. We recommend you use fetch
.
mkdir dartino-repo
cd dartino-repo
fetch dartino
cd sdk
Note: This will pull down a few gigabytes of data, so it will take quite some
time, and there is no progress indicator. Alternatively you can run fetch --nohooks dartino
for a fast clone, but you then manually have to run gclient sync
to get the dependencies pulled down afterwards.
Next, configure git. Use one of three possible options:
- You're a committer in the Dartino project org, run:
git remote set-url origin [email protected]:dartino/sdk.git
- You're planning to contribute to Dartino. In that case use, fork it on GitHub and run:
git remote set-url origin <URL>
where <URL>
is the SSH clone URL from GitHub.
- You just want to checkout Dartino and build it:
you are done already
To update your checkout run:
git pull
gclient sync
Git pull will update the Dartino sources, while gclient sync will update all of our dependencies. If you have conflicts, you can use
git mergetool
After getting the sources, build Dartino by running:
ninja -C out/DebugIA32Clang
After getting the sources, build Dartino by running:
ninja -C out/DebugXARM
For Ubuntu 14.04.1 LTS (Trusty Tahr), you need to install the following packages to be able to cross-compile:
-
linux-libc-dev:i386
1 gcc-4.8-arm-linux-gnueabihf
g++-4.8-arm-linux-gnueabihf
Install them by running:
sudo dpkg --add-architecture i386 && sudo apt-get update
sudo apt-get install linux-libc-dev:i386 gcc-4.8-arm-linux-gnueabihf g++-4.8-arm-linux-gnueabihf
A few STM boards are supported right from the build system. They all require both a 32-bit and 64-bit host builds.
ninja -C out/ReleaseIA32
ninja -C out/ReleaseX64
To build the test application for the STM32F764G Discovery board:
ninja -C out/DebugSTM disco_dartino
To build the test application for the STM32F411RE Nucleo board:
ninja -C out/DebugCM4 nucleo_dartino
The build system can also flash the build image by adding _flash
to the
target, e.g.:
ninja -C out/DebugSTM disco_dartino_flash
After building Dartino, you can test Dartino by running:
tools/test.py
Qemu requires libftd1 to run.
sudo apt-get install libfdt1
If you plan on contributing to Dartino, we encourage you to fork the repository on GitHub.
Dartino uses the Chromium gclient
tool for managing dependencies and the ninja build system for building. It only works on Mac and Linux at the moment.
1: When installing gcc-4.8-arm-linux-gnueabihf and g++-4.8-arm-linux-gnueabihf on Ubuntu, apt-get will uninstall gcc-multilib and g++-multilib. Unfortunately, this breaks cross-compiling IA32 on X64, so one needs to install the header files for IA32 (i386).