Showing results for 
Show  only  | Search instead for 
Did you mean: 
Registered: ‎10-19-2019

Petalinux, can't access devices

Hi, thank you for reading me

I've tried, like many I suppose, to create a custom driver. Just a basic one for learning purpose (I'm actually more a hardware than a software designer). Subject is about a driver that allows the use to control a bunch of leds.


I'm working with 2018.3 design tools


On the hardware I have a Axi GPIO IP, plus a zynq processor.

On the software I have a project builded with petalinux tools plus a driver that I've created using the default template provided when using the

petalinux-create -t module ... command

I modified the driver template and, of course my user device tree (see attached)

On the console everything looks okay to me, the kernel is probing for hardware and found my IP with the correct base physical address.





Now, If we check in the /dev/ repository the device I created is there with the name of "my device"




And same thing in the /sys/class, I have a class caled "myclass" with "mydevice" in it





with a cat /proc/devices I finally check that the device has been registered as a character device




At that point it seems to me that everything is ok since so i tried the following command to test my driver,

echo '1' > /dev/mydevice

But this error message fire :



Now, I do understand that this approach is definitly not the fastest one to get the job done (knwing that a UIO generic driver is embedded to control gpios) But I'd like to understand the entire process of making a driver.

Does anyone have a idea on this ?

Please, find attached my device tree and the custom driver I've made. Any comments would be appreciated


0 Kudos
0 Replies