Clear Filters
Clear Filters

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 views (last 30 days)
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.

Answers (0)

Categories

Find more on Raspberry Pi Hardware in Help Center and File Exchange

Products


Release

R2019a

Community Treasure Hunt

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

Start Hunting!