Wednesday, May 23rd 2018, 8:58am UTC+2

You are not logged in.

  • Login
  • Register

Dear visitor, welcome to SEGGER Forum. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.



Date of registration: May 16th 2012

Posts: 5


Tuesday, May 22nd 2012, 10:55pm

Floating point emulation library and multitasking

My question is related to the embOS and IAR C/C++ for ARM compiler and their handling of the floating-point arithmetic emulation on a CPU without floating point coprocessor.

My application uses Cortex-M3 (NXP LPC1788 ) so I have no VFP. I use Embedded Artists eval board for now.

Should I be concerned with multitasking affecting somehow the floating point emulation library?
Are there any global variables used by the f-p library and if so, where are they stored?

I have a previous experience using floating-point emulator library under uCOS by Micrium with Borland and Paradigm C/C++ compilers based on the project using an older clone of 80186 microcontroller and we had to solve a problem with floating point library being not os-aware and
putting some global variables at the end of the main code stack. FP library was initialized once at the program start, before the os was started. Then, after the multitasking was running and the task wanted to use floating point library, the code was not able to access previously stored f-p library variables because the stack was switched from main code task to the private task stackā€¦

Will we have to deal with similar issues with embOS and IAR compilers for ARM?

I checked the documents available in IAR Workbench but could not find any info related to floating point library reentrancy...



Super Moderator

Date of registration: Nov 14th 2007

Posts: 271


Wednesday, May 23rd 2012, 3:26pm


I just tested it with an embOS project and IAR and IAR doesn't use global variables for the software floating point emulation, so they are reentrant.
You can use embOS with IAR and software floating point emulation without any problems.

Best regards,