STM32 and APM32 Firmware Update Tutorial
- This tutorial only applies to FLY series products. Devices of other brands or models are not compatible. Do not attempt to use them.
- This tutorial applies to updating firmware by entering flashing mode.
- This tutorial only applies to FLY products using APM32 and STM32 series chips.
Downloading Firmware
You can obtain the firmware via the following link:
- Download Firmware Package – Direct download of the latest firmware zip archive
The zip archive must be extracted before use.
- Repository Address – Access the firmware repository
-
Alternatively, download the complete repository via git (ensure the host machine has internet access):
-
For general systems
cd && git clone https://cnb.cool/3dmellow/FLY-Firmware.git -
For FLY host machine
git clone https://cnb.cool/3dmellow/FLY-Firmware.git /data/FLY-Firmwareln -s /data/FLY-Firmware /root/FLY-Firmware -
If the firmware package has already been downloaded, it is recommended to update to the latest version before proceeding:
cd ~/FLY-Firmware && git pull
- The previous repository is no longer maintained. To delete it, execute:
rm -rf ~/FLY_Katapult /root/FLY_Katapult
Firmware Path Description
| Folder Name | Description |
|---|---|
| ExtensionBoard | Firmware for FLY modules and expansion boards |
| Screen | Firmware for FLY screens |
| MainBoard | Firmware for FLY mainboards |
| ToolBoard | Firmware for FLY tool boards |
When flashing in Linux, the firmware path in the command must be completed to the specific firmware file. You cannot just fill in the folder path. For example, if you have already cloned FLY-Firmware on a local server or Linux host, first enter the corresponding product directory to check the actual file name, then replace the path after -D with a full path similar to ~/FLY-Firmware/ExtensionBoard/ALPS/mergedBL/FLY-ALPS-V2.0-mergedBL.bin.
Entering Flashing Mode
- Prepare a Type-C data cable that supports data transfer.
- Ensure the device is completely powered off and not connected to any other devices.
- While the device is powered off, first plug the Type-C data cable into the device.
- Press and hold the BOOT button on the device, and at the same time plug the other end of the data cable into the computer. Release the BOOT button once the computer recognizes the device.
Precautions
-
USB Interface Compatibility: Some devices may not be recognized properly on USB 3.0 interfaces. It is recommended to use a USB 2.0 interface for flashing first.
-
Flashing Failure Troubleshooting Steps: If flashing still fails on a USB 2.0 interface, try the following:
- Disconnect all unnecessary external devices (such as drivers, endstops, etc.);
- Completely power off the computer (unplug the power cable), wait a few seconds, and then restart;
- Use an external USB hub or try a different USB interface.
Flashing Firmware
- Windows Flashing
- Linux Flashing
- STM32 Windows Flashing
- APM32 Windows Flashing
- DFU-AUTO Graphical Flashing
To ensure successful STM32 flashing, please note the following:
- The USB port on some computers may cause unstable flashing due to driver or signal compatibility issues. It is recommended to try a different USB port for connection.
- If changing ports does not work, an effective solution is to connect via an external USB hub, which often improves compatibility.
- When the flashing software reports the error shown below, please also prioritize trying a USB hub. If the issue persists, check or use the host computer for flashing.
Loading...
- Flashing tool Download Link
- You need to download
SetupSTM32CubeProgrammerandSTM32 DFU Driver - Download the firmware to any directory on your computer
- Connect the motherboard to the computer using a Type-C cable, ensuring it has entered
dfuflashing mode - In STM32CubeProgrammer, select USB mode, refresh, and connect
Loading...
- If no error popup appears, the connection is successful.
Loading...
- Click the download icon on the left and check the following options
Loading...
- Click
Browseas indicated by the arrow, then select the firmware you need to flashLoading... - Set
Start addressto0x08000000- Note: If the firmware is in
HEXformat, please skip this step!!
Loading... - Note: If the firmware is in
- Click
Start automatic modebelow to begin flashing the firmwareLoading... - The following prompt indicates that the firmware flashing is complete
Loading...
- Download the flashing tool: Download Link
- Install the DFU driver: Download and extract
DFUProgrammer. The package includes the DFU driver for APM32. Please install this driver manually. - Prepare the firmware: Copy the previously compiled firmware file to any directory on your computer (e.g., the desktop) for easy selection later.
- Enter DFU mode: Connect the mainboard to the computer using a Type-C cable. Ensure the mainboard is in DFU flashing mode (usually set via a jumper cap; for specific methods, refer to the mainboard's DFU entry instructions).
- Run the flashing tool: Open DFUProgrammer and select and configure as shown in the images below:
Loading...Loading...
- Start flashing: Click the "Start Updating Firmware" button and wait for the progress bar to complete. Once the flashing is successful, you can disconnect the Type-C cable and remove the jumper cap.
- Download and run FLY DFU-AUTO. The software will automatically detect DFU devices that have entered flashing mode.
- If the
Driver Statusis unavailable, clickInstall Driverto complete the WinUSB driver installation. - Click
Browse...to select the.binfirmware file to be flashed. - Click
Start Flashingand monitor the progress in theRun Logbelow. Wait for the flashing to complete.
Detailed Tutorial: FLY DFU-AUTO Download and Usage
- STM32 Linux Flashing
- APM32 Linux Flashing
-
Install the flashing tool
- No need to install the flashing tool for the FLY host computer
- If you need to install it, please note: The host computer must have internet access for proper installation
- If already installed, there is no need to install again
sudo apt updatesudo apt install dfu-util -y -
Run the following command to check if the connection is successful.
lsusb-
If no DFU device is found, please try re-entering flashing mode
-
Due to system version differences, it may display a different name. If you see
0483:df11, it indicates that the flashing mode has been enteredLoading...
-
-
Flash the firmware
- Run the command below to start flashing. Replace
<full path of firmware file>with the actual firmware file path
sudo dfu-util -a 0 -d 0483:df11 --dfuse-address 0x08000000 -D <full path of firmware file> - Run the command below to start flashing. Replace
-
If the message
File downloaded successfullyappears as shown below, the flashing is successfulLoading...TipAfter flashing is complete, be sure to completely power off the motherboard once.
-
Install Flashing Tool
- No installation of flashing tool is required for FLY host computers.
- If installation is needed, please note: The host computer must have internet access for proper installation.
- If already installed, no need to install again.
sudo apt updatesudo apt install dfu-util -y -
Run the following command to check if the connection is successful.
lsusb-
If no DFU device is detected, please try re-entering flashing mode.
-
Due to system version differences, it may display other names. If
314b:0106appears, it indicates successful entry into flashing mode.Loading...
-
-
Flash Firmware
- Execute the following command to start flashing. Replace
<full path to firmware file>with the actual firmware file path.
sudo dfu-util -a 0 -d 314b:0106 --dfuse-address 0x08000000 -D <full path to firmware file> - Execute the following command to start flashing. Replace
-
The flashing is successful when the output shows
File downloaded successfullyas shown below.Loading...TipAfter flashing, the motherboard must be completely powered off once.
FAQ
Q: What should I do if the computer cannot recognize the device?
A: Follow these steps to troubleshoot:
- Make sure the data cable supports data transfer (charging cables are not usable)
- Check if the device has entered flashing mode (hold BOOT and then plug in USB)
- Change the USB interface on the computer. It is recommended to use a USB 2.0 interface; if issues occur with a USB 3.0 interface, try connecting to a USB 2.0 interface or via a USB hub.
- Check if the corresponding chip's USB driver is installed on the computer (e.g., the DFU driver for STM32, the virtual serial port driver for APM32, etc.)
Q: What should I do if it reports a failure or gets stuck during flashing?
A: Try the following methods:
- Re-enter flashing mode and try flashing again
- Change the USB interface (USB 2.0 is recommended) or use a hub
- Close other software that is occupying USB resources
- Confirm that the selected firmware matches the device model (e.g., mainboard, screen, tool board, etc.)
Q: What should I do if the device does not start after flashing?
A: Possible causes and solutions:
- After flashing is complete, completely power off the device (unplug the power), and then power it back on to ensure the firmware starts normally.
- Firmware version mismatch: Re-download the firmware for the corresponding model and flash it again.
- Incomplete flashing: Re-enter flashing mode and flash again.
- Hardware issue: Check if the power connection is normal, or contact technical support.