Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
2,489 Views

Nios II Eclipse stuck while compiling newlib for a smallc C library

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?

0 Kudos
5 Replies
Highlighted
41 Views

Highlighted
Beginner
41 Views

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.

settings.PNGoverflow.PNG

 

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

0 Kudos
Highlighted
Novice
41 Views

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

 

0 Kudos
Highlighted
41 Views

​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

0 Kudos
Highlighted
Beginner
41 Views

Thank you for your suggestions @dsmirnov​  and @Anand​ . I just couldn't find where in Build settings I can add precompiled libraries or re-build/clean by excluding compiled libraries.

0 Kudos