Olimex Support Forum

Others => FPGA => Topic started by: talpa on May 03, 2025, 08:21:20 PM

Title: How to reset the GateMateA1 before programming (using openFPGALoader)?
Post by: talpa on May 03, 2025, 08:21:20 PM
Hi I have recently acquired a GateMateA1-EVB-2M

However when I program it I first have to press the FPGA_RST1 button in order for the programming to result in a successfully programmed board every time.

The Pico / DirtyJTAG programmer is connected to the same signal over GPIO21\JTAG_RST but I have yet find a way for it to drive the pin.

How do I program the FPGA without having to press the reset button?



The steps used to program (actually performed by a makefile)
yosys -ql synth.log -p 'read_verilog -defer -sv $^; synth_gatemate -luttree -top top -json top.json'
nextpnr-himbaechel --device CCGM1A1 --json top.json --vopt ccf=pins.ccf --vopt out=top.txt --router router2 --freq 10
gmpack top.txt top.bit
openFPGALoader -b olimex_gatemateevb  -r -m top.bit
Title: Re: How to reset the GateMateA1 before programming (using openFPGALoader)?
Post by: talpa on May 04, 2025, 05:34:58 PM
Got some help from a nice user on the Masterdon network

He had the same issue and had to update the firmware for the pico:
https://github.com/OLIMEX/GateMateA1-EVB/tree/main/SOFTWARE/dirtyJtag
I'm not sure that I needed to but did so anyway.

He also said that I needed a new enough openFPGALoader.
(he used the one from https://github.com/YosysHQ/oss-cad-suite-build/releases/tag/2025-04-29)

I just build it from source:
https://github.com/trabucayre/openFPGALoader

After doing this there is now a tiny flash in the reset LED on the board when I program it
Title: Re: How to reset the GateMateA1 before programming (using openFPGALoader)?
Post by: LubOlimex on May 05, 2025, 09:15:05 AM
So using new version of openFPGALoader allows you to flash the RP2040 without manually putting it in bootloader mode?
Title: Re: How to reset the GateMateA1 before programming (using openFPGALoader)?
Post by: talpa on May 09, 2025, 11:12:13 PM
I don't know if openFPGALoader is capable of programming the RP2040
(I just put it into bootloader mode (depressing RP-BOOT while pressing RP-RESET) and dragged the firmware into the drive)

But a new enough openFPGALoader actually resets the GateMateA1 when programming it.
(So I no longer have to push FPGA-RST1 before programming the FPGA)