Everything in this repository is designed for the Sipeed Tang Mega 138K Pro board featuring the Gowin GW5AST chip along with the on-chip AndesTech AE350 A25 SoC.
Blinks the N23 led.
- Using the hard AE350 IP instead of a soft one
- No DDR3 for simplicity and faster memory access
- ROM and Stack memory sections placed on SRAM
- AHB <=> SRAM speed: 200 Mhz
- 100% Rust
Compile the example with just:
# Build the project
cargo build -p blink --release
# Write the SRAM init file
just sram blink releaseThen open the project in Gowin EDA and do syn, pnr, flash as usual. Or use Gowiners:
# Change dir
cd crates/blink
# Define Gowin EDA location
echo "/home/limpix/gowin" > .gowin
# Run implementation
gowiners impl
# Flash to SRAM
gowiners flash sramDemo project to examine on-chip debugging with openocd and gdb
Warning
Do NOT burn SPI flash, as debugging requires “JTAG as regular I/O,” which means you CANNOT reconfigure the FPGA while it is configured using a bitstream with this option.
# Build the project with the debug profile
cargo build -p blink
# Write the SRAM init file
just sram blink debugThen open Gowin EDA and do syn, pnr and flash as usual.
Flash the bitstream to the board and run openocd
openocd -f crates/dbg/openocd.cfgCommon gdb session
# Launch remote gdb session
riscv32-unknown-elf-gdb -x debug/ae350.gdb
# Add breakpoint
hbreak blink::external_interrupt
continue
# ...WiP