Altera_Forum
Honored Contributor
16 years agoUsing np_pio and other stuff in custom program
Hello,
I've read Philipp Lutz's tutorial and his code for the drivers for altera de2 board. I saw that he used np_pio struct and stuff from other .h, like asm/io.h. I'm a newbie trying to understand how to develop on ucLinux. I want to make a program that uses the same stuff he included in his. How would I do that? In other words, I've read nios wiki tutorial on making my own program (http://www.nioswiki.com/operatingsystems/uclinux/compilehello) and now I want to do more complex. I made a little program that lights up the red leds in my board using the base address as a pointer initializer, which is a clumsy way to do that. I tried to compile Lutz's stuff but got lots of errors, because nios2-linux-uclibc-gcc includes from opt/nios2/include, when I seemingly need to include from uclinux/nios2-linux/linux-2.6/include. So, how do I make a program that uses na_* addresses described uclinux/nios2-linux/uClinux-dist/linux-2.6.x/include/asm/nios.h to instiantiate np_pio structs?