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++
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
12748 Discussions

Alternate location for HAL/inc include file

Altera_Forum
Honored Contributor II
1,187 Views

Greetings, 

 

We are defining a custom SOPC component and would like to put the include file normally found in HAL/inc/ in a different directory (this is the include file that defines the xxx_INSTANCE and xxx_INIT macros). We added the following lines to the component's class.ptf file: 

...  COMPONENT_BUILDER  {     SW_FILES     {        FILE { type = "HAL (HAL/inc/)";        filepath = "../../nios/dataflow/decifir.h"; }     }  } ... 

But the decifir.h file does not seem to be found after SOPC/GENERATE and rebuild of the system library. However, if we put the include file in it's expected HAL/inc/ location, then it does work correctly and the macros are properly expanded in alt_sys_init.c (it behaves as if the filepath directive is being ignored). 

 

What is the correct technique for relocating the HAL/inc/ include file elsewhere? 

 

BTW, the reason we want to do this is that some common Verilog code is packaged into different SOPC components, all of which share the same drivers and include files. Thus, putting any of those support files directly within any one particular component isn't really the clean thing to do. 

 

Thanks! 

-alan
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
429 Views

If I'm interpreting your question, correctly, you should take a look at adding an include path to your component.mk file. 

 

- slacker
0 Kudos
Altera_Forum
Honored Contributor II
429 Views

Thanks for the suggestion Slacker, and for your lightning-fast reply (within minutes) to my dilemma. I've spent most of today battling with the generation flow for alt_sys_init.c, but am finally throwing in the towel and will just put multiple copies of the same include file in the expected HAL/inc directory of each individual component (symbolic links don't even work). This is an ugly 'solution' and leaves me feeling weary, but seems to be the only way to get the xxx_INSTANCE and xxx_INIT macros to be included for expansion in alt_sys_init.c. I've also filed the question with Altera -- perhaps they will have some nicer suggestion. 

-alan
0 Kudos
Reply