Jump to content
  • 0

Petalinux Kernel module


peelza

Question

Hi
I want to transfer data from PL to PS via DMA. I am using zedboard. I am using petalinux in the PS. i have created a module for the DMA called "axidma".  i have a header file in the module named axidma.h where i have defined some macros. axidma.h and axidma.c are in the same directory.
Now i want to use those macros in user space applicatiion but i cannot access them. I know it is possible by changing the makefile of the module but i am not an expert in makefiles so i dont know how to do that.
Any help will be appreciated

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

This is a very general Linux question about how kernel module compilation works, you might have better luck looking around some general linux forums.

I also don't know if I really understand your question. If you are just trying to use some macros you defined in a header for your kernel module in a program you are trying to compile in user space, just copy them over to another header and use them. If you are trying to access any variables or functions that are compiled into your module, you can't do that from user space. You can only access kernel resources (resources in your module are kernel resources) through system calls. You might need to do some research on kernel driver development, this is the book I learned on: https://www.amazon.com/Linux-Device-Drivers-Jonathan-Corbet/dp/0596005903/ref=sr_1_1?s=books&ie=UTF8&qid=1510103029&sr=1-1&keywords=linux+device+drivers . I believe it is available for free online. 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...