Skip to content

Instantly share code, notes, and snippets.

@sgk
Last active August 1, 2017 22:53
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sgk/c6184ab40c08d67eb5359ea7d0e86a6f to your computer and use it in GitHub Desktop.
Save sgk/c6184ab40c08d67eb5359ea7d0e86a6f to your computer and use it in GitHub Desktop.
# Install the PXT for micro:bit target on Ubuntu 16.04
# https://github.com/Microsoft/pxt-microbit
Install the latest nodejs
$ wget https://nodejs.org/dist/v4.4.7/node-v4.4.7-linux-x64.tar.xz
$ tar xJf node-v4.4.7-linux-x64.tar.xz
$ mv node-v4.4.7-linux nodejs
$ PATH=~/nodejs/bin:$PATH
$ rm node-v4.4.7-linux-x64.tar.xz
Very basic requirements
$ sudo apt install make g++ git
PXT Core
$ git clone git@github.com:Microsoft/pxt.git pxt
$ cd pxt
$ npm install -g
$ npm link
$ cd ..
PXT target for micro:bit
$ git clone git@github.com:Microsoft/pxt-microbit.git microbit
$ cd microbit
$ npm link pxt-core
$ npm install
$ cd ..
Install Yotta for .cpp recompilation
$ sudo apt install python-setuptools cmake build-essential ninja-build python-dev libffi-dev libssl-dev
$ sudo easy_install pip
$ sudo pip install yotta
ARM compiler and S-Record tool
$ sudo apt install gcc-arm-none-eabi
$ sudo add-apt-repository ppa:pmiller-opensource/ppa
$ sudo apt install srecord
Development Cycle
$ cd pxt
$ jake
$ cd ../microbit
$ pxt buildtarget
$ pxt staticpkg "dir"
Run local server
$ pxt serve
Run local server with local yotta build
# This may fail on Ubuntu 14.04
$ pxt serve -yt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment