Skip to content
Snippets Groups Projects
Unverified Commit 4bdc7140 authored by Valtteri Koskivuori's avatar Valtteri Koskivuori
Browse files

trackpad-fw: Add README.md

Document the new automatic bootloader mode, and some other details as
well.
parent 3ea61179
No related branches found
No related tags found
No related merge requests found
# 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.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment