reform

MNT Reform: Open Source Portable Computer
Log (Feed) | Files | Refs (Tags) | README

commit 4bdc71407e74dd094b6143cf3dc7031a9a6a88e2
parent 3ea6117979e686d6098e6f0f393ea3b4d2075747
Author: Valtteri Koskivuori <vkoskiv@gmail.com>
Date:   Fri, 20 Oct 2023 20:52:52 +0300

trackpad-fw: Add README.md

Document the new automatic bootloader mode, and some other details as
well.

Diffstat:
Areform2-trackpad-fw/README.md | 37+++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+), 0 deletions(-)

diff --git a/reform2-trackpad-fw/README.md b/reform2-trackpad-fw/README.md @@ -0,0 +1,37 @@ +# MNT Reform 2.0 Touchpad Firmware + +## Code Structure + +- `Mouse.c`: Sensor gesture processing + USB HID report generation +- `azoteq.{c,h}`: Azoteq sensor registers in structs for easy access +- `Descriptors.c`: USB HID descriptors + +### Debian/Ubuntu + +`apt install gcc-avr avr-libc dfu-programmer` + +### Mac + +*TODO: is this correct?* + +``` +brew tap osx-cross/avr +brew install avr-gcc +brew install dfu-programmer +``` + +## Building + +Build the firmware by running `make`. The firmware can then be found in +Mouse.hex. + +# Analysis + +After building, you can load `Mouse.elf` in `gdb`, and inspect the generated code. +Try `disas main`, for example. + +To flash, run: +`sudo ./flash.sh` + +The script sends the 'xJTBL' command to the trackpad to send it into bootloader mode, and then flashes the new firmware. +The trackpad should reset briefly after flashing, and start running the new firmware.