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

How and where does configtool find the *regs.h

Honored Contributor II

I'm working on a driver for Phillips PDIUSBD12 for eCos and Nios II. I've come to the point where I have to compile the driver and there are some errors. Configtool can't find the pdiusbd12_regs.h file that I have made. I lies in a directory called pdiusbd12/inc under components and sopc generates a system fine. Configtool finds all the other *regs.h files. How and where does configtool look for these files? 


On another subject: Has anyone made a driver for the SPI and PIO components? I need access to these in eCos and the eCos for Nios II doesn't provide the drivers. I might be an easy job writing them, but if anyone already has them finished and working it would have been nice to get them. 


-Ole Kristian Tørresen
0 Kudos
1 Reply
Honored Contributor II

The *_regs files are included by existing components by adding the required directory to the include path. For example in altera_avalon_uart.cdl you'll find: 


    cdl_option CYGPKG_ALTERA_AVALON_UART_CFLAGS_ADD {        display       "Additional compiler flags"        flavor        data        no_define        default_value { "-I'$(SOPC_KIT_NIOS2)'/components/altera_avalon_uart/inc -I$(PREFIX)/include/cyg/hal" }        description   "            This option modifies the set of compiler flags for            building the Altera Avalon UART driver.            These flags are used in addition            to the set of global flags."    } 


You just need to do the equivalent for your driver.
0 Kudos