Running Simulink-generated code from the Beagleboard without a host computer
1 view (last 30 days)
I am using MATLAB R2012a to generate code for the Beagleboard XM. Once the code is generated and run from the Beagleboard in 'external mode', is there a way to run save it on the Beagleboard and run it in a truly stand alone manner ( that is without any connection to the host computer)? If so, please explain how to do this.
Murat Belge on 19 Jun 2012
The executable generated from a model is always saved on the BeagleBoard. The exact location to the executable is:
/home/ubuntu/<model name>_rtt/MW/<model name>
(where /home/ubuntu/ is the default build directory. This is user settable from the "Run on Target Hardware > Options" menu) So you can login to your BeagleBoard, change working folder to the location above and run the executable by doing the following:
$ sudo ./<model_name>
Let's get into the External Mode. Once you develop a model and test that it works as you expected using External Mode, you should move on to stand-alone deployment phase. This means you should turn off External Mode and then generate & run code. This improves efficiency of the generated code by removing unneeded instrumentation code. Once the Simulink model starts to run, you can untether your host computer from BeagleBoard. The Simulink model will continue to run.
You may also be able to use a wi-fi dongle to connect to the BeagleBoard wirelessly. Once the wireless connection is activated, you no longer need you BeagleBoard to be tethered to your computer via an Ethernet cable. You can use External Mode or any other feature just as you would do over a wired Ethernet connection.
If you want your model to automatically start running whenever BeagleBoard is turned on, there are many different ways. You should take a look at: http://www.linuxquestions.org/questions/linux-general-1/how-do-i-automatically-start-a-program-at-start-up-102154/.