whitequark changed the topic of #glasgow to: digital interface explorer · code https://github.com/GlasgowEmbedded/glasgow · logs https://libera.irclog.whitequark.org/glasgow · discord https://1bitsquared.com/pages/chat · production https://www.crowdsupply.com/1bitsquared/glasgow (FUNDED)
fibmod has quit [Remote host closed the connection]
OveRSeeR has joined #glasgow
thaytan has quit [Ping timeout: 276 seconds]
thaytan has joined #glasgow
OveRSeeR has quit [Quit: Bye]
rcombs has quit [Ping timeout: 260 seconds]
rcombs has joined #glasgow
bvernoux has joined #glasgow
pepijndevos[m] has joined #glasgow
<pepijndevos[m]> How can I used Glasgow to program an ECP5 with unknown JTAG pinout? I'm stuck on silly problems like "what is a pin set"
<d1b2> <Attie> this is the sort of workflow you'll be looking to use: https://twitter.com/attiegrande/status/1406938107967066113 (apologies for images with no alt)
<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'
<_whitenotifier-e> [glasgow] vincentbaeten opened pull request #293: revC2: Fix bom having not enough columns on multiple lines - https://github.com/GlasgowEmbedded/glasgow/pull/293
<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 😅
<_whitenotifier-e> [GlasgowEmbedded/glasgow] whitequark pushed 1 commit to main [+0/-0/±1] https://github.com/GlasgowEmbedded/glasgow/compare/960eef729410...b7f031c70c88
<_whitenotifier-e> [GlasgowEmbedded/glasgow] whitequark b7f031c - software: update for Amaranth upstream changes.
<_whitenotifier-e> [GlasgowEmbedded/glasgow] whitequark pushed 1 commit to main [+0/-0/±1] https://github.com/GlasgowEmbedded/glasgow/compare/b7f031c70c88...6e6b9c1cdd28
<_whitenotifier-e> [GlasgowEmbedded/glasgow] vincentbaeten 6e6b9c1 - revC2: Fix bom having not enough columns on multiple lines
<_whitenotifier-e> [glasgow] whitequark closed pull request #293: revC2: Fix bom having not enough columns on multiple lines - https://github.com/GlasgowEmbedded/glasgow/pull/293
<_whitenotifier-e> [glasgow] whitequark commented on pull request #293: revC2: Fix bom having not enough columns on multiple lines - https://github.com/GlasgowEmbedded/glasgow/pull/293#issuecomment-1113592150
<marcus_c> pepijndevos[m]: You may be interrested in this Python script I wrote: https://github.com/zeldin/foboot/blob/OrangeCart/hw/util/ecp5_background_spi_flash.py
<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
jstein has joined #glasgow
jstein has quit [Ping timeout: 240 seconds]
Guest2987 has joined #glasgow
Guest2987 has quit [Quit: Client closed]