How to compile a generated C code from a Simulink Model on Raspberry PI after the code is physically copied on the Raspberry pi?
1 次查看(过去 30 天)
显示 更早的评论
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.
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Raspberry Pi Hardware 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!