A Docker image and DockerFile are provided, which automate the steps of building the artifacts mentioned below. To make most efficient use of time, we suggest using the artifacts that were automatically built from the sources (both artifacts and sources included in the Docker image). Of course, the evaluators may want to build from sources themselves - a docker file (./Dockerfile
) and build step are provided in this case.
Docker commands:
pldi_ae_container.tar.gz
pldi_ae_container.tar.gz
was downloaded.docker load -i ./pldi_ae_container.tar.gz
Dockerfile
Dockerfile
was downloaded.docker build --platform linux/amd64 -t pldi_ae_container .
docker run --platform linux/amd64 -id --name=pldi-ae -t pldi_ae_container:latest
docker cp pldi-ae:/artifacts ./artifacts
docker exec -it pldi-ae bash
To purge the docker image if building from scratch or loading in a different version:
docker stop pldi-ae
docker rm pldi-ae
This evaluation is unusual for PLDI as it involves Jacdac hardware (now commercially available) for creating embedded/embeddable systems using a plug-and-play design.
You will need the following hardware to perform the evaluation:
A micro:bit V2 "Go Bundle" (https://www.sparkfun.com/products/17288) which includes:
KittenBot Kit A with micro:bit Jacdaptor (https://www.kittenbot.cc/products/kittenbot-jacdac-kit-for-micro-bit), which includes
a Jacdac accelerometer module, available in KittenBot Kit B or this one: https://microsoft.github.io/jacdac-docs/devices/microsoft-research/jmaccelerometer30v10/
We have flashed the micro:bit you have received with the "microbit-jukebox" app, a MakeCode application that demonstrates the plug-and-play capability of Jacdac; we will give instructions on how to build the application yourself as well.
NOTE: Figure 1(a) of the paper shows some Jacdac modules that are in Kit B from KittenBot (https://www.kittenbot.cc/products/jacdac-kit-b-elite-module-suite-redefining-electronic-interfacing), which we did not include in the hardware above. We included the hardware needed for the running example ``night light'' featured in the paper.
The evaluation consists of five parts:
There are optional steps to repeat the steps to build artifacts from sources.
OPTIONAL: Build the microbit-jukebox app from sources using the MakeCode CLI and copy over USB to micro:bit.
The built app (hex file to be copied to micro:bit) already is available in artifacts/microbit-jukebox.hex
to build yourself:
docker exec -it pldi-ae bash
cd /pxt-jacdac/tools/microbit-jukebox && makecode build
cp built/binary.hex /artifacts/microbit-jukebox.hex
exit
docker cp pldi-ae:/artifacts ./artifacts
copy artifacts/microbit-jukebox.hex to micro:bit drive (plugged into computer via USB cable)
Make sure to use a browser that supports WebUSB on your OS. Combinations we have tested:
attach micro:bit to computer via USB
press the connect button in the Jacdac web site (and see the various modules connected to the micro:bit (from step 1) displayed in the dashboard)
see that changes to hardware state are reflected in the digital twins
open device tree view (from wrench on upper left) and inspect devices and services on the Jacdac bus
OPTIONAL: building Jacdac web site from sources
The "night light" example uses the following hardware components:
Configure the hardware as shown in Figure 1(b); note that the order of the four modules is not important:
attach micro:bit via USB cable to computer
copy artifact/nightlight.hex to micro:bit drive
experiment as in paper
OPTIONAL build "night light" program from sources using MakeCode CLI
docker exec -it pldi-ae bash
cd /jacdacnitelite && makecode build
cp built/binary.hex /artifacts/nightlight.hex
exit docker
docker cp pldi-ae:/artifacts ./artifacts
OPTIONAL (Figure 3) load the project into https://makecode.microbit.org/ as follows
The generated tables are at artifacts/firmware-sizes.txt
OPTIONAL: build firmware from sources and run scripts
docker exec -it pldi-ae bash
cd /jacdac-msr-modules
make clean && make drop
./pldi24.sh >> /artifacts/firmware-sizes.txt
OPTIONAL: to see the size of the object files for the temp/humidity sensor described in Section 5.3.1:
docker exec -it pldi-ae bash
cd /jacdac-msr-modules
make TRG=targets/jm-v4.0/profile/temphum-202.c
make TRG=targets/jm-v4.0/profile/temphum-202.c st|grep FLASH| sort