Using dockerized Teensy Loader CLI makes it easier to rewrite programs to Teensy.
qmk/qmk_firmware is already dockerized. By using minodisk/teensy_loader together, all processes such as building .hex
, loading it into Teensy, and rebooting Teensy can be completed with Docker.
Motivation
I do not want to install various things on my local machine.
Premise
- qmk/qmk_firmware has been pulled
- Docker is already installed in your local machine
- In Linux (Docker for Mac or Win might be difficult or not be able to mount USB)
Demo
How to use
Step 1. Prepare YAML for Docker Compose
Add qmk_firmware/docker-compose.yml
:
version: '2'
services:
qmk_firmware:
build: .
environment:
keyboard: ergodox_ez
subproject:
keymap: <Your Keymap Name>
volumes:
- .:/qmk
- /qmk/.build
teensy_loader:
image: minodisk/teensy_loader:0.0.1
depends_on:
- qmk_firmware
privileged: true
environment:
hex: ergodox_ez_<Your Keymap Name>
volumes:
- /dev/bus/usb:/dev/bus/usb
volumes_from:
- qmk_firmware
Step 2. Build and up
docker-compose build
docker-compose up
Step 3. Press reset button
When the terminal outputs Waiting for Teensy device...
, press the reset button on Teensy.
How to work
- In
teensy_loader
container, waits for the.hex
to be generated on the volume shared with theqmk_firmaware
container - In
qmk_firmware
container, builds.hex
- In
teensy_loader
container, finds.hex
on the volume shared with theqmk_firmware
container and runsteensy_loader_cli
with wait option - In real world, you press reset button on Teensy (if it maps to a key, press that key)
- In
teensy_loader
container,teensy_loader_cli
writes.hex
to Teensy and reboots it
Top comments (0)