This replaces the factory firmware and addresses three main limitations:
The programming interface supports XMODEM-CRC and XMODEM1k removing the need for a custom programmer.
See also the compat
branch for firmware that is backwards compatible with the Numato programmer.py (but addresses 1 & 2 above).
There's a prebuilt .hex file in the prebuilt
directory.
Otherwise, get the necessary software:
Open the project in MPLAB.X, select Run>Build.
Connect a jumper to the FWUP header (just above the left-most seven-segment). Power up the board and it should show up as a HID device (the Microchip HID bootloader).
$ lsusb
...
Bus 001 Device 052: ID 04d8:003c Microchip Technology, Inc.
...
Verify mphidflash can find the device:
$ ./mphidflash-1.6-linux-64
USB HID device found: 12288 bytes free
Device family: PIC18
Use mphidflash to flash the new code:
$ ./mphidflash-1.6-linux-64 -w prebuilt/numato-mimasv2-pic-firmware.production.hex -r
Remove the jumper and power-cycle the board.
$ screen /dev/ttyACM0
mimas> v
1.0
mimas> i
202015
mimas> f
Ctrl-A : exec !! sx -k /path/to/flash.bin
$ python3 -m venv venv
$ . venv/bin/activate
$ pip install pyserial xmodem
$ python3 programmer.py /path/to/flash.bin
$ minicom -D /dev/ttyACM0
mimas> v
1.0
mimas> i
202015
mimas> f
Ctrl-A S
$ screen /dev/ttyACM1 115200