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++
12748 Discussions

how to write device driver under uClinux

Altera_Forum
Honored Contributor II
1,698 Views

if I add a device IP to SoPC,how can I write a driver to drive this device under uClinux?Who can help me?Thanks!

0 Kudos
7 Replies
Altera_Forum
Honored Contributor II
610 Views

 

--- Quote Start ---  

originally posted by hippo@Dec 25 2006, 09:24 PM 

please loot at, 

http://nioswiki.jot.com/wikihome/operating...duleprogarmming (http://nioswiki.jot.com/wikihome/operatingsystems/%c2%b5clinux/moduleprogarmming

<div align='right'><{post_snapback}> (index.php?act=findpost&pid=20215) 

--- quote end ---  

 

--- Quote End ---  

 

 

 

Hi hippo: 

I use microtronix uclinux,and I tried the example,after I download the kernel and filesystem to the board(stratix II EP2S60F1020C4),I run the application, it failed, the error is "open error:can&#39;t find hello". 

What&#39;s wrong with it?What could I do?
0 Kudos
Altera_Forum
Honored Contributor II
610 Views

 

--- Quote Start ---  

originally posted by wzl540+dec 26 2006, 05:48 am--><div class='quotetop'>quote (wzl540 @ dec 26 2006, 05:48 am)</div> 

--- quote start ---  

<!--quotebegin-hippo@Dec 25 2006, 09:24 PM 

please loot at, 

http://nioswiki.jot.com/wikihome/operating...duleprogarmming (http://nioswiki.jot.com/wikihome/operatingsystems/%c2%b5clinux/moduleprogarmming

<div align='right'><{post_snapback}> (index.php?act=findpost&pid=20215) 

--- quote end ---  

 

--- Quote End ---  

 

 

 

Hi hippo: 

I use microtronix uclinux,and I tried the example,after I download the kernel and filesystem to the board(stratix II EP2S60F1020C4),I run the application, it failed, the error is "open error:can&#39;t find hello". 

What&#39;s wrong with it?What could I do? 

<div align='right'><{post_snapback}> (index.php?act=findpost&pid=20219)</div> 

[/b] 

--- Quote End ---  

 

you haven&#39;t builded the filesystem again!!!
0 Kudos
Altera_Forum
Honored Contributor II
610 Views

TO_BE_DONE

0 Kudos
Altera_Forum
Honored Contributor II
610 Views

You should develope uClinux on a Linux PC. 

And don&#39;t mix-up kernel module and user apps, thought they all called hello.
0 Kudos
Altera_Forum
Honored Contributor II
610 Views

 

--- Quote Start ---  

originally posted by hippo@Dec 26 2006, 09:49 AM 

you should develope uclinux on a linux pc. 

and don&#39;t mix-up kernel module and user apps, thought they all called hello. 

<div align='right'><{post_snapback}> (index.php?act=findpost&pid=20225) 

--- quote end ---  

 

--- Quote End ---  

 

 

 

 

Hi hippo: 

I develop the nios under windows,using nios II IDE,and microtrnix uclinux.I use the hello driver programme in the web you gave,and do what it said,then I write an application to call the hello driver,it failed,the error is "can&#39;t find hello driver". 

if I call "dev/mem" driver which had existed,it succeed.  

why did I fail to add the hello driver module to uClinux?Is there anything else I need to do ?
0 Kudos
Altera_Forum
Honored Contributor II
610 Views

The hello module in the wiki does not support any open,read,write,close operationing functions. So you cannot do any operations on it. It is only a very simple module, with only init and exit. You should follow the book "Linux Device Driver" to get more examples. 

 

Microtronix stated "not for kernel development" in their guide. You should really move to Linux PC. You have to learn Linux before you can develope Nios2 uClinux. http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/smile.gif
0 Kudos
Reply