Skip to content

Building Dart SDK for Raspberry Pi 1

Zachary Anderson edited this page Jul 16, 2017 · 3 revisions

Introduction

These are instructions for building and running the Dart standalone VM for an ARMv6 Raspberry Pi 1 device running the Raspbian distribution of Linux. For the Raspberry Pi 2 and 3, there should normally be no need to build your own Dart SDK. Instead please try the pre-built Linux ARMv7 (Pi 2) and ARMv8 (Pi 3) builds distributed on www.dartlang.org here.

Building

Building the Dart VM for the Raspberry Pi 1 requires a toolchain that targets it. To get it, clone this repository.

To configure the build, run tools/gn.py specifying armv6 for the architecture, the path to the toolchain, and an option indicating that the toolchain supports the hardfp ABI. For Googlers, builds will be faster if Goma is disabled.

$ ./tools/gn.py -m release -a armv6 \
  -t armv6=/toolchain/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- \
  --arm-float-abi hard --no-goma

Then build as usual:

$ ./tools/ninja.py -m release -a armv6 create_sdk

You'll find the built SDK under out/ReleaseXARMV6/dart-sdk.

Run on Hardware

To run Dart programs on the Pi, upload this SDK to the device:

scp -r out/ReleaseXARM/dart-sdk pi@[raspberry pi ip address]:./dart-sdk

Then, you can add ~/dart-sdk/bin to your path, and use the SDK as usual.

Issues

This process is experimental, but please feel free to file an Issue with our tracker if you run into any problems.

You can’t perform that action at this time.