This repository includes firmware and a launcher for the 32Blit that lets you manage games on SD card, and copy or flash games via USB serial.
Unless you want to work on the firmware, you can install the latest pre-built firmware/launcher:
32blit-sdk-[version]-STM32.zip from the assets at the bottomfirmware-update-[version].blitlauncher.blitBoth files can be installed using 32blit install [file].blit or by copying to the SD card. You should rename the firmware update to firmware-update.blit if copying to the SD card as this will cause it to automatically install.
The rest of these instructions cover building the firmware from source.
In order to use the 32blit firmware, you will need to:
pip install 32blitYou must make sure you have an ARM GCC cross-compile environment set up on your computer, refer to the relevant documentation below:
These instructions assume that you will create build directories in the root of this repository.
From the root of the repository prepare cmake to target 32Blit if you haven't already:
mkdir build.stm32 cd build.stm32 cmake .. -DCMAKE_TOOLCHAIN_FILE=../32blit.toolchain
Now build the firmware binary and dfu files (for Linux/macOS and Windows flashing respectively):
make firmware
If you currently have a working firmware, you can flash a new firmware without using DFU mode by running:
make firmware-update.flash
Alternatively, you can run make firmware-update and install the resulting firmware-update/firmware-update.blit with any of the methods described here.
To enter DFU mode either hold the X & Y buttons and press the reset button or select dfu mode from the on device menu. The screen will go dark, this is normal.
Install dfu-util from your package manager then enter:
sudo dfu-util -a 0 -s 0x08000000 -D firmware/firmware.bin
You will need DfuSe Demonstration from st.com) to flash firmware.dfu to your device.
Once installed you should be able, from the build.stm32 directory you created earlier, to flash 32Blit's firmware by running:
../tools/wsl-flash firmware/firmware.dfu
Note: wsl-flash uses a hard-coded path to DfuSe 3.0.6 in c:\Program Files (x86)
If this fails you can run the DfusSeDemo application and pick your 32Blit (it should be “STM Device in DFU Mode”) from the “Available USB Devices” drop down.
In the “Upload Action” section hit “Choose” and select the firmware.dfu file you built earlier. (It should be in build.stm32/firmware/firmware.dfu) and finally hit “Upgrade” to flash the file.
Flashing a launcher is similar to flashing a game/example, run make launcher and the output is launcher/launcher.blit. launcher.blit is automatically flashed from the SD card if it exists.
If you have more than one device in DFU mode connected to your computer then find the 32blit using lsusb and add -d vid:pid to the dfu-util command. Replace vid:pid with the 4 character ID strings to target the correct device.
If you have put the device into DFU mode, but the DfuSe tool refuses to recognize it, you might need to update the DFU driver by hand.
C:\Program Files (x86)\STMicroelectronics\Software\DfuSe v3.0.6\Bin\Driver\Win10\ This folder contains the driver.