How to compile Matlab programs using raspi library?

조회 수: 1 (최근 30일)
Guillaume
Guillaume 2018년 10월 1일
답변: Guillaume 2018년 12월 19일

Hello,

I am trying to use the "MATLAB Support Package for Raspberry Pi Hardware". I installed all the files described in https://fr.mathworks.com/help/supportpkg/raspberrypiio/ref/getting-started-with-matlab-support-package-for-raspberry-pi-hardware.html, and I got no problem. My issue is when I try to compile the program with the Matlab Compiler.

I created a very simple program:

function ledon()  
r = raspi('xxx.xxx.xxx','pi','raspberry');
led = r.AvailableLEDs{1};
for i = 1:10
 writeLED(r, led,0);
 pause(1);
 writeLED(r,led,1);
 pause(1);
end

If I launch it directly on Matlab, I have no problem, the LED blinks. However, if I try to create a project with the Matlab Compiler, when I run this same simple program, I get the following error :

Error using matlab.internal.msgcat.setAdditionalResourceLocation
The path "C:\Users\UserXXX\AppData\Local\Temp\UserXXX\mcrCache9.4\ledon_1\" is not a valid message catalog resource path.
Error in raspi (line 66)
Error in ledon (line3)

I do not understand what it means.

In raspi, line 66, it is written :

matlab.internal.msg.setAdditionalResourceLocation(raspi.internal.getRaspiBaseRoot); 

If someone has an idea, I would be interested :-)

Thank you very much.

답변 (2개)

Mohith Prabhu
Mohith Prabhu 2018년 12월 17일
Hi Guillaume ,
Follow the instructions provided in Raspberry Pi - Run on Target Hardware to deploy a MATLAB function onto Raspberry Pi.
Regards,
Mohith

Guillaume
Guillaume 2018년 12월 19일
Hi Mohith,
Thank you very much for your answer! I will try it and get back when I have more information about it.
Regards,
Guillaume

카테고리

Help CenterFile Exchange에서 MATLAB Support Package for Raspberry Pi Hardware에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by