build standalone application running in Raspberry Pi?
조회 수: 21 (최근 30일)
Hi all I'm new in using Simulink model to build an application that run in Raspberry Pi. I have a question that can I build a standalone application with the board: means that I build a Simulink model in matlab, load into the board, stop Matlab and plug out the connection with the computer. Does the program that has been loaded in the board can work alone without matlab? Thank for any help :)
Murat Belge 2014년 2월 25일
Yes. The Simulink model is converted to an executable that runs on the Raspberry Pi board. Typically, the executable is saved in "/home/pi/<Simulink model name>/MW directory. The name of the executable is the same as the Simulink model name. You can run this executable any time after compiling your Simulink model once.
추가 답변 (6개)
fatima 2017년 4월 21일
Hi everyone. I'm facing the same problem. I build a model in matlab; it loads successfully on raspberry pi 3 board and runs OK. My model simply sends an array of uint8 over UDP to a server. I found the project in /home/pi/[ProjectName]_ert_rtw and I was even able to build it again in linux (by renaming the "[ProjectName].mk" file to "Makefile" and "make all" command). However the "[ProjectName].elf" file is not doing the task it's supposed to do (Not before nor after rebuilding in linux). I took a look inside the c files of project and I found out that the executable file accepts some input arguments. I saw that my server IP address was set in one of the c files, but I gave it as input to executable too (Something like this: [ProjectName].elf -hostname [ServerIP] -port [MyPort] -protocol UDP). In my sever, if I send something back, I see that the running code indicated that it received an invalid packet, and sometimes it sends back some gibberish to server too.
I think that some part of the code is running, but it needs something as input argument to tell it to use constant parameters and run the main task.
Any body facing this problem? Any idea to solve the problem would be appreciated.
Mirko 2014년 5월 23일
Hello, I created a model in simulink and I find the files in the directory MW, but I can not get it running independently. If I launch the simulink model to work properly. What is the right command to give Linux to run the model?
Mirko 2014년 5월 25일
Hi, I solved by putting a line in / etc / crontab file that launches the program start automatically
Dudi Rendusara 2017년 10월 4일
Hi I am experiencing the same problem. What is the extension for the executable it generates? Is it the model_name.elf file? Too bad Mathworks does not provide detailed explanation on how to run simulink model independently in raspberry pi.
Antonio Ofogo 2022년 5월 24일
Hi there. I'm working on a space detection project in a parking lot, I wrote a matlab code to do it and it works perfectly on my machine but it is supposed to be deployed on Raspberry Pi 3, how do I do it please?