Linux and Quartus Programming of FPGA

Hi,

I’m running a custom version of Ubuntu 16.04 on my Arria 10 board. I wanted to begin developing on the FPGA, and tried to make a simple LED blinking program which I then flashed onto the FPGA through the Quartus programmer. In doing so I found that my minicom terminal/linux always freezes. After some reading I found a number of possible bugs - memory usage of the FPGA and HPS overlap, disabling some reset setting in the HPS, etc. Which avenue(s) would be worth exploring? Is there a direct answer for this error?

Thank you,

1 Like

Hi @purusho2

Can you provide more details of your project?

  • How are you booting the HPS?
  • What are your different boot stages?
  • What do you mean by a LED blinking program? Do you mean HW on the FPGA as GPIO to drive an LED?

Hi,

  1. I am booting through an external SD card on which I have installed the Ubuntu 16.04 root file system. I ended up using the preexisting kernel that came with Angstrom and had success in launching.

  2. My boot process, from my understanding, consists of the 2 stages of the bootloader (in this case the pre-loader and then U-Boot), followed by the launch of the kernel. I used the preexisting boot flow.

  3. And yes as GPIO to drive the LED. As a preliminary step I wanted to program the FPGA to run a simple LED program while having Linux run smoothly on the HPS. I’ve recently found that this will not be as simple as configuring the two components separately. Rather, I believe the answer lies in configuring Qsys and having the HPS and FPGA work together. I am currently in the process of trying this method so I am not 100% sure about this strategy.

Hi there!

Indeed, you need to go through the Qsys avenue, specially if you are changing the memory map of the system, like for instance, adding an extra GPIO module to be able to drive your LED. Qsys does produce certain output files that the rest of the tools then use to for instance, generate your pre-loeader with the appropriate configuration, and to generate the DTB with the correct data.

For proof-of-concept purposes though, you could potentially add the module in such a way that you don’t upset the rest of the system, and use a low level mechanism like mmap/devmem to access your GPIO.

However I reckon you last posted 22 days ago, sorry about my late reply, I would be keen to know how are you getting along!

Cheers!