Static library code generation from windows to linux

6 vues (au cours des 30 derniers jours)
Antoine Laurin
Antoine Laurin le 13 Jan 2023
Commenté : Mark McBroom le 16 Jan 2023
Hi,
There is something I don't understand in matlab Coder and haven't found the solution:
I am running on matlab 2022b on my windows computer and have a .m code ready for C code generation. I want to generate a static library with the intention to use it on a linux platform (a Raspberry Pi 3+ in that case). I have installed and configured the Raspberry Pi hardware support package, selected "Static Library" as build type, "Raspberry Pi" as hardware board and "GNU GCC Embedded Linux" as toolchain.
I expect the generation of a .a file, but I get a .lib. Did I do something wrong ?

Réponse acceptée

Mark McBroom
Mark McBroom le 14 Jan 2023
The Raspberry Pi support package generates the C code on the host Windows computer, then the copies the code to the Raspberry Pi to compile and link using the Raspian gcc compiler.
  2 commentaires
Antoine Laurin
Antoine Laurin le 16 Jan 2023
Ok, so there is no way to directly generate a .a file without running matlab on linux ?
Mark McBroom
Mark McBroom le 16 Jan 2023
Correct.
Note. It is possible to create a custom toolchain to do this, but with standard Simulink Coder/Embedded Coder, you must be on a linux machine to create a linux .a file.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur MATLAB Support Package for Raspberry Pi Hardware dans Help Center et File Exchange

Produits


Version

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by