Effacer les filtres
Effacer les filtres

How to compile a generated C code from a Simulink Model on Raspberry PI after the code is physically copied on the Raspberry pi?

2 vues (au cours des 30 derniers jours)
I have a basic Simulink model to turn on the led of Raspberry pi. I have generated the C code of the Pi using "Simulink coder" provided with "Simulink Support for Raspberry Pi Hardware". I specified in the Code Generation Pane, and set the Raspberry as target. I'm trying to generate the code only so that it can be built later in dedicated environment. However even I the "Generate Code Only" checkbox is checked, the GCC compiler is invoked on the Raspberry Pi.
Now after copying the generated code to my Raspberry pi and I want to compile the code on the raspberry pi and execute it. I have tried using "gcc -o led led_on.c " but I am constantly getting errors that there are undefined reference. Can someone kindly support here?
PS: I have already used the "Deploy on Hardware" option and it works fine, but this is not what I require to do. I want the code to place in the Pi and then compiled and executed there on the Pi.
Thanks.

Réponses (0)

Catégories

En savoir plus sur Raspberry Pi Hardware dans Help Center et File Exchange

Produits


Version

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by