Questioning Everything Propaganda

Home Tags
Login RSS
GoTek Firmware Flash with FlashFloppy

Flashing FlashFloppy onto a GOTEK (AT32F415) on Linux

This guide documents flashing the FlashFloppy firmware onto a GOTEK floppy emulator running an Artery AT32F415 microcontroller on Linux using dfu-util.


What You Need

  • GOTEK floppy emulator
  • USB-A to USB-A cable
  • A jumper cap (or short wire)
  • Linux PC with dfu-util installed (sudo apt install dfu-util)
  • FlashFloppy firmware release — latest releases (this folder is v3.44)

Step 1 — Identify Your MCU

Open the GOTEK and read the label on the square chip on the PCB. See the FlashFloppy Supported Hardware wiki page for a list of known GOTEK board variants and their chips.

Chip marking Firmware file to use
STM32F105 or AT32F415 dfu/flashfloppy-at415-st105-<ver>.dfu
AT32F435 dfu/flashfloppy-at435-<ver>.dfu

If lsusb (after entering DFU mode, see below) shows 2e3c:df11 Artery-Tech, your chip is AT32F415 or AT32F435. If it shows 0483:df11, it is STM32F105.


Step 2 — Enter DFU Mode

  1. Power off the GOTEK completely.
  2. Place a jumper across the two BOOT0 pins — the pair of holes near the rear of the PCB. Without this jumper the chip boots normally and is invisible to dfu-util.
  3. Connect the GOTEK to your PC with a USB-A to USB-A cable.
  4. Verify the device is detected:
lsusb | grep -i "2e3c\|df11\|artery\|stm"

You should see something like:

Bus 002 Device 003: ID 2e3c:df11 Artery-Tech DFU in FS Mode

Step 3 — Flash the Firmware (Two-Step Process)

This two-step approach is documented in the FlashFloppy Firmware Programming wiki.

Factory-fresh GOTEKs (and many used ones) have their flash read-protected, which prevents dfu-util from erasing pages. You must remove this protection first.

Why two steps?

The read-unprotect command erases all flash and resets the device. After the reset the GOTEK re-enumerates in DFU mode (because the BOOT0 jumper is still in), and only then can you flash the firmware.

Step 3a — Remove read protection and erase flash

sudo dfu-util -a 0 -s :unprotect:force \
  -D dfu/flashfloppy-at415-st105-3.44.dfu

Expected output ends with:

DFU state(5) = dfuDNLOAD-IDLE, status(0) = No error condition is present
dfu-util: Wrong state after command "READ_UNPROTECT" download

This "wrong state" message is normal. It means the device successfully erased its flash and reset itself. The USB connection dropped because the chip rebooted.

Wait 5 seconds for the GOTEK to re-enumerate, then confirm it is back:

lsusb | grep -i "2e3c\|artery"

Step 3b — Flash the firmware

sudo dfu-util -a 0 \
  -D dfu/flashfloppy-at415-st105-3.44.dfu

You should see both elements erase and download to 100%:

Erase    done.
Download done.
...
Done parsing DfuSe file

Step 4 — Boot FlashFloppy

  1. Remove the BOOT0 jumper from the two pins.
  2. Unplug and replug the USB cable (or power-cycle the GOTEK).
  3. The GOTEK display should show F-F — FlashFloppy is running.

Future Firmware Updates

Once FlashFloppy is installed you never need DFU again. Copy either update file from the root of this folder onto a FAT32 USB drive and plug it into the GOTEK while powering on — the bootloader picks it up automatically:

File Use when
FF_Gotek-<ver>.upd AT32F415 / STM32F105 with older bootloader
flashfloppy-<ver>.upd AT32F415 / STM32F105 with recent FlashFloppy bootloader, or AT32F435

If you see error E01 with one file, switch to the other.


Sources


Troubleshooting

LIBUSB_ERROR_ACCESS when running dfu-util

Run with sudo, or install udev rules so your user can access the device without root.

ERASE_PAGE not correctly executed on second dfu-util run

You skipped the unprotect step (Step 3a). Run it first, wait 5 seconds, then re-run Step 3b.

Device not found after unprotect reset

Wait longer — the AT32F415 can take several seconds to re-enumerate. Run lsusb until it reappears before running Step 3b.

STM32CubeProgrammer / STM32_Programmer_CLI shows "No STM32 device"

STM32CubeProgrammer only recognises ST chips. It will not see an Artery AT32F415. Use dfu-util as described above.


Original Author: admin

Views: 3 (Unique: 2)

Page ID ( Copy Link): page_6a3a31f32ebfb1.27181085-b1be8ce8c4f0efe9

Page History (2 revisions):