Altera_Forum
Honored Contributor
16 years agoProblems getting GPIO Interface drivers compiled
Hey all,
So I'm making some pretty good progress on my board and learning a ton but I've hit a major road block I'm hoping you can help with... I'm using the DE2_70_NET project for the DE2-70 board found in the demonstrations folder of the Terasic provided CD. The project has a bunch of "PIO (Parallel I/O)" components for things like switches, LEDs, buttons, and an I2C bus (connected to a Wolfson audio chip). I'm trying to get the I2C driver working in an attempt to begin talking to the audio chip. I'm loosely following instructions found at http://www.nioswiki.com/gpio but the instructions are for a special component, a different development board, and aren't really instructions at all and are more like someone's posted posted files and a few words saying 'here you figure it out'. Not very helpful. So without dealing with the proprietary GPIO component there, I tried adding the driver for "GPIO Interface" in the Kernel Config: Processor Type and Features --> GPIO Interface. However when I compile it keeps stopping with an error on compilation of config.c saying:/home/todd/nios2-linux/linux-2.6/arch/nios2/kernel/config.c: In function `nios2_gpio_init':
/home/todd/nios2-linux/linux-2.6/arch/nios2/kernel/config.c:104: error: `na_gpio_0' undeclared (first use in this function)
/home/todd/nios2-linux/linux-2.6/arch/nios2/kernel/config.c:104: error: (Each undeclared identifier is reported only once
/home/todd/nios2-linux/linux-2.6/arch/nios2/kernel/config.c:104: error: for each function it appears in.)
make: *** Error 1
make: *** Error 2 I even went so far as to add a SOPC builder component called 'gpio_0' and it still fails compilation. Am I missing something? How does one properly compile a kernel with the standard GPIO Interface enabled in the kernel config? Do all of my GPIO pins in my design go through a single SOPC builder component like in the example: http://www.nioswiki.com/gpio ? Or can I use that same driver for each of my GPIO components? Thanks! Todd