Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
公告
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
21615 讨论

DE10-Nano - Blink LED by writing to a file in Linux.

zangman
新分销商 I
2,331 次查看

I followed this tutorial and was successfully able to interact with the FPGA from linux on the HPS using a C program. I was able to write a simple verilog design that shows patterns on the LEDs which change depending on the number that's written to the memory location using a C program.

I would now like to take this one step further and have this memory location accessible from a file handle located in the linux file system. So that I can do something like this:

 

echo 1 > /dev/fpga_led_pattern

 

Where do I begin if I want to do something like this? Do I need to learn device trees to be able to do something like this?

0 项奖励
2 回复数
EBERLAZARE_I_Intel
2,311 次查看

Hi,


You could check out the Linux tutorial below on Cyclone V, very useful:

https://ftp.intel.com/Public/Pub/fpgaup/pub/Intel_Material/17.0/Tutorials/Linux_On_DE_Series_Boards.pdf


Other than that, you could check out rocketboards on topics such as Device Tree generation, U Boot Compilation etc.:

https://rocketboards.org/foswiki/Main/GettingStarted


0 项奖励
zangman
新分销商 I
2,300 次查看

Thank you! I realize I will need to build a kernel module to be able to achieve this. There's a very detailed explanation of this on this site, so all good for now. Thank you!

 

0 项奖励
回复