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

Simple PIO application..

Altera_Forum
Honored Contributor II
1,101 Views

I'm using the Cyclone 1c12 Evaluation board, and I have linux running on it (either the orginal version or a version I compiled), and I see the example program for lighting up the 10 user leds, but I was wondering how to get an application like that working while running linux? I have a simple project that needs PIO acces and FTP access. 

 

Thanks in advance!
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
326 Views

There is another example driver for PIO buttons, which can be read by applications. You can start from that driver and implement the PIO LED as a character device, so that applications can write a char to it (you need to implement the write operation for LED, while what we implemented for buttons is the read operation). 

 

Another way is to write the PIO regs directly from your application. This is not a clean solution, but simple and fast. Of course this is only possible under uClinux.
0 Kudos
Altera_Forum
Honored Contributor II
326 Views

Thank you, I wasnt sure that uClinux would allow me to directly access the hardware registers. Thats good news, I dont need a driver, only one application will be accesing this hardware at one time. Thanks.

0 Kudos
Reply