chipsalliance / f4pga-examples

Example designs showing different ways to use F4PGA toolchains.
https://f4pga-examples.readthedocs.io
Apache License 2.0
263 stars 77 forks source link

issues with xc7 instructions for openocd #106

Open tcal-x opened 3 years ago

tcal-x commented 3 years ago

If this addressed by a PR in flight, just close this.

I'm going through the examples at https://symbiflow-examples.readthedocs.io/en/latest/building-examples.html .

After the counter example is built, the user is told to execute the following to program the part with the bitstream:

openocd -f ${INSTALL_DIR}/conda/share/openocd/scripts/board/digilent_arty.cfg -c "init; pld load 0 top.bit; exit"

There are two things wrong with this:

kgugala commented 3 years ago

can we rewrite the guide to use https://github.com/trabucayre/openFPGALoader? This tool is way simpler to use than openOCD and it supports xc7 boards we target

GitHub
trabucayre/openFPGALoader
Universal utility for programming FPGA. Contribute to trabucayre/openFPGALoader development by creating an account on GitHub.
tcal-x commented 3 years ago

I'd be willing to give it a try if it simplifies things overall.

kgugala commented 3 years ago

it has an AGPL license -- is that an issue?

this is not an issue if we just use it as a third party tool. (BTW openocd is GPL licensed)

mithro commented 3 years ago

@kgugala - I'm afraid we can't touch anything which is AGPL. GPL is fine.

mithro commented 3 years ago

https://opensource.google/docs/using/agpl-policy/

opensource.google
AGPL Policy – opensource.google
kgugala commented 3 years ago

oh, OK. So we need to fix openocd instructions then

mithro commented 3 years ago

@kgugala - If anyone has a good relationship with the openFPGALoader people, it might be worth talking to them and seeing if they would consider "downgrading" to just GPL (rather than AGPL) -- which means we could then use them. I'm not sure the AGPL makes a lot of sense for their software anyway - the additions in AGPL are mainly focused towards "web" technologies like databases, web apps, etc.

pgielda commented 3 years ago

Seems its more than one person but the main committer is gwenhael.goavec-merou@trabucayre.com

pabigot commented 3 years ago

In case it's relevant: digilent_arty.cfg seems to be found in the openocd that comes from the litex::openocd conda package, which is incompatible with python 3.8 which is installed following the directions in this repository.

I'm not seeing any obvious difference between digilent_arty.cfg and the arty_s7.cfg in upstream OpenOCD which can be installed outside of conda. Although I've successfully programmed my Arty A7-100T with arty_s7.cfg in the past, and substituting it in the example command (after first cd counter_test/build/arty_100/) produces no errors, I don't see any flashing LEDs.

acomodi commented 3 years ago

@pabigot @tcal-x I have opened a PR to: