Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
20 years ago

How and where does configtool find the *regs.h

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

1 Reply

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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.