- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am building an example project for Nios II soft core processor. The example project is board_diag , which seems to show how to interface with peripherals using Nios II processor. I couldn't find documentation that would explain all the custom functions that are out there to use with Nios II processor so going of example code (would appreciate if someone knows/can share links to programming guide for Nios).
Anyway, when building example code project compiler gets stuck at building newlib for a smallc C library. It is pretty consistent with getting stuck at 27%. See image attached. If I hit cancel and then build the bsp project again, the build process happens quickly. However, when I go to build actual project I get an error that getc and sscanf functions are undefined. I try fixing it by manual adding path to the libraries Properties -> C/C++ General -> Paths and Symbols -> Add then I add path. Anyway the error is still there when building the project. I am out of ideas. Any suggestions on how to resolve this issue?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
- Have you enabled both the "Enable Small C library" and the "Enable Lightweight Device Driver API" option? try to disable and recompile.
- scanf/sscanf is not supported in small C library. Change it from the BSP settings and try.
Check below link for more information on the error
Few useful links
https://www.intel.com/content/dam/www/programmable/us/en/pdfs/literature/tt/tt_my_first_nios_sw.pdf
https://www.intel.com/content/dam/www/programmable/us/en/pdfs/literature/ug/ug_embedded_ip.pdf
Regards
Anand
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Anand,
I enabled Reduced device drivers and small C library. If I don't do that, I get error message that I am out of memory. I am using 40960 bytes of memory.
What else I discovered yesterday, is if I redo, start new application, it works eventually. It too me over 50 minutes to build BSP package. It obviously should not take that long. Why is it taking so long? Are there any settings? Is there an issue with Nios II compiler that result in a large footprint?
--Alex
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
As for compilation time you can add precompiled standard libraries in the Build settings, or chage settings of re-build/clean by excluding compiled libraries
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Alex,
Good to know that it works after recreating the eclipse project.
Try the suggestion given by @dsmirnov.
It also dependent on tool chain version for faster build times also run with administrator rights which may make it run faster.
Regards
Anand
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

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