2019-01-10 12:44 AM
Hello!
Wonder if I can get compile the GNU Scientific Library for STM32? I need to cross compile GNU Scientific Library for STM32 before I can use it in my library. But how can I do that ?
I'm using TrueSTUDIO on Linux and also F401RE Nucleo.
I need a better linear algebra library than the built in CMSIS library.
2019-01-10 01:29 AM
I never tried - Microcontrollers are the impersonated cost optimization, so I never came upon such a use case. But don't see a reason why it should not work. The source code for GNU projects is usually available.
However, besides of probable dependencies to to other libs (at least clib), I expect an abysmal performance compared to x86 compatibles and Cortex A processors.
2019-01-10 01:42 AM
I need to cross compile GSL for the CPU of F401RE first. But how can I do that ?
2019-01-10 02:21 AM
Microcontroller IDEs like TrueStudio are implicitly cross development tools.
You would need to fetch the GSL source code (your favourite search engine should tell you where), and add it to your F401 project.
Perhaps here: https://www.gnu.org/software/gsl/ and here: http://mirror.inode.at/gnu/gsl/
I would make it a separate library project, but this is a matter of taste.
As said, I'm not sure about dependencies, and sizes. Perhaps you can extract the parts you need, and drop the rest.
2019-01-10 11:53 AM
Quick look at the GSL manual PDF:
All the functions using 32 bit float or 32 bit integers are the embedded non linux friendly calculation world. Even in android world, HW drivers usually refrain to use float (or double) and use actually a Q32 fractional bit structure: 32 bit for integer, and 32 bit fractional (1/2 1/4 1/8 1/16 1/32k) to remain energy and time efficient at "good enough" precision.
2019-01-10 10:21 PM
One can sacrifice performance for precision. Even old 8 Bit computer running just BASIC interpreters had floating point numbers and calculations.
But this depends on the project requirements, and probably needs some preinvestigations.