It is my understanding that you have generated C++ code from your Simulink model and have a Raspberry Pi setup ready, and now you want to deploy and run the generated code on the Raspberry Pi.
Here’s how you can do it:
- Copy the Generated Code to Raspberry Pi: Use scp or a USB to copy the entire code generation folder (including .cpp, .h, and Makefile if available) to your Raspberry Pi:
scp -r mySimulinkCode pi@<raspberry_ip>:~/simulink_build/
- Compile the Code on Raspberry Pi: SSH into the Pi, go to the folder, and compile the cpp file using:
g++ *.cpp -o myModelApp
- Run the Executable: After successful compilation, you can run the generated executable on your Raspberry Pi hardware.
For additional information on deploying generated code onto Raspberry Pi, kindly refer to the following MathWorks documentation:
Hope this helps!