coelacant1
New member
Hello everyone,
Just wanted to share here. I made a version of the Teensy Loader built in Javascript for project maintainers to be able to host their firmware and have users update through the browser.
I have a Github page here with an action for deploying a test page: https://github.com/coelacant1/Teensy-Loader-Javascript
You can view the test page here: https://coelacant1.github.io/Teensy-Loader-Javascript/Teensy-Loader-Example.html
I tried to port the main functionality from the CLI over. I only have Teensy 4.0s and 4.1s to test, so no guarantees on older versions.
Here is a screencap of the example webpage:
I built this as a means for users to be able to upload my firmware builds from my Github deployment for ProtoTracer (3D rendering engine on Teensy's): https://coelacant.com/ProtoTracer/FirmwareUpload.html
Just wanted to share here. I made a version of the Teensy Loader built in Javascript for project maintainers to be able to host their firmware and have users update through the browser.
I have a Github page here with an action for deploying a test page: https://github.com/coelacant1/Teensy-Loader-Javascript
You can view the test page here: https://coelacant1.github.io/Teensy-Loader-Javascript/Teensy-Loader-Example.html
I tried to port the main functionality from the CLI over. I only have Teensy 4.0s and 4.1s to test, so no guarantees on older versions.
- Local Firmware Loading:
- Reads .hex (Intel HEX) or .bin files from the user’s computer via a <input type="file">, converting them into 1KB blocks.
- Intel HEX Parsing:
- Processes .hex lines, checks checksums, and maps them into memory blocks (accounting for offset addresses).
- WebHID Flashing:
- Communicates with Teensy boards via the WebHID API to send firmware blocks.
- Skips blocks that are all 0xFF except the first, to reduce unnecessary writes.
- Sends “magic bytes” at the end to finalize the flashing.
- Serial Communication:
- Opens a browser Serial Port.
- Reads lines of text, delivering them to a callback for logging or display.
- Closes the port.
Here is a screencap of the example webpage:
I built this as a means for users to be able to upload my firmware builds from my Github deployment for ProtoTracer (3D rendering engine on Teensy's): https://coelacant.com/ProtoTracer/FirmwareUpload.html