I designed my own component interfaced to avalon-MM. The location is: ...\proj\ip\... I also integrated it using sopc builder New Component function and directed the ip search path to ...\proj\ip\... directory. I wrote the driver functions component_regs.h, component.h, component.c, and put them into ...\proj\ip\Inc, ...\proj\ip\HAL\Inc, ...\proj\ip\HAL\Src. Then I wrote my test project using Nios II BSP. When built, an error appearred:"Can't find the component.h". I want to know where or how to direct the software to find the driver files for any project ?
You need a <component>_sw.tcl script file.Place it in the same directory as the SOPC Builder generated <component>_hw.tcl file Some of the information in this file is used to specify the c/c++ source files and the include files. It also specifies such things as whether the component is auto initialized at boot-up (you have to write the code in your driver to do that), the minimum compatability versions, etc. When generating a bsp, if you don't have this file for your component, it doesn't know where to look. Thus, your code will not be compiled into the bsp package. Either find one already on your computer and modify it, or search for more help on Altera's website regarding writing HAL drivers.