=================
== Mike Clarke ==
=================

Flashing a Colour Maximite 2 from Linux

The official method of updating the firmware on the CMM2 is detailed in the manual, and requires the use of STM’s ‘STM32CubeProgrammer’ software. I don’t really want to have to mess around with Windows if I can avoid it, and many of the steps listed in the manual assume the use of an earlier revision of the CMM2 with the processor on its own Waveshare daughterboard. With the model I have there’s only one board with the processor mounted directly onto it.

I was looking for a more straightforward way of flashing beta firmware onto the board, and found one on the forum using dfu-util.

See the post for the details, but in summary:

  1. You will need a USB A-A cable. I wasn’t aware that such abominations even existed, but turns out they are readily available on Amazon.

  2. Install dfu-util using your package manager of choice.

  3. Open the CMM2. On the integrated board there is a jumper between the SD slot and the power switch with two positions; ‘PROGRAM’ and ‘RUN’. Set it to ‘PROGRAM’.

  4. Plug your USB A-A cable into your Linux machine. With nothing else attached to the CMM2, plug the other end into the keyboard port. The CMM2 should power up, and running sudo dfu-util -l should show something like:

    Found DFU: [0483:df11] ver=0200, devnum=75, cfg=1, intf=0, path="1-1.1", alt=1, name="@Option Bytes   /0x5200201C/01*128 e", serial="200364500000"
    Found DFU: [0483:df11] ver=0200, devnum=75, cfg=1, intf=0, path="1-1.1", alt=0, name="@Internal Flash   /0x08000000/16*128Kg", serial="200364500000"
    

    If it doesn’t show anything check the jumper is set correctly and try again.

  5. Assuming all is well you can flash the CMM2:

    $ sudo dfu-util -d ,483:df11 --alt 0 -s 0x08000000:leave --download FOO.bin
    
  6. Reset the jumper back to ‘RUN’.