Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run LiteX on ArtyA7 #11

Open
kmezynski opened this issue Apr 27, 2020 · 17 comments
Open

Run LiteX on ArtyA7 #11

kmezynski opened this issue Apr 27, 2020 · 17 comments
Assignees
Labels
team red @kmezynski @kacperchmiel97 team

Comments

@kmezynski
Copy link

  1. Go through Quick start guide from LiteX repo
  2. Run LiteX on ArtyA7 board
  3. Learn how LiteX attaches modules to Arty board (python script)
  4. Arrange next meeting for further instructions
@kmezynski kmezynski added the team red @kmezynski @kacperchmiel97 team label Apr 27, 2020
@kmezynski
Copy link
Author

We're ready for further instructions. We both managed to compile LiteX on Arty.
I couldn't only upload the bitstream via xc3sprog to ArtyA7 board. I got following error:

xc3sprog -c nexys4 top.bit
...
Could not open FTDI device (using libftdi): unable to fetch product description
Unable to access FTDI device with either libftdi or FTD2XX

@kacperchmiel97 was successful at this point.
We suspect problem is related to hardware... either board or my PC

@kgugala
Copy link
Contributor

kgugala commented Apr 28, 2020

@kmezynski the problem you have means that xc3sprog couldn't access the USB <-> serial converter on the board. This can be caused by many things:

  1. insufficient privileges (try sudo)
  2. the board was not connected (e.g. cable is bad). Try lsusb and check if you can see the board
  3. if you're using a virtual machine the USB device has to be forwarded to VM

as for the next steps there are a few things:

  1. run a system with video output (@rw1nkler please provide info about it)
  2. add simple GPIO controller to the system (to figure out how to do it)
  3. proceed with DMA integration

@rw1nkler
Copy link
Contributor

Hey, here you can find the repositories which will help you to prepare bitstream and Linux binaries with framebuffer support. This will allow you to observe the framebuffer memory on your screen - You should observe small penguin icon on your monitor if you connect it to the HDMI port of your expansion board

https://github.com/antmicro/linux-on-litex-vexriscv-build

  1. First, you should follow the instructions from: (install direnv, invoke make init)
    https://github.com/antmicro/linux-on-litex-vexriscv-build/blob/master/README.md

  2. Next, you can apply the patches for LiteX repositories, with the expansion board support:
    https://github.com/antmicro/linux-on-litex-vexriscv-build/tree/master/patches/arty_hdmi_expansion_board

@kmezynski
Copy link
Author

@kgugala Thank you for help, sudo worked perfectly!

@rw1nkler
Copy link
Contributor

rw1nkler commented May 6, 2020

Hey, what is the progress in this task? Have you managed to run the LiteX with Linux and framebuffer?

@kmezynski
Copy link
Author

@rw1nkler He've realised we hadn't picked up HDMI extension boards, could we arrange meeting?
On the other hand we managed to control GPIO, however we still have doubts about it and DMA. Some video conference would be kindly appreciated.

@rw1nkler
Copy link
Contributor

rw1nkler commented May 8, 2020

I've sent you e-mails about the next meeting

@rw1nkler
Copy link
Contributor

Have you run this HDMI example on the board?

@kacperchmiel97
Copy link

We have a few questions regarding the DMA integration and GPIO - would it be possible to arrange a short meeting?

@kgugala
Copy link
Contributor

kgugala commented May 20, 2020

Sure we can. In #13 (comment) proposed a date. Can we all meet then?

@kmezynski
Copy link
Author

kmezynski commented May 24, 2020

@rw1nkler @kgugala I managed to upload the bitstream according to the instruction described in repo. Unfortunately my monitor doesn't see HDMI signal from ArtyA7 extension board. Am I missing something? Details of my progress:

  • Before compiling litex I found these python packages were necessary to run make br/all command:
pip install git+https://github.com/litex-hub/pythondata-cpu-vexriscv.git
pip install git+https://github.com/litex-hub/pythondata-software-compiler_rt.git

To do so, python >=3.5 has to be set as default

sudo apt-get install python
sudo apt-get install python3
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 1
python --version
  • I've installed TFTP server according to this website.

  • I've changed PC IP address to 10.0.0.1/24
    ifconfig enp0s3 10.0.0.1/24

  • Suprisingly I had to install OpenOCD manually
    sudo apt-get install openocd

  • I changed ttyUSB0 and ttyUSB1 permission to read and write for other groups (must be repeated after reconnecting the board)
    sudo chmod o+rw /dev/ttyUSB0 /dev/ttyUSB1

@kgugala
Copy link
Contributor

kgugala commented May 25, 2020

did Linux on LiteX boot correctly?

@kmezynski
Copy link
Author

@kgugala I had no errors during the whole process.

@kgugala
Copy link
Contributor

kgugala commented May 26, 2020

do you have any other display to test on?

@kmezynski
Copy link
Author

@kgugala I don't have. I've checked both working HDMI ports on my monitor.

@rw1nkler
Copy link
Contributor

rw1nkler commented Jun 1, 2020

Please paste here the Linux booting log. You should have there information about framebuffer driver:

simple-framebuffer c8000000.framebuffer: framebuffer at 0xc8000000, 0x7e9000 bytes, mapped to 0x(ptrval)

@kmezynski
Copy link
Author

@rw1nkler After make apply-patches from repo I got following errors:

error: patch failed: litex/boards/platforms/arty.py:255
error: litex/boards/platforms/arty.py: patch does not apply
error: patch failed: litex/boards/targets/arty.py:28
error: litex/boards/targets/arty.py: patch does not apply

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team red @kmezynski @kacperchmiel97 team
Projects
None yet
Development

No branches or pull requests

5 participants