Nios® II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.
12435 Discussions

include path to header files from bsp

Honored Contributor II



I've got a question: 


I created a NIOS II application with BSP from the Micro C/OS II hello-template using the the eclipse SBT.  

My problem is that i always have to write the complete relative path when i for example want to include  

the generated system-header file (system.h) into a file of my application folder for some reason. 


shouldn't it be possible just to write# include "system.h" instead of# include "../project_name_bsp/system.h" , since this file is part of the BSP? 

I already saw examples where they included system.h and other device-driver-headers without writing the whole relative path each time. 


Did i missed something? Do i have to adapt something in the bsp settings? Cleaning the project and re-generating the BSP did not change anything. 

Thanks in advance 


0 Kudos
3 Replies
Honored Contributor II

It is possible, yes. 


First thing to try is: 


#include <system.h> 


Noting the <> rather than "". This sometimes makes a difference. 


The second thing is to make sure your BSP project is open and correctly referenced by the application project. If you right click on your application project in "project explorer" and select "Properties". Under the "Project References" tab you should see a list of all projects currently in your workspace. Make sure there is a checked box next to the BSP project. Apply any changes and close the properties window. Next right click on your application project again, this time going to "Index->Rebuild". This will rebuild the index of files. 


Having done those two things I've had no issues having Eclipse detect the header files in the BSP folder - i.e. the full relative path shouldn't be needed.
Honored Contributor II



The box beside the BSP was actually not checked. Thank you very much, I really appreciate!  





I was looking at the same issue and this was the problem.

I wonder why it is necessary to have to go and select the BSP as it was selected during the project creation.

Should such a setting not have been done automatically?


I am looking at the 2018.1 SDK version


Br Mike