2025-11-28 6:36 AM - edited 2025-11-28 6:40 AM
I am working on a simple mp3 player project and have spent a few days on the Spirit library, as offered by ST.
This comes in a binary (.a) form only lib_mp3decoder_cortex_m4_v2.2.0.a and has apparently been built for soft floats, using some weird mode where they drive the FPU directly - the "VFP reggister arguments" thing. My project uses the FPU for a lot of stuff, and since you apparently cannot mix these floating modes at link time, I get these errors

Searching online finds a 2021 reply from ST on same topic, where ST say the Spirit company no longer exists so they can't help. But the website is still there, so I emailed them. I got a reply, surprisingly:
They don't support users, so I need to contact ST, to which I replied that I am not a car manufacturer, and I am happy to give them some money for a cortex-m4 lib which is actually usable :)
Lots of people have been around this. I have a hardware float compiler setting but this mp3 lib uses something different. One poster suggests "The error message indicates that at least part of your system is using soft-float ABI."
Claude suggests a compatibility mode, for the whole project, whereby float parameters are passed as integers, which "may" be compatible. Problem is, I use hard floats in lots of places, including a custom-rebuilt libc.a stdlib library which I spent months on, all extensively tested...
I tried to compile my .c file (the one which calls this lib) with soft floats, via some compiler command line spec. but this does not work. On the command line (GCC) I see -mfpu=fpv4-sp-d16 -mfloat-abi=hard and this is even if I put -mfloat-abi=softfp in the .c file properties / compiler flags. Someone did say this lib does weird float stuff. The doc says nothing about it.
Have there been any developments on this? It is silly to offer such a library for "cortex-m4" where most people will be looking to use hardware floats.
I also need the doc of the structure TSpiritMP3Decoder. It is carefully missing from all your documentation, which seems to be for some "demo" version of the Spirit lib.
These are my MCU settings
2025-11-28 7:24 AM - edited 2025-11-28 7:45 AM
Similar topics:
Spirit MP3 Decoder support for hardware float
Could you release the MP3 decoder library with the hard float ABI?
STM32f429 and MP3 Decoder spirit
By reading an internal discussion (internal ticket refence 105443) it seems we don't have the source code of that library. I think MP3 spirit won't be released with HW float support as we couldn't compile it with FPU option.
2025-11-28 8:46 AM - edited 2025-11-28 8:51 AM
This is the email today from Spirit
From: Alexander Kravchenko <Kravchenko@videomost.com>
Date: Fri, 28 Nov 2025 11:06:53 +0000
Dear Peter-
Thank you for the query.
Please contact STMicroelectronics as we do not directly support their customers/users.
Thank you for understanding.
Kind regards,
Alex Kravchenko
I would be amazed that ST would distribute something this "big" and not have the source code. Especially as the 32F4xx have hardware single floats, which most people doing "maths" will be using in the "hard" mode.
I already saw those other threads. Obviously the Spirit company does exist, as the poster(s) pointed out.
In case ST wants to dig into this, I posted some extra info here
https://www.eevblog.com/forum/microcontrollers/simplest-way-to-do-sound-generation-from-an-mp3-file/msg6116673/#msg6116673
The funny thing appears to be that Spirit code does use the FPU but they call it directly, while building their .a library under the pretence that they use soft floats (i.e. do not use the FPU). This is a real hack and I wonder why anybody would do this, and then label the finished lib as "cortex m4".
2025-11-28 9:30 AM
I made a audio player, WAV, flac and MP3;
For the MP3 I recommend minimp3, search on GitHub.
Working fine, math is float.
I looked at the STM lib also, spirit, but I couldn't use it.
You can find 3 or more MP3 decoder libs on GitHub
2025-11-28 1:02 PM
I am looking at minimp3 now too.
This Spirit mp3 decoder seems to be completely useless, given it is aimed at a chip family which mostly has hardware FP but it cannot be used with them. It also has deliberately incomplete documentation, referring to a "demo" version, whereas ST pass on a non-demo version, but with the crippled-version doc :)
2025-11-29 2:19 AM - edited 2025-11-29 2:27 AM
>This Spirit mp3 decoder seems to be completely useless
I came to the same conclusion.
+
I use this one: https://github.com/lieff/minimp3
(set to 32b output, as i write to an 32b-DAC )
+
maybe just look also on :
- helix decoder , or : https://github.com/pschatzmann/arduino-libhelix
- https://github.com/adafruit/Adafruit_MP3
2025-11-29 2:40 AM
@PHolt.1 wrote:This is a real hack and I wonder why anybody would do this, and then label the finished lib as "cortex m4".
Indeed.
Maybe came from some "optimisation" which worked for them in some internal project - but renders it useless to 3rd parties ... ?
2025-11-29 3:50 AM
I am still hacking away on minimp3, to achieve the simplest possible mp3 player, but in the meantime let me post this reply from Spirit:
Dear Peter-
SPIRIT certainly have not vanished or gone bust.
I guess ST simply followed and still follows geopolitical trends though SPIRIT is not on the sanctions list.
ST would need to apply to SPIRIT for engineering and the license extension.
ST would have to pay SPIRIT a NRE and the license extension fee in the total amount of several $10K's.
Would you be willing to pay such amount to SPIRIT instead of ST please?
Kind regards,
So yeah they are in Russia and ST dropped them due to that, probably...
2025-11-29 4:23 AM
It does still seem to be part of the X-CUBE-AUDIO pack:
@mƎALLEm So ST should either remove/replace it, or support it ?
2025-12-03 2:33 PM
I could do nothing with the Spirit mp3 player. Somebody happy to build his whole project with the weird float mode could use it.
I integrated the minimp3 player, and posted the source here
It works very well.