Can I use GNU Scientific Library with STM32?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
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.
STM32MP257FAK3 custom board with STM64-OS as operating system: https://github.com/DanielMartensson/STM64-Computer
- Labels:
-
STM32F4 Series
-
TrueSTUDIO
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2019-01-10 1: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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2019-01-10 1:42 AM
I need to cross compile GSL for the CPU of F401RE first. But how can I do that ?
STM32MP257FAK3 custom board with STM64-OS as operating system: https://github.com/DanielMartensson/STM64-Computer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2019-01-10 2: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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2019-01-10 11:53 AM
Quick look at the GSL manual PDF:
- long double: forget it, unpractical
- double: only STM32F467 and higher STM32 will have HW double instructions
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
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.
