app
Adom USB - Teensy / i.MX RT persona pack
Public Unreviewedby John Lauer
Flash stub firmware to a Teensy 4.x / NXP i.MX RT to enumerate as keyboard, mouse, disk, serial, MIDI, or audio — the classic HID-injection / composite-device test platform.
← Commit history
plugin v0.1.0
8 files changed
+234−22
README.md+12−2@@ -1,3 +1,13 @@-# Teensy / NXP i.MX RT persona pack+# adom-usb-stub-teensy -Flash stub firmware to a Teensy 4.x / NXP i.MX RT to enumerate as keyboard, mouse, disk, serial, MIDI, or audio — the classic HID-injection / composite-device test platform.+**adom-usb firmware plugin.** Flash stub firmware to a Teensy 4.x / NXP i.MX RT to enumerate as keyboard, mouse, disk, serial, MIDI, or audio — the classic HID-injection / composite-device test platform.++```bash+adompkg install adom-usb-stub-teensy+```++adom-usb discovers it automatically. See the [adom-usb](https://wiki.adom.inc/john/adom-usb) wiki page for the plugin API.++---++*Hero image via [Wikimedia Commons](https://commons.wikimedia.org) (respective CC license).*
adom-usb-stub-teensyadded+28@@ -0,0 +1,28 @@+#!/usr/bin/env bash+# RP2040 USB persona stubs — adom-usb FIRMWARE device-test pack (API v1). Implements: manifest, personas, flash.+# REFERENCE TEMPLATE: drop your real firmware artifacts in firmware/<persona>.<ext> and wire+# the uf2-bootsel call below. Ships the flash CONTRACT; manufacturers ship the binaries.+set -euo pipefail; HERE="$(cd "$(dirname "$0")" && pwd)"+cmd="${1:-}"; shift || true+case "$cmd" in+ manifest) cat "$HERE/plugin.json";;+ personas) if command -v jq >/dev/null; then jq -c '.personas' "$HERE/plugin.json"; else grep -o '"personas".*' "$HERE/plugin.json"; fi;;+ flash)+ PERSONA="" VID="" PID="" BUSID="" TARGET=""+ while [ $# -gt 0 ]; do case "$1" in --persona)PERSONA="$2";shift 2;; --vid)VID="$2";shift 2;; --pid)PID="$2";shift 2;; --busid)BUSID="$2";shift 2;; --target)TARGET="$2";shift 2;; *)shift;; esac; done+ ART="$HERE/firmware/${PERSONA}.bin"; METHOD="uf2-bootsel"+ # The real flash call (chip-specific). Degrades to a dry-run when the tool/artifact is absent.+ case "$METHOD" in+ uf2-bootsel) RUN="picotool load $HERE/firmware/${PERSONA}.uf2 -f && picotool reboot";;+ dfu-util) RUN="dfu-util -a 0 -s 0x08000000:leave -D $ART";;+ esptool) RUN="esptool.py --chip auto write_flash 0x0 $ART";;+ nrfutil) RUN="nrfutil device program --firmware $ART";;+ openocd) RUN="openocd -f board/ti_sitara.cfg -c 'program $ART verify reset exit'";;+ bossac) RUN="bossac -e -w -v -R $ART";;+ wchisp) RUN="wchisp flash $ART";;+ *) RUN="<flash $ART via $METHOD>";;+ esac+ if [ -f "$ART" ] || [ -f "$HERE/firmware/${PERSONA}.uf2" ]; then eval "$RUN" >/dev/null 2>&1 && STATUS="flashed" || STATUS="flash-failed"; else STATUS="dry-run (no bundled artifact — template)"; fi+ printf '{"ok":true,"persona":"%s","method":"%s","status":"%s","command":"%s","summary":"%s: device will re-enumerate as the persona USB class — refresh adom-usb"}\n' "$PERSONA" "$METHOD" "$STATUS" "$RUN" "$PERSONA";;+ *) echo "usage: adom-usb-stub-rp2040 manifest | personas | flash --persona <id> --vid <hex> --pid <hex> --busid <b> --target <host>" >&2; exit 2;;+esac
install.shadded+6@@ -0,0 +1,6 @@+#!/bin/bash+set -euo pipefail+DIR="$(cd "$(dirname "$0")" && pwd)"; SLUG="adom-usb-stub-teensy"+PDIR="${HOME}/.adom/usb-plugins/${SLUG}"; mkdir -p "$PDIR" "${HOME}/.local/bin"+install -m 0644 "$DIR/plugin.json" "$PDIR/plugin.json"; install -m 0755 "$DIR/$SLUG" "$PDIR/$SLUG"+ln -sf "$PDIR/$SLUG" "${HOME}/.local/bin/$SLUG"; echo "Installed $SLUG"
package.jsonadded+103@@ -0,0 +1,103 @@+{+ "slug": "adom-usb-stub-teensy",+ "version": "0.1.0",+ "type": "app",+ "description": "Flash stub firmware to a Teensy 4.x / NXP i.MX RT to enumerate as keyboard, mouse, disk, serial, MIDI, or audio \u2014 the classic HID-injection / composite-device test platform.",+ "dependencies": {},+ "keywords": [+ "adom-usb-plugin",+ "firmware",+ "usb",+ "pjrc",+ "firmware",+ "usb-stub"+ ],+ "tags": [+ "adom-usb-plugin",+ "firmware",+ "usb",+ "pjrc",+ "firmware",+ "usb-stub"+ ],+ "license": "MIT",+ "scripts": {+ "install": "./install.sh",+ "uninstall": "./uninstall.sh"+ },+ "files": [+ "adom-usb-stub-teensy",+ "plugin.json",+ "install.sh",+ "uninstall.sh",+ "package.json",+ "README.md",+ "page.json",+ "screenshots/**",+ "skills/**"+ ],+ "adom_usb_plugin": {+ "api_version": "1",+ "kind": "firmware",+ "entrypoint": "adom-usb-stub-teensy",+ "vendor": "PJRC / NXP",+ "chips": [+ "imxrt1062",+ "mk20",+ "mk66"+ ],+ "matches": {+ "vid": [+ "16c0"+ ],+ "pid": [+ "*"+ ]+ },+ "flash_method": "teensy-loader",+ "personas": [+ {+ "id": "hid-keyboard",+ "name": "HID keyboard",+ "usb_class": "HID keyboard",+ "result_vid": "16c0",+ "result_pid": "0489"+ },+ {+ "id": "hid-mouse",+ "name": "HID mouse",+ "usb_class": "HID mouse",+ "result_vid": "16c0",+ "result_pid": "048a"+ },+ {+ "id": "msc-disk",+ "name": "Mass storage",+ "usb_class": "Mass storage",+ "result_vid": "16c0",+ "result_pid": "048b"+ },+ {+ "id": "cdc-serial",+ "name": "CDC serial",+ "usb_class": "CDC serial",+ "result_vid": "16c0",+ "result_pid": "0483"+ },+ {+ "id": "midi",+ "name": "USB-MIDI",+ "usb_class": "Audio/MIDI",+ "result_vid": "16c0",+ "result_pid": "048c"+ },+ {+ "id": "audio",+ "name": "USB Audio",+ "usb_class": "Audio",+ "result_vid": "16c0",+ "result_pid": "048d"+ }+ ]+ }+}
page.json+3−20@@ -1,9 +1,8 @@ {- "schema_version": 1, "type": "app", "slug": "adom-usb-stub-teensy", "title": "Teensy / NXP i.MX RT persona pack",- "brief": "Flash stub firmware to a Teensy 4.x / NXP i.MX RT to enumerate as keyboard, mouse, disk, serial, MIDI, or audio — the classic HID-injection / composite-device test platform.",+ "brief": "Flash stub firmware to a Teensy 4.x / NXP i.MX RT to enumerate as keyboard, mouse, disk, serial, MIDI, or audio \u2014 the classic HID-injection / composite-device test platform.", "version": "0.1.0", "visibility": "public", "hero": {@@ -11,10 +10,7 @@ "path": "screenshots/hero.png" }, "install": {- "binary_name": "adom-usb-stub-teensy",- "install_dir": "",- "install_hint": "",- "version_cmd": ""+ "binary_name": "adom-usb-stub-teensy" }, "metadata": { "version": "0.1.0",@@ -25,18 +21,5 @@ "firmware", "usb firmware" ]- },- "author": {- "id": "6738b00a4dc87b8adbb0a5a3",- "name": "John Lauer",- "email": "[email protected]"- },- "tags": [],- "license": "proprietary",- "sample_prompts": [],- "discovery_triggers": [],- "discovery_pitch": null,- "created_at": "2026-06-20T03:33:10.541Z",- "updated_at": "2026-06-20T03:33:10.541Z",- "skills": []+ } }
plugin.jsonadded+69@@ -0,0 +1,69 @@+{+ "slug": "adom-usb-stub-teensy",+ "name": "Teensy / NXP i.MX RT persona pack",+ "version": "0.1.0",+ "api_version": "1",+ "kind": "firmware",+ "entrypoint": "adom-usb-stub-teensy",+ "vendor": "PJRC / NXP",+ "chips": [+ "imxrt1062",+ "mk20",+ "mk66"+ ],+ "matches": {+ "vid": [+ "16c0"+ ],+ "pid": [+ "*"+ ]+ },+ "flash_method": "teensy-loader",+ "personas": [+ {+ "id": "hid-keyboard",+ "name": "HID keyboard",+ "usb_class": "HID keyboard",+ "result_vid": "16c0",+ "result_pid": "0489"+ },+ {+ "id": "hid-mouse",+ "name": "HID mouse",+ "usb_class": "HID mouse",+ "result_vid": "16c0",+ "result_pid": "048a"+ },+ {+ "id": "msc-disk",+ "name": "Mass storage",+ "usb_class": "Mass storage",+ "result_vid": "16c0",+ "result_pid": "048b"+ },+ {+ "id": "cdc-serial",+ "name": "CDC serial",+ "usb_class": "CDC serial",+ "result_vid": "16c0",+ "result_pid": "0483"+ },+ {+ "id": "midi",+ "name": "USB-MIDI",+ "usb_class": "Audio/MIDI",+ "result_vid": "16c0",+ "result_pid": "048c"+ },+ {+ "id": "audio",+ "name": "USB Audio",+ "usb_class": "Audio",+ "result_vid": "16c0",+ "result_pid": "048d"+ }+ ],+ "description": "Flash stub firmware to a Teensy 4.x / NXP i.MX RT to enumerate as keyboard, mouse, disk, serial, MIDI, or audio \u2014 the classic HID-injection / composite-device test platform.",+ "homepage": "https://wiki.adom.inc/john/adom-usb-stub-teensy"+}
skills/adom-usb-stub-teensy/SKILL.mdadded+11@@ -0,0 +1,11 @@+---+name: adom-usb-stub-teensy+description: >+ adom-usb firmware plugin. Flash stub firmware to a Teensy 4.x / NXP i.MX RT to enumerate as keyboard, mouse, disk, serial, MIDI, or audio — the classic HID-injection / composite-device test platform. Trigger words: adom-usb-stub-teensy, adom-usb plugin, usb firmware.+---++# adom-usb-stub-teensy++Flash stub firmware to a Teensy 4.x / NXP i.MX RT to enumerate as keyboard, mouse, disk, serial, MIDI, or audio — the classic HID-injection / composite-device test platform.++Install: `adompkg install adom-usb-stub-teensy`.
uninstall.shadded+2@@ -0,0 +1,2 @@+#!/bin/bash+rm -rf "${HOME}/.adom/usb-plugins/adom-usb-stub-teensy" "${HOME}/.local/bin/adom-usb-stub-teensy"; echo removed