Installation using a Windows PC
July 29, 2025 · View on GitHub
This document explains how to install all the necessary files on the Tang Nano 20K and the M0S Dock in order to use it as a Nano Apple IIe device.
This has been tested on Windows 11. It should work on older versions too.
Software needed:
- Gowin V1.9.11.03 to synthesize the core
- Gowin V1.9.11.03 to program the flash of the TANG FPGA
- BouffaloLabDevCube to flash the BL616
- Latest release of A2600Nano FPGA bitstream
- Latest release of FPGA companion firmware µC firmware (if not otherwise stated in the release note.)
- Latest release of the TANG onboard µC bl616 programmer firmware
In order to use the SD card:
- NIB and HDV images
Flashing the Tang Nano 20k
First download the Gowin IDE. The Education version is sufficient and won't need a licence.
Install the IDE on your system (follow the installation instructions from Gowin). After the Installation you should have it as an shortcut on your desktop or in your start menu.
- Press the
S2button on the Tang Nano 20K and keep it pressed - Connect the Tang Nano 20k to the USB on your computer. You should hear the connecting sound of Windows.
- Release the
S2button - Start Gowin. You should see the following screen

Now press on the “programmer” marked red on the picture above. You should see following screen:

- Press save on the dialog
- From there you can add a device for programming by pressing on the little icon with the green plus
- At least one file have to be flashed:
- The core itself:
nanoapple2_tn20k.fs
- The core itself:
- Than you can choose from the drop downs the parameter you see on the pictures.
Important:
-
nanoapple2_tn20k.fsis written to address 0x000000 -
For the FS file please choose the
nanoapple2_tn20k.fsyou just downloaded -
User Code and IDCODE can be ignored
-
Mark each of your configs and press the little icon with the green play button. You should see a progress bar and then:
At a glance the memory layout of the SPI Flash:
| Type | TN20k | TP20k | TP25k | TM138k | TM60k | |
| FPGA bitstream | 0x000000 | 0x000000 | 0x000000 | 0x000000 | 0x000000 | ROM size |
You might need to use an older version of the Gowin Programmer SW for the GW1NR device.
shell / command line Programming alternative
Windows shell and Gowin Programmer
programmer_cli -r 36 --fsFile NanoApple2_tn9k.fs --cable-index 1 --d GW1NR-9C
programmer_cli -r 36 --fsFile nanoapple2_tn20k.fs --spiaddr 0x000000 --cable-index 1 --d GW2AR-18C
programmer_cli -r 36 --fsFile NanoApple2_tp20k.fs --spiaddr 0x000000 --cable-index 1 --d GW2A-18C
programmer_cli -r 36 --fsFile NanoApple2_tp25k.fs --spiaddr 0x000000 --cable-index 1 --d GW5A-25A
programmer_cli -r 36 --fsFile nanoapple2_tm60k.fs --spiaddr 0x000000 --cable-index 1 --d GW5AT-60B
programmer_cli -r 36 --fsFile NanoApple2_tm138k_pro.fs --spiaddr 0x000000 --cable-index 1 --d GW5AST-138B
programmer_cli -r 36 --fsFile NanoApple2_tc60k.fs --spiaddr 0x000000 --cable-index 1 --d GW5AT-60B
programmer_cli -r 36 --fsFile NanoApple2_tc138k.fs --spiaddr 0x000000 --cable-index 1 --d GW5AST-138B
That´s it for the Tang Nano 20k
Flashing the BL616 µC
For the BL616 you have to extract and start the BuffaloLabDevCube.
- Press the
BOOTbutton on your M0S Dock before you plug the USB connection on your PC. You should hear the hardware detecting sound. - Start the BuffaloLabDevCube from the directory where you decompressed it it ask you what chip should be used. Select BL616/BL618 and press “finish”

- You'll now see the program screen. On the right it should auto detect your device with a COM port. If not take a look in the device manager to check for the correct device detection.
- On the top click on MCU and browse to the firmware image file named
fpga_companion_bl616.bin(contains a unified firmware) - Choose “Open Uart” and than press “Create & Download”. The firmware should now be flashed

Prepare the SD card
Format the SD card in FAT32. Copy your cartrige files files on
it. You can organize your files in subdirectories.
These files can later be selected using the on-screen-display (OSD).