Flash Firmware under OSX

Contributed by CHRISTIAN MEILINGER/MEICHR

Introduction

The router firmware and the button firmware are built and flashed each to its Merkur-Board using a Docker container according to the guide referenced on page opentrigger-board and a Merkur-Board-Programmer Module V2.

This tutorial describes the installation of the necessary software - programmer driver and Docker - under Mac OSX.

Driver installation

The Merkur-Board-Programmer Module V2 contains a SILABS’s CP2102 chip for USB-serial conversion.

The CP2102 OSX driver is available on the SILABS download page. Download it under section Download for Macintosh OSX (v4), unpack the zip file, double click the dmg image and then the pkg file and follow the steps in the dialog box to install the driver.

After installation, plug the programmer module into a USB port of your Mac. Now, two new devices should be available: /dev/tty.SLAB_USBtoUART and /dev/cu.SLAB_USBtoUART. Just for info: the first device is for an incoming connection and the second one works as an outgoing device (cu = calling unit).

Docker installation

Under OSX, only the legacy Docker Toolbox (using VirtualBox) supports flashing of the Merkur-Board, because the newer Docker for Mac, which is based on HyperKit for virtualization, doesn't yet support passing-through serial devices provided by the host (OSX) to the guest (docker under default vm).

Download and install Docker Toolbox according to this tutorial. The VirtualBox application including the default vm is automatically installed also.

To enable passing through the serial USB device to the VirtualBox default vm, the VirtualBox Extension Pack (same version as VirtualBox) needs to be downloaded from the VirtualBox download page and installed.

Open VirtualBox from the OSX Launchpad and power off the default vm, if running.

Connect the Merkurboard-Programmer to a USB port of your Mac, if not already done so.

Select Settings => Ports => USB, check Enable USB Controller and select USB 2.0 or 3.0. Under USB device filters click on the USB+ icon to the right, select Silicon Labs CP2102 USB to UART Bridge Controller [0100] and make sure its checkbox is checked in the list. Click on the OK button.

For testing the installation, provided that the Merkurboard-Programmer is plugged in, whenever the default vm is running, the devices /dev/tty.SLAB_USBtoUART and /dev/cu.SLAB_USBtoUART are removed from the OSX host and instead, the device /dev/ttyUSB0 is available in the default vm in the docker container.

Flashing the firmware

Properly connect the Merkurboard-Programmer module to the Router-Merkur-Board or Button-Merkur-Board to be flashed and plug the programmer into a USB port of your Mac.

Start Docker Quick Terminal from the OSX Launchpad. This also starts the default vm, if not running already.

All further steps shall be done in the docker terminal according to the guide referenced on the opentrigger-board page. The device /dev/ttyUSB0 will be available only after the docker command has run.

Last updated