Skip to content
siffland edited this page Jun 10, 2023 · 3 revisions

Tang Nano 20K

Prerequisites

  • Tang Nano 20k
  • USB Type C cable
  • FTDI Drivers Installed for your operating system (Specifically FT2232C)
  • openFPGALoader

Flashing Firmware

  1. Retrieve the most recent nestang release by downloading it from the GitHub repository.
  2. Extract the contents of the release file and copy the nestang-0.5.fs file (replace "0.5" with the actual version if different) to the machine where openFPGALoader is installed.
  3. Connect the Tang Nano 20k to your computer using a USB Type-C cable.
  4. To ensure the functionality of the openFPGALoader software and verify the visibility of your board, execute the command openFPGALoader --detect.
user@machine:/tmp/nestang # openFPGALoader --detect
No cable or board specified: using direct ft2232 interface
Jtag frequency : requested 6.00MHz   -> real 6.00MHz  
index 0:
        idcode 0x81b
        manufacturer Gowin
        family GW2A
        model  GW2A(R)-18(C)
        irlength 8
user@machine:/tmp/nestang #
  1. Execute the openFPGALoader command, providing the board and firmware file details using the -b and -f options respectively.
user@machine:/tmp/nestang # openFPGALoader -b tangnano20k -f nestang-0.5.fs
write to flash
Jtag frequency : requested 6.00MHz   -> real 6.00MHz  
Parse file Parse nestang-0.5.fs: 
Done
DONE
Jtag frequency : requested 2.50MHz   -> real 2.00MHz  
Jtag frequency : requested 10.00MHz  -> real 6.00MHz  
erase SRAM Done
Detail: 
Jedec ID          : 0b
memory type       : 40
memory capacity   : 17
EDID + CFD length : 0b
EDID              : 1740
CFD               : 
Detail: 
Jedec ID          : 0b
memory type       : 40
memory capacity   : 17
EDID + CFD length : 0b
EDID              : 1740
CFD               : 
RDSR : 00
WIP  : 0
WEL  : 0
BP   : 0
TB   : 0
SRWD : 0
flash chip unknown: use basic protection detection
Erasing: [==================================================] 100.00%
Done
Writing: [==================================================] 100.00%
Done
user@machine:/tmp/nestang # 

The firmware has been successfully installed on your Tang Nano 20k, connect an HDMI cable to the device. This should result in a color bar being displayed on the screen.

Proceed to utilize the nes2img.py utility to program games onto a microSD card.