reform

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

README.md (878B)


      1 # MNT Reform 2.0 Touchpad Firmware
      2 
      3 ## Code Structure
      4 
      5 - `Mouse.c`: Sensor gesture processing + USB HID report generation
      6 - `azoteq.{c,h}`: Azoteq sensor registers in structs for easy access
      7 - `Descriptors.c`: USB HID descriptors
      8 
      9 ### Debian/Ubuntu
     10 
     11 `apt install gcc-avr avr-libc dfu-programmer`
     12 
     13 ### Mac
     14 
     15 *TODO: is this correct?*
     16 
     17 ```
     18 brew tap osx-cross/avr
     19 brew install avr-gcc
     20 brew install dfu-programmer
     21 ```
     22 
     23 ## Building
     24 
     25 Build the firmware by running `make`. The firmware can then be found in
     26 Mouse.hex.
     27 
     28 # Analysis
     29 
     30 After building, you can load `Mouse.elf` in `gdb`, and inspect the generated code.
     31 Try `disas main`, for example.
     32 
     33 To flash, run:
     34 `sudo ./flash.sh`
     35 
     36 The script sends the 'xJTBL' command to the trackpad to send it into bootloader mode, and then flashes the new firmware.
     37 The trackpad should reset briefly after flashing, and start running the new firmware.