Sorry, you need to enable JavaScript to visit this website.

which Tutorial for Linux PL access

Unsolved
8 posts / 0 new
MaxPohl's picture
MaxPohl
Junior(0)
which Tutorial for Linux PL access

Hi,
i just worked trought the beginner ZedBoard Vivado Workshop, now i know how to access GPIO Ports via bare metal applications.
But i want to use Linux as OS, do you know a good beginner Tutorial about the same stuff for Linux? I want to access Switches/LEDs and a SPI Device from Linux.

Thanks a lot

fletch's picture
fletch
Moderator(15)
Have you already looked at
MaxPohl's picture
MaxPohl
Junior(0)
Thanks for your quick answer,

Thanks for your quick answer, ich just tried to work through that worksphop but it was not very helpful. I dont have found any of the mentioned source files.

TroutChaser's picture
TroutChaser
Moderator(18)
You might want to explore

You might want to explore using the Linux SysFs function to access the GPIO ports and possiblly (have not tried it) the SPI ports.
 
While the Implementing Linux on the Zynq®-7000 All Programmable SoC (ISE 14.2) Speedway in the ZedBoard Training and Videos section http://zedboard.org/support/trainings-and-videos  is dated it does have instructions in Lab 3_1 on using SysFs to read and write GPIOs within Linux.
 
Here are a couple of links that might be worth your time as well:
 
http://www.wiki.xilinx.com/Linux+GPIO+Driver
 
http://www.wiki.xilinx.com/GPIO+User+Space+App
 
http://www.wiki.xilinx.com/Linux+SPI+Driver
 
-Gary

MaxPohl's picture
MaxPohl
Junior(0)
Thanks

Thanks for you links,
the GPIO access over sysfs is really simple and works fine, thanks for that.

MaxPohl's picture
MaxPohl
Junior(0)
another question

Now i want to go a little bit further with my zynq design.
I created my own ip core on the fpga, so now i need a way to comunicate with that ip from my linux system. i read that there are severals ways to do this (UIO,loadable kernel modules/dev/mem/sysfs etc.) but which one is the fastest and best one? i know that petalinux can create and include loadable kernel modules but i dont found any good documentation about that function and how it works.
Could you show me a good way to solve this basic problem to communicate between pl and ps. with a baremetall application this is so easy why not for linux....

thanks

TroutChaser's picture
TroutChaser
Moderator(18)
It looks like you got a

It looks like you got a pretty through response to your post on the Xilinx Embedded Linux community forum:
 
http://forums.xilinx.com/t5/Embedded-Linux/Petalinux-loadable-Kernel-Mod...
 
Posting the link so that others can read as well.
 
-Gary

MaxPohl's picture
MaxPohl
Junior(0)
Thank you

Thank you for that!!!