<d1b2>
<Attie> the pin set here is just pins 0 through 4 of the port A header
<pepijndevos[m]>
ah yea this was my confusing... how would you refer to the B header?
<pepijndevos[m]>
Both are labeled 0-7 on the back
<d1b2>
<Attie> use --port B instead, with 0-7
<pepijndevos[m]>
ahhhh
<d1b2>
<Attie> or if you want to use both, use --port AB, where 0-7 is port A, and 8-15 is port B
<pepijndevos[m]>
I've been using openFPGALoader to program FPGAs. For actually uploading a bitstream, do I use jtag-openocd or jtag-svf or something... else? there are program-ice40-sram scripts, but no such thing for ECP5
fibmod has joined #glasgow
<pepijndevos[m]>
it worked!!!
<d1b2>
<Attie> woo! \o/
<pepijndevos[m]>
So now I'm just loading the SVF which loads the bitstream into sram. But now I'd like to load it into flash...
<d1b2>
<cfy_yfc> is it possible that currently it is difficult to run glasgow? it seems to require nmigen and amaranth; both of which require pyvcd ... but nmigen claims compatibility only up to 0.1.7. and amaranth only from 0.2.2 and up ...
<miek>
i don't think it requires nmigen
<d1b2>
<dragonmux> it does not require nmigen
<d1b2>
<dragonmux> Amaranth provides a compat layer for anything missing conversion anyway
<d1b2>
<cfy_yfc> are you sure? running glasgow from GIT tells me: ModuleNotFoundError: No module named 'nmigen'
<d1b2>
<dragonmux> yes, we're sure. you need to have installed Amaranth either in a virtual environment that you've activated, or globally - but it does work (using Glasgow from Git with Amaranth ourself)
<d1b2>
<cfy_yfc> okay; thanks. I uninstalled all three of them and reinstalled just amaranth; now it seems to work 😅
<marcus_c>
It generates an SVF that flashes a bitstream. You may need to adapt the flash opcodes if you have a different flash.
<pepijndevos[m]>
yea I found a similar script but it didn't work for my flash chip
<marcus_c>
My flash is Winbond W25Q128JVPIQ. But all the opcodes can be overridden with kwargs.
<marcus_c>
Also the JEDEC id of the flash needs to be set as the SVF will check it.
<pepijndevos[m]>
thanks I'll have a look
<pepijndevos[m]>
mine is Winbond 25Q32JVSIQ so... maybe not too different?
<marcus_c>
Yeah, I expect you only need to change the ID then.
<marcus_c>
(Or remove the line that does the ID check :)
<d1b2>
<dragonmux> looks like the ID is FE 40 16, and it uses the sector erase instruction 20 w/ 4K erase sectors and 256 byte write sectors.. ie, a standard SPI Flash device so yes, Marcus is correct
<d1b2>
<dragonmux> adds it to SPIFlashProgrammer
<marcus_c>
My script uses 64K erase by default, but it looks like that opcode is supported by 25Q32JVSIQ, so it shouldn't be a problem.
<d1b2>
<dragonmux> fair.. we considered doing that in SPIFP, but we decided that the finer control on how much is erased was more useful especially in its intended application
<marcus_c>
Yeah, I made my script explicitly to program a bootloader, so the expectation is that nothing else of value is there yet. :-)
<d1b2>
<dragonmux> while the SPIFlashProgrammer firmware is engineered to be a general purpose SPI Flash to USB interface, including having protocol support for rewriting arbitrary erase sector aligned areas of Flash at will