Recent Changes - Search:

edit SideBar

Compiling Duktape 2.x for the Hail Board under TockOS

Duktape 2.x was released in early 2017, so we should use Duktape 2.x for the Hail board and TockOS instead of Duktape1.x

This page assumes that the Hail board has been updated with the latest TockOS. See Hail for details.

Repo

Check out my fork, build TockOS and an app

  1. Check out the branch
    git clone https://github.com/cxbrooks/tock.git
    cd tock
    git checkout cxbrooks/duktape4
  2. Build and install TockOS. Note that newer versions of tockloader do not need --port:
    cd boards/hail
    make TOCK_BOARD=hail program
  3. Build and install an example application:
    cd ../../userland/examples/accel-leds/
    make TOCK_BOARD=hail program
  4. Use tockloader list:
    bash-3.2$ tockloader list
    No serial port specified. Discovering attached serial devices...
    Using "/dev/cu.usbserial-00001014 - Hail IoT Module - TockOS - Hail IoT Module - TockOS"
    [App 0]
      Name:                  accel-leds
      Total Size in Flash:   4096 bytes

    bash-3.2$

Simple

See Duktape2 Simple for a simple JavaScript test

Toggle a LED

See Duktape2 Toggle LED

RampJSDisplay

See Duktape2 RampJSDisplay for a simple accessor

Update my fork

To update the https://github.com/cxbrooks/tock with recent changes in https://github.com/helena-project/tock:

  1. Configuring a remote for a fork
  2. Syncing a fork
git commit -m "Set SWARMLET flags to -DEDUK_MIN -Os for testing purposes." userland/examples/duktape/Makefile
git push
git remote add upstream https://github.com/helena-project/tock
git remote -v
git fetch upstream
git checkout master
git merge upstream/master

See Also

Edit - History - Print - Recent Changes - Search
Page last modified on January 22, 2017, at 04:14 PM