Test run with oss-cad-suite (https://github.com/yosyshq/oss-cad-suite-build):
- download and install Gowin IDE (Education Version is also okay)
- download and install oss-cad-suite
- download and install riscv toolchain
- setup risc-v toolchain path to system environments
- setup Gowin IDE/Programmer binary directory to system environments
- download litex_setup.py
- start oss-cad-suite box by running 'start.bat' inside its directory
# follow steps run inside oss-cad-suite box
[OSS CAD Suite] > mkdir enjoy-digital
[OSS CAD Suite] > cd enjoy-digital
[OSS CAD Suite] > cp ../litex_setup.py .
[OSS CAD Suite] > python3 litex_setup.py --init --install --config=full
[OSS CAD Suite] > pip3 install meson ninja
[OSS CAD Suite] > git clone https://github.com/curliph/tang_nano_9k_test
[OSS CAD Suite] > cd tang_nano_9k_test
# patches have been merged to LiteX/Litex-boards
# so following 4 steps not needed now.
# [OSS CAD Suite] > cp patch/litex/programmer.py ../enjoy-digital/litex/litex/build/gowin
# [OSS CAD Suite] > cp patch/litex/gowin.py ../enjoy-digital/litex/litex/build/gowin
# [OSS CAD Suite] > cp patch/litex-boards/platforms/*.py ../enjoy-digital/litex-boards/litex-boards/platforms
# [OSS CAD Suite] > cp patch/litex-boards/targets/*.py ../enjoy-digital/litex-boards/litex-boards/targets
[OSS CAD Suite] > python3 test.py --build --load --prog-kit gowin # load to internel sram
[OSS CAD Suite] > python3 test.py --build --flash --prog-kit gowin # flash bitstream to internel embFLASH
- download zadig
- connect tang-nano-9k to computer, replace its [JTAG Debugger (interface 0)] with WinUSB driver by zadig
[OSS CAD Suite] > python3 test.py --build --load # load to internel sram
[OSS CAD Suite] > python3 test.py --build --flash # flash bitstream to embFLASH and bios to external SPINAND