I was trying to add project root directory to include search path in Project > Properties > Nios II Application Paths > Application include directories.
(This is needed in case Project/somedir/file.c needs to include Project/file.h using #include "file.h" instead of #include "../file.h")
When I select current project it is converted to relative path and added as "./", which adds "-I./" switch to compilation command.
This breaks compilation because gcc does accept "-I./" - the correct syntax should be "-I." without slash.
The issue can be solved by manually removing the slash in APP_INCLUDE_DIRS in the Makefile.
IMO, looks like EDS bug.
Thank you for posting in Intel community forum, hope this message find you well.
Much appreciated your help in pointing this out to us, we would surely look into this and apologies for the inconvenient faced.
Further clarification on the situation, do you mind to share with us what quartus version that you faced the problem in? And after adding the 'Application include directories', I presume that the Application library directories and Library name are also being added yes? If possible, it would be a great help to get a screenshot of the paths added from your end to investigate further.
I'm using Quartus 18.1 on Windows.
Application library directories and Library name are not added since the issue I'm describing is not related to library (I'm not using libraries at all, except, of course the BSP) rather than compiling C sources inside the same NIOS application project.
In the attached screenshots you can see I added top-level application project directory (called Nios) to include search paths.
Despite "-I./" being passed to gcc the file Nios/Drivers/gps.c cannot include Nios/logger.h.
As I said above, manually changing APP_INCLUDE_DIRS from "./" to "." in the Makefile fixes the compilation.
Apologies for the late response and noted with thanks on the details of the issues.
This might be a bug for an older version of Nios, allow us to confirm if issues are still persisting in the newer version, and will files a bug to the development team to ensure this is worked on.
As well as creating a knowledge base article for this workaround mentioned.
Will proceed to close this thread as no further clarification, if there is still any thing that we can help with please do post a response in the next 15 days to allow me to continue to support you. After 15 days, this thread will be transitioned to community support