Microcontroller with FPU

Can someone suggest a microcontroller platform that has a built in floating-point-unit? Preferably small, inexpensive and easy to work with, well supported, plenty of libraries... I'm working on an astrolabe and there is a ton of floating point math involved calculating the positions of celestial objects.

A microcontroller at 16 MHz or 48MHz is not even near a normal computer. The microcontrollers are cheap and simple and don't have a FPU. I think you need for example a small Core i3 computer.

If not a lot of calculations are needed, then why do you need a FPU ? It is even possible to do Big Number on a Arduino Uno : Gammon Forum : Electronics : Microprocessors : Arbitrary precision (big number) library port for Arduino

The Arduino Due and Zero don't have an FPU. I don't know about the Arduino 101.

I think the Raspberry Pi has a ARM processor with hardware floating point, and I think the OS supports it.

The ARM Cortex-M4 and M7 have a FPU, but that is optional and sometimes only single precision.

How about this? I've never used one.

Orthis.

PaulRB:
How about this? I've never used one.

DrWizard:
Can someone suggest a microcontroller platform that has a built in floating-point-unit? Preferably small, inexpensive and easy to work with, well supported, plenty of libraries...

Overview of Dev Environment

Before going down the rabbit hole, you may wish to do some research to determine what code changes and syntax are required to support the hardware FPU.
https://e2e.ti.com/support/microcontrollers/msp430/f/166/t/413420

Mouser USA
about $13

When one says 'a ton of FP calculations' I have to ask, "Are you far enough down the software development path to qualify that statement?" High clock uC (> 48MHz) may give you satisfactory FP single percision, maybe even double precision. But, maybe not. My caution would be that until you profile, you will not know for certain.

Ray

While not arduino you could try an mbed platform.

https://developer.mbed.org/platforms/

Robin

The TI Tiva Launchpads seem like an obvious choice. Cheap, and supported by "Energia", which is a fork of arduino for TI products.

Even the modest 8-bit 16MHz Arduino can do the math, albeit quite slowly. About 3100-4600 milliseconds to calculate the current direction and attitude of a celestial body. That's a long time to the user between the time they select a body and see the output.

None of the popular ARM based microcontrollers such as the Pi or Beagle seem to include a FPU, although it would be easy enough to include one since it is a SOC. Probably little or no demand to justify the extra cost. The Texas Instruments Tiva C TM4C1294NCPDT MCU on the 'Connected Launchpad' does contain an FPU according to TI's datasheet, but the compiler does not implement support for it, (Perhaps because so few ARM chips choose to include it?), assembly language is necessary to access it.

Nonetheless, with 32-bits at 120MHz, it will perform the calculations in about 115+ milliseconds, quick enough for the user not to notice the delay. At $20, I think it's a bargain for it's horsepower. It's just not a popular or well supported platform, and I've had only limited success at porting libraries from other platforms to it. Plus the board is a bit large-ish.

I've found a number of different chips that include FPUs, but haven't been able to find any boards featuring those chips, other than the Tiva C. The STM32F4xx series processors include a FPU, but all the hobbyist boards such as the Maple use the ST32F1xx series. I think I may end up using one of the maple clones as they also have enough bits and megahertz to grunt their way thru the math.

Thanks for the heads-up on the BigNumbers library! I don't think it's gonna solve this problem for me, but a good thing to have in my toolbox.

None of the popular ARM based microcontrollers such as the Pi or Beagle seem to include a FPU

Both the Pi (BCM2835/ARM1176JZFS) and BeagleBone (AM335x Cortex-A8) have hardware floating point. At that level of "ARM", I don't think it's optional. The A8 actually had two FPUs, a typical FPU, and the NEON SIMD engine.
I hear that some of the popular Unix implementations for these don't support Floating point HW (don't provide libraries that use it, don't save the CPU context in task switching, etc.)

The Texas Instruments Tiva C TM4C1294NCPDT MCU on the 'Connected Launchpad' does contain an FPU

As does the (cheaper) TM4C123GXL launchpad.

but the compiler does not implement support for it

Which compiler is that? There are at least three that are common on the TI ARM Launchpads (CCS from TI, Keil, and gcc.) Energia seems to support HW floating point at the moment, judging by the compile command:
l

m4f/bin/arm-none-eabi-gcc -c -Os -Wall -ffunction-sections -fdata-sections -mthumb -mcpu=cortex-m4 -mfloat-abi=hard ...

Since that's using gcc, it presumably means that gcc includes support for the HW FPU, and enabling it on other chips that have the (standard) ARM FP HW should not be too difficult.)

Note that many of these are single-precision HWFP. I'm not sure what happens if you try to use double precision math with single precision HW; it would probably take another set of libraries to optimize that, and I don't know whether they exist. C tends to default to double precision, so if you want to use single-precision, you have to use different function calls (sinf() instead of sin(), etc.)

DrWizard:
. . . None of the popular ARM based microcontrollers such as the Pi or Beagle seem to include a FPU, . . .

westfw:
Both the Pi (BCM2835/ARM1176JZFS) and BeagleBone (AM335x Cortex-A8) have hardware floating point. At that level of "ARM", I don't think it's optional. . . .

Some of the confusion with the Pi is (was?) that for the ARMv6 core used in the Pi 1 and the Pi Zero, there is not an official Debian Linux hardware floating point (ArmHF) version. Most Pi users run under Raspbian which is an unofficial port of ArmHF targetting ARMv6 and most included libraries and packages from the Raspbian repository use the FPU. If one is running something other than Raspbian, one would have to check whether is was an ArmHF or ArmEL build.

When talking astronomy you definitely need double precision FPU (64bit). Also you write you are looking for a microcontroller..

You may try with

  1. pic32mz2048EFM or
  2. NavSpark board NavSpark : Arduino Compatible Development Board with GPS - NavSpark Store

The pic32mz2048EFM is supported by UECIDE or chipkit IDE (arduino "compatible") and the NavSpark board is also arduino "compatible", they say..
An advantage with NavSpark board is you get GPS and precise time (6ns jitter) what would be nice to have when doing astronomy..

Both the new teensies 3.5 and 3.6 come with an integrated FPU.
https://www.pjrc.com/store/teensy36.html
I still don't have one so I can't give any details.