What do I need to do to be able to use complex numbers in my mcuxpresso project? I am setting up an interface right now to an AFE I have and I need to be able to calculate complex numbers.
I am currently using GCC to compile and it cannot find the complex.h header file.
Thanks,
Dennis
Hi
Complex is a new function in C99 standard. Newlib is a GNU C/C++library. It can support complex. But Redlib is NXP own (non-GNU) ISO C90 standard C library, with some C99 extensions. it doesn't support complex type and have no complex.h head file.
I suggest you read
If you search "complex.h" under MCUXpresso IDE install folder, you will find it.
Have a nice day,
Jun Zhang
Hi, i also want to use complex number in my code for frdm k64f board. I am using MCU expresso compiler. Should I also use NewlibNano. Do I have to use any header file inside the code to use complex numbers.
I would appreciate your response.
Thank you.
So for a customer using mcuxpresso IDE, mcuxpresso sdk and wanting to use complex numbers
What is our recommendation ?
What exactly needs to be changed in settings to get the best code size, performance, and maintain compatibility
If they are using a device like the LPC55S69 ?
Regards,
Dennis
Switch the project to newlib or newlibnano. How to do this is described in the document link provided by Jennie.
hint: it’s trivial
I'd suggest using newlibnano (which is a smaller version of the standard newlib, with a few features removed, but is a lot smaller code size). Also take a look at this