Skip to content

Latest commit

 

History

History
102 lines (73 loc) · 2.48 KB

README.md

File metadata and controls

102 lines (73 loc) · 2.48 KB

PIC firmware for the Numato Mimas v2

Overview

This replaces the factory firmware and addresses three main limitations:

  • The FPGA UART now runs at 115200 baud.
  • The board shows up as two USB serial ports, one for the SPI Flash programmer, one for the FPGA UART. This avoids the need to use the mode switch on the board.
  • It's much faster to program.

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).

Building instructions:

There's a prebuilt .hex file in the prebuilt directory.

Otherwise, get the necessary software:

Open the project in MPLAB.X, select Run>Build.

Flashing the PIC

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.

Flashing the FPGA

Using screen

$ screen /dev/ttyACM0
mimas> v
1.0
mimas> i
202015
mimas> f
Ctrl-A :  exec !! sx -k /path/to/flash.bin

Using programmer.py

$ python3 -m venv venv
$ . venv/bin/activate
$ pip install pyserial xmodem
$ python3 programmer.py /path/to/flash.bin

Using minicom

$ minicom -D /dev/ttyACM0
mimas> v
1.0
mimas> i
202015
mimas> f
Ctrl-A S

Connecting to the FPGA UART

$ screen /dev/ttyACM1 115200

TODO

  • Make the FPGA UART speed detect automatically from the host. (In progress)
  • Set a write offset
  • Set a write size (and fill with zeros)