Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Install MCR (MATLAB Compiler Runtime) in an embedded linux ubuntu at Beagleboard

383 views
Skip to first unread message

Xuewu

unread,
May 29, 2012, 7:17:05 AM5/29/12
to
Hi, All,

I see my question may be silly, I have googled for a couple of days but still being confused. I have developed a matlab GUI program and I compiled it to a standalone program by mcc. Running well at my windows PC. I wonder if it possible to migrate my standalone program (and the MCR) to the Beagleboard. My Beagleboard comes with a linux ubuntu and ARM Cortex-A8 processor.

I see a thread about migrate the MCR to Panda Board by menna
http://www.mathworks.se/matlabcentral/newsreader/view_thread/318823
but the answer is NO. My understanding is that the Matlab can only run on a x86 processor, not on ARM processor.

However, some poeple suggests translate the Matlab code to C (or library) and compile it to the target system
http://www.mathworks.co.uk/support/sysreq/current_release/
and some people tried to run their standalone at a SPAR
http://www.mathworks.com/matlabcentral/newsreader/view_thread/5731

Does this method work for ARM processor? Do I still need to install the MCR at the Beagleboard?

Any suggestions greatly appreciated.

Dan

Bruno Luong

unread,
May 29, 2012, 8:08:06 AM5/29/12
to
"Dan" wrote in message <jq2b7h$q78$1...@newscl01ah.mathworks.com>...

>
> Does this method work for ARM processor? Do I still need to install the MCR at the Beagleboard?

The compiler quoted in this thread (1998) is different than the current compiler. This method is no longer applicable.

You have to convert your code in C, period.

Bruno

Dan

unread,
May 30, 2012, 5:39:21 AM5/30/12
to
Thanks, Bruno. I did not realize that. It seems write code in C is the only way.

Murat Belge

unread,
Jun 4, 2012, 12:00:07 PM6/4/12
to
You might be able to translate your M-code to C and run it on the BeagleBoard using the Embedded MATLAB block in Simulink. This block allows one to use an "embeddable" subset of the MATLAB language. I doubt that your GUI M-code is going to compile since most MATLAB visualization commands are not supported. However, you should be able to get your algorithmic MATLAB code running on the BeagleBoard fairly easily using the Embedded MATLAB Function block. The MCC is not a recommended way of running MATLAB code on an embedded platform such as BeagleBoard.

Check out the downloadable BeagleBoard Support Package released as part of MATLAB and Simulink in R2012a.

Dan Lluch

unread,
Jun 4, 2012, 12:20:06 PM6/4/12
to
Wanted to add these links in case helpful:

New R2012a capability built into Simulink -
http://www.mathworks.com/products/simulink/simulink-targets/
and BB page - http://www.mathworks.com/academia/beagleboard/ (can see prior release support link from this page if useful as well)

on original post/question - System requirements calling out intel/amd and SSE2 requirements for running MATLAB (and same requirements for MCR):
http://www.mathworks.com/support/sysreq/current_release/linux.html
and useful SSE2 Technical Support solution - http://www.mathworks.com/support/solutions/en/data/1-B3MR75/

I agree with Murat, that your algorithm may simply lend itself to be able to get deployed through C -code conversion... the Run on Target Hardware capability above may be something to explore. That doesn't include getting a UI on the BB running though. Any new questions that come from your exploration of the beagleboard targetting, feel free to create new questions if appropriate.

Dan

unread,
Jun 8, 2012, 6:12:07 AM6/8/12
to
"Murat Belge" wrote in message <jqim27$bl6$1...@newscl01ah.mathworks.com>...
> ... you should be able to get your algorithmic MATLAB code running on the BeagleBoard fairly easily using the Embedded MATLAB Function block.


Mural, thanks for pointing out this. I have tried to do this by following the instructions at http://www.mathworks.co.uk/help/simulink/ug/create-and-run-an-application-on-beagleboard-hardware.html.

I build a simple model calculating a+b, After I "Select Tools > Run on Target Hardware > Run", it seems as usual I running model on host PC.

What I am not fully understand is one statement at the instruction web above: "This action ('Run on Target Hardware') automatically downloads and runs your model on the board." My understanding is, the model is runned by the Beagleboard, not the PC and, most importantly, the Beagleboard also returns the simulation results simultaneously back to the PC, so that we see the results in a scope at the PC.

If my understanding is right, the Beagleboard must communicate with the Simulink somehow via the TCP/IP link during the runing . Is the beagleboard treated in a similar way as a xPC target?

> Check out the downloadable BeagleBoard Support Package released as part of MATLAB and Simulink in R2012a.

I have got the R2012a and install the package. But I could not find any simulink demo files/models for Beagleboard.

It is greatly appreciated if anyone share a link of downloading the Parametric Audio Equalizer demo for beagleboard. for example, the model at http://www.mathworks.gr/matlabcentral/fileexchange/35205-simulink-support-package-for-beagleboard-hardware/content/beagleboard/beagleboarddemos/html/publish_beagleboard_audioequalizer.html

Cheers,

Dan

Dan

unread,
Jun 8, 2012, 6:27:24 AM6/8/12
to
"Dan Lluch" <dan....@mathworks.com> wrote in message
> and useful SSE2 Technical Support solution - http://www.mathworks.com/support/solutions/en/data/1-B3MR75/

Thanks. I tried the cat /proc/cpuinfo at my Beagleboard, below are the the results, and no SSE2 is found as we expected. Anyway, ARM is not belgong to the x86 family, no mention the SSE2.

root@omap:~# cat /proc/cpuinfo
Processor : ARMv7 Processor rev 2 (v7l)
processor : 0
BogoMIPS : 256.78

Features : swp half thumb fastmult vfp edsp thumbee neon vfpv3 tls
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x3
CPU part : 0xc08
CPU revision : 2

Hardware : OMAP3 Beagle Board
Revision : 0020
Serial : 0000000000000000
root@omap:~#

Dan Lluch

unread,
Jun 8, 2012, 10:48:07 AM6/8/12
to
> What I am not fully understand is one statement at the instruction web above: "This action ('Run on Target Hardware') automatically downloads and runs your model on the board." My understanding is, the model is runned by the Beagleboard, not the PC and, most importantly, the Beagleboard also returns the simulation results simultaneously back to the PC, so that we see the results in a scope at the PC.
>
> If my understanding is right, the Beagleboard must communicate with the Simulink somehow via the TCP/IP link during the runing . Is the beagleboard treated in a similar way as a xPC target?

Similar... both use External Mode to accomplish the host-target communication.



>
> > Check out the downloadable BeagleBoard Support Package released as part of MATLAB and Simulink in R2012a.
>
> I have got the R2012a and install the package. But I could not find any simulink demo files/models for Beagleboard.

They are located under Help Browser-> Other Demos (at the very bottom of the tree)->Target for Use with Beagleboard Hardware->Tutorials/Examples

the Parametric Audio Equalizer is there under Examples, and working through each of the tutorial model in order is recommended as that will show you the basics, including exteranl mode for Beagle to host communication...

Dan

unread,
Jun 8, 2012, 11:23:07 AM6/8/12
to
"Dan Lluch" <dan....@mathworks.com> wrote in message

> They are located under Help Browser-> Other Demos (at the very bottom of the tree)->Target for Use with Beagleboard Hardware->Tutorials/Examples


Great! Found it at exactly where you mentioned. Cheers!

Dan Lluch

unread,
Jun 8, 2012, 3:46:12 PM6/8/12
to
"Dan " <dxw...@gmail.com> wrote in message <jqt5cr$3nu$1...@newscl01ah.mathworks.com>...
> "Dan Lluch" <dan....@mathworks.com> wrote in message
>
> > They are located under Help Browser-> Other Demos (at the very bottom of the tree)->Target for Use with Beagleboard Hardware->Tutorials/Examples
>
>
> Great! Found it at exactly where you mentioned. Cheers!

Great... as an aside... The last screen of the targetinstaller has the option to open up directly to the demos/tutorials in the Help Browser... it should default to 'yes'.
0 new messages