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++
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
12748 Discussions

Documentation for C compiler/linker

Altera_Forum
Honored Contributor II
1,354 Views

Is there a good documentation available for Nios II compiler/linker tools, including section elaborating on details of floating point emulation library ? 

 

BTW - I am quite surprised the compiler does not understand C++ syntax, is there a way to replace standard C compiler with some C++ and keep the integration with the Nios II IDE ?
0 Kudos
6 Replies
Altera_Forum
Honored Contributor II
630 Views

All of the documentation, that you're interested in, can be browsed to from within the IDE (from the Help menu) or you can just point your browser at: 

 

<nios2_install>/documents/index.htm 

 

For the specific questions you have: 

 

1. Yes, the compiler supports C++. 

- Ecos is written using C++ and it is ported to Nios II and uses the identical GCC toolchain. 

- Be sure that your C++ code has a file extension of .cpp [perhaps, other extensions will work as well?] or (I think) the IDE won&#39;t handle it correctly. 

2. The floating point library details can likely be found in the documentation on newlib. 

 

Best of luck, 

 

- slacker
0 Kudos
Altera_Forum
Honored Contributor II
630 Views

Yes, after I wrote my question I could not believe my own words and I went back and find the C++ is activated when the file has extension other than c (ie. cpp, C, cc etc). 

 

I will search for some floating point emulation library documents where you pointed me to - thanks.
0 Kudos
Altera_Forum
Honored Contributor II
630 Views

 

--- Quote Start ---  

originally posted by pszemol@Apr 24 2006, 10:50 PM 

i will search for some floating point emulation library documents where you pointed me to - thanks. 

<div align='right'><{post_snapback}> (index.php?act=findpost&pid=14630) 

--- quote end ---  

 

--- Quote End ---  

Cannot find any details on floating point emulation library implementation under Nios II. 

Any help ?
0 Kudos
Altera_Forum
Honored Contributor II
630 Views

 

--- Quote Start ---  

originally posted by pszemol@Apr 25 2006, 01:42 PM 

cannot find any details on floating point emulation library implementation under nios ii. 

any help ? 

<div align='right'><{post_snapback}> (index.php?act=findpost&pid=14670) 

--- quote end ---  

 

--- Quote End ---  

 

 

Sure. There&#39;s some additional documentation on the math section of Newlib here (http://sourceware.org/newlib/libm.html). 

 

Do you need something at a lower-level. still, or is this good enough? Perhaps, some more digging on Newlib implementation specifics would yield the information you desire..?? 

 

Best Regards, 

 

- slacker
0 Kudos
Altera_Forum
Honored Contributor II
630 Views

 

--- Quote Start ---  

originally posted by slacker@Apr 25 2006, 06:19 PM 

do you need something at a lower-level. still, or is this good enough?  perhaps, some more digging on newlib implementation specifics would yield the information you desire..?? 

--- Quote End ---  

 

What I need to know is if I can use without any problems floating point library in a multitasking environment of the MicroC/OS-II operating system. 

 

I am using fp library in a limited way (log(), pow(), some of *, / + and -) and it looks to me like everything is fine until two tasks want to do same thing concurently. They all have their own data to work on separatelly, so it is no problem of sharing my program data, but it almosts looks like the math functions are not designed for the multitasking environment... 

 

I have found some worrying reference for the math emulation library for the Borland x86 compiler and I would like to know if something similar applies to the NiosII C/C++ compiler and if so, how to deal with it. http://www.micrium.com/downloads/appnotes/an1001.pdf (http://www.micrium.com/downloads/appnotes/an1001.pdf

 

Anybody has any experience with NiosII and multitasking of floating point emulation library ?
0 Kudos
Altera_Forum
Honored Contributor II
630 Views

 

--- Quote Start ---  

 

Anybody has any experience with NiosII and multitasking of floating point emulation library ? 

--- Quote End ---  

 

 

No, sorry.
0 Kudos
Reply