- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am currently using the Nios II SBT to create both a user-managed BSP and accompanying application through the command line. Both the BSP and application can be successfully built using the resulting Makefiles.
For debug, I am importing both into a Nios II Eclipse IDE-managed project. Once imported the previously generated .elf can be run on my platform and works as expected. I can also clean and rebuild both the BSP and application from the IDE with no issue.
However, when I try to use any of the IDE indexer functionality (like right clicking a function and moving to its declaration), it does not work. The source files for the application are not in the application's directory and are referenced in the application's Makefile as instructed with the "--src-rdir" switch. I can see the files used to generate the .elf in the drop down menu of the imported .elf.
Is there something extra I need to do to get the indexer working with remote source files for an imported application?
Interesting things I have noticed:
1. Some of the header files are missing in the .elf's drop down menu showing the sources used to build it.
2. When running "Index -> Create Parser Log File" on my main function that gets called by os_init.c, I can see a list of "Unresolved includes (from headers in index)", which even includes the header files that are included in the .elf source list.
3. In the Parser Log File, I do see an indication that you can include more search path using a -I switch somewhere, but have not been able to figure out where I am supposed to put my source path in the IDE to get my source to show up in the list of included directories.
All help is appreciated!
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for posting in Intel community forum, hope all is well and apologies for the delayed in response.
Just a note, unfortunately for Nios II product it has been deprecated and would advise to move NiosV instead. More details can be found in the link below:
May I know which version of Quartus and Nios II IDE you are using? Also which OS you are having?
Would recommend perhaps to try add the External Source Folder as a Linked Folder:
- Right-click the Application project → New → Folder
- Choose: Advanced → Link to alternate location in filesystem
- Browse to the external source directory you used with --src-rdir
- Click Finish
Note: once linker are added it is good to rebuild the index, Go to Project → C/C++ Index → Rebuild
Best Wishes
BB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @BoonBengT_Intel,
I am using:
Quartus Prime Pro 19.3.0
Eclipse Mars.2 Release (4.5.2)
OS Ubuntu 20.04.5 LTS
Adding the link folder did fix the unresolved links. Is there some way to do this from the command line so that when I initially set up the application project using the Nios II SBT the source will automatically be linked?
Also, I am also still noticing that the .elf references are still leaving out certain header files, even with the linked folder. For example, I have certain headers that get sucked in with their associated C file, but others do not. I have not been able to determine any distinguishing characteristic that would cause this between the different headers. This is not breaking the indexer, but this has lead to other issues such as the IDE not realizing a rebuild is necessary when the missing headers get changed. Is there any reason that headers would be missed or ignored?
Thanks,
Devin Marzullo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @DevinMarzullo,
Good to know that the linked folder works, as for setting this up in the project side would perhaps recommend perhaps writing a post-generation steps in the .project to insert the <linkedResources> tag for your external folder. That should do it.
As for the missing .elf references, suspecting GCC may not have seen them as they are not in the dependency tree. Maybe you can add them into the indexer to see if that helps:
- Open up the project properties --> C/C++ General --> Paths and Symbols --> Includes tab --> Add the missing header paths and mark them as exported if needed.
Hope that clarifies
Best Wishes
BB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @BoonBengT_Intel,
The "Paths and Symbols" tab always seems to crash the properties window in this version of the IDE. If a .c file is shown in the dependency tree and its associated .h file is in the same path, is there any reason why this would be missed when building the reference tree?
Thanks,
Devin Marzullo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @DevinMarzullo,
There maybe possibilities that even if the .c files appears in the dependency tree, the association to .h files could be still missing due to some unknown reason like indexing scope hitting a limit, some project settings are not matching or file system links/symbolic paths inconsistencies.
Since the "Paths and Symbols" tab may have some inconvenient behavior, perhaps you can try editing the .cproject directly to add the include path under <entry> tags manually.
Best Wishes
BB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @DevinMarzullo,
Greetings, just checking in to see if there is any further doubts in regards to this matter.
Hope your doubts have been clarified.
Best Wishes
BB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @BoonBengT_Intel,
Your answers have gotten me as far as I am willing to go right now. Thanks for the responses!
Regards,
Devin Marzullo

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page