Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++

include a selfwritten driver

Altera_Forum
Honored Contributor II
1,338 Views

Hello again, 

 

I just got another problem :) I have got a selfwritten driver, which is located at nios-linux/linux-2.6/drivers/misc/lcd_driver.cpp & .h (it works - I can put strings on the lcd). 

 

Now i want to include the lcd in a selfwritten userprogram, but there i don't know how to include this driver.  

It keeps telling me, @line 22 lcd_driver.h No such file or directory 

 

Is it possible to include a driver so i can build a userprogram in the zImage? What did I do wrong, what should i do to include it? 

 

Thx in advance
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
612 Views

You don't usually access a driver directly from a program (like including the header). You create a file system node under /dev for the device and write to it as a character device. Assuming you implemented your driver as a character device, you can add it to vendors/Altera/nios2/device_table.txt (or whatever your vendor directory is). Say you make /dev/lcd, then you should be able to `echo abcd>/dev/lcd` and have that show up. Or open the file from a program and write to it.

0 Kudos
Altera_Forum
Honored Contributor II
612 Views

http://file1.npage.de/000943/23/bilder/smiley_emoticons_doh.gif that would explain everything, ill try that thanks :)

0 Kudos
Altera_Forum
Honored Contributor II
612 Views

good news, its working :D 

 

but now i'm curious. I've got some methods printXY(string,x,y) for example. is it even possible to get to these methods?
0 Kudos
Reply