icebreaker-fpga / icebreaker-litex-examples

Example litex Risc-V SOC and some example code projects in multiple languages.
64 stars 18 forks source link

Attempting to run the SoC build script produces "name 'LiteXModule' is not defined`" error #13

Closed JamesTimothyMeech closed 1 year ago

JamesTimothyMeech commented 1 year ago

When I run ./icebreaker.py --debug --flash I get the following error

jamesmeech@Jamess-MacBook-Pro-10 soc % ./icebreaker.py --debug --flash lxbuildenv: v2020.6.1.1 (run ./icebreaker.py --lx-help for help) Traceback (most recent call last): File "/Users/jamesmeech/Desktop/Casino/icebreaker-litex-examples/soc/./icebreaker.py", line 35, in <module> from litex_boards.platforms.icebreaker import Platform, break_off_pmod File "/Users/jamesmeech/Desktop/Casino/icebreaker-litex-examples/soc/deps/litex-boards/litex_boards/__init__.py", line 70, in <module> t = importlib.import_module(f"litex_boards.targets.{target}") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/Cellar/python@3.11/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/jamesmeech/Desktop/Casino/icebreaker-litex-examples/soc/deps/litex-boards/litex_boards/targets/numato_aller.py", line 28, in <module> from litepcie.phy.s7pciephy import S7PCIEPHY File "/Users/jamesmeech/Desktop/Casino/Enjoy_Digital/litepcie/litepcie/phy/s7pciephy.py", line 22, in <module> class S7PCIEPHY(LiteXModule): ^^^^^^^^^^^ NameError: name 'LiteXModule' is not defined

What is the best way to fix this?

JamesTimothyMeech commented 1 year ago

I have LiteX installed and working for another project. Would it be possible to build the SoC using my current working LiteX installation somehow?

JamesTimothyMeech commented 1 year ago

I had to fix this by running sudo ./icebreaker.py --debug --flash which is strange because I normally run LiteX without sudo