Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12599 Discussions

Nios II Software Build Tools for Eclipse - c99 mode

Altera_Forum
Honored Contributor II
2,228 Views

Hi every one! 

 

I'm using Quartus 11.0 sp1 and Nios II Software Build Tools for Eclipse with DE2-70 Altera board. 

 

How can I configure "mingw nios ii gcc4" in eclipse to use the c99 mode? (I have other toolchains available in addition to MinGW NIOS II GCC4) 

 

I searched the web for this topic and I found results for "Eclipse CDT". The solution is to modify the flags under: 

 

Project Properties > C/C++ Build > Settings > GCC C Compiler > Miscellaneous and add -std=c99 

 

However I didn't find such configurations with the "Nios II Software Build Tools for Eclipse". 

 

I apologize if the question is dumb. I am still a newbie. 

 

I appreciate any help. 

 

Thanks in advance.
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
720 Views

Why do you need to explicitly specify -std=c99? 

gcc tends to support most of c99 without it. 

Specifying -std=c99 also removes some of the gcc builtins - like alloca(), which can only really be implemeted by the compiler.
0 Kudos
Altera_Forum
Honored Contributor II
720 Views

using the software build tools eclipse gui 

Right Click On Project Folder in the Project Explorer 

Select Properties 

Nios II Application Properties 

User Flags: -std=c99 

 

With software build tools sometimes setting -std=c99 in the GUI doesn't seem to stick :mad:. I never figured out why :confused:. What I did to make it stick was to edit the projects MAKEFILE directly by setting the APP_FLAGS_USER_FLAGS to include -std=c99 . 

 

using the makefile (direct method) 

 

search for app_cflags_user_flags  

 

app_cflags_user_flags := -std=c99 

 

legacy nios ii tools 

Right Click On Project Folder in the Project Explorer (aka NIOS II C/C++ Projects tab) 

Select Properties  

Select The C/C++ Build item 

Tool Settings Tab 

NIOS II Compiler-->General Folder 

Compiler Flags: -std=c99
0 Kudos
Altera_Forum
Honored Contributor II
720 Views

 

--- Quote Start ---  

using the software build tools eclipse gui 

Right Click On Project Folder in the Project Explorer 

Select Properties 

Nios II Application Properties 

User Flags: -std=c99 

 

With software build tools sometimes setting -std=c99 in the GUI doesn't seem to stick :mad:. I never figured out why :confused:. What I did to make it stick was to edit the projects MAKEFILE directly by setting the APP_FLAGS_USER_FLAGS to include -std=c99 . 

 

using the makefile (direct method) 

 

search for app_cflags_user_flags  

 

app_cflags_user_flags := -std=c99 

 

 

--- Quote End ---  

 

Yes, setting -std=c99 in the GUI doesn't seem to stick in Q13.1 

 

http://www.altera.com/support/kdb/solutions/rd10132014_789.html
0 Kudos
Reply