Skip to content

Flashing Firmware Updates

androda edited this page Sep 19, 2022 · 8 revisions

Where to find firmware updates

F4 BlueSCSI is not compatible with firmware binaries from the upstream BlueSCSI project. Firmware binaries for F4 BlueSCSI can be found here.

There are two options for flashing firmware binaries.

  1. Flash with STLink via SWD
  2. Flash via USB

Flashing with STLink via SWD

  • Buy a cheap gumstick shaped STLink V2 clone
    • Actual STLink V2 pucks from ST itself which are white may not work
    • I don't have one of 'the real thing', and am unable to test it
  • Update the clone's firmware
  • Download and install STM32CubeProgrammer
  • Hook up the wires for 3.3v, GND, SWCLK, and SWDIO on the programmer and the microcontroller module
  • Open STM32CubeProgrammer and select 'STLink' in the top right
  • Connect
  • Use the second button down on the left (has a down arrow pointing at a generic disk looking thing)
  • Browse to the binary file path and Start Programming
  • If all goes well, you will get not one but three popup messages saying that programming and verification are complete

Flash via USB (STM32CubeProgrammer)

  • You need a USB-C cable to use this method
  • Steps for this are very similar to flashing via STLink but you don't have to buy an STLink programmer stick
  • Download and install STM32CubeProgrammer
  • Generally speaking, removing the termination resistor packs or moving termination jumpers to 'off' will allow programming via USB to work
  • Plug in the computer-end of your USB-C cable
  • For F4:
    • Hold down the 'boot0' button and then plug in the USB-C end to the microcontroller module
  • For F4Lite:
    • Pull the thin plastic protective cover off the micro DIP switch and move position 3 to the "ON" setting, then plug in the USB-C end of the cable to the microcontroller module
  • Open STM32CubeProgrammer
  • Select USB in the top right menu
  • Use the little refresh button in the top right and you should see the module
  • Use the "Open File" tab in the top left-ish to select your firmware binary
  • Over on the right near the "USB" pane where you refreshed, there's a button that says "Read"
    • Use the dropdown to change this to "Download" and download the firmware
  • For F4Lite, make sure you move the micro-DIP switch position 3 back to the "OFF" setting before trying to boot, otherwise it won't work

Flash Via USB (qmk_toolbox)

  • You need a USB-C cable to use this method
  • Download and install the latest release of qmk_toolbox from here: https://github.com/qmk/qmk_toolbox/releases
  • Start qmk_toolbox
  • Plug in the computer-end of a USB-C cable to your computer
  • Generally speaking, removing the termination resistor packs or moving termination jumpers to 'off' will allow programming via USB to work
  • For F4:
    • Hold down the 'boot0' button and then plug in the USB-C end to the microcontroller module
  • For F4Lite:
    • Pull the thin plastic protective cover off the micro DIP switch and move position 3 to the "ON" setting, then plug in the USB-C end of the cable to the microcontroller module
  • If your microcontroller module is detected, you will see something like this
    • Note the yellow text at the bottom
  • Click the "Open" button near the top right and select your firmware update binary file
  • Click "Flash"
  • For F4Lite, make sure you move the micro-DIP switch position 3 back to the "OFF" setting before trying to boot, otherwise it won't work