- Check File Paths: Kindly ensure that all file paths in the script are correct and accessible. The error message references paths "/home/pi/MATLAB_ws/R2024a/C/Meruzhan/Yolov3/codegen/exe/deploy_tracing_raspberry_pi". Make sure these directories exist and are writable that is having write access.
- Library Dependencies: The error mentions that libraries like "-lSDL", "-lmmal" and "-lmmal_core". Verify that these libraries are installed on the Raspberry Pi. You need to install these missing libraries using "apt-get".
Build error: C++ compiler produced errors.
10 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
function deploy_tracing_raspberry_pi() %#codegen
persistent yolov3Detector;
if isempty(yolov3Detector)
yolov3Detector = coder.loadDeepLearningNetwork('yolov3Detector.mat');
end
mypi = raspi('192.168.18.233','pi','raspberry');
cam = cameraboard(mypi,'Resolution','160x120');
s = servo(mypi, 18, 'MinPulseDuration', 1e-3, 'MaxPulseDuration', 2e-3);
k = servo(mypi, 23, 'MinPulseDuration', 1e-3, 'MaxPulseDuration', 2e-3);
n = 90;
m = 90;
u = 2;
t = 0;
writePosition(s, n);
writePosition(k, m);
% Main loop
start = tic;
while t < 10000
t = t + 1;
%Capture image cameraboard
img = snapshot(cam);
elapsedTime = toc(start);
%Process frames at every 0.25 seconds
if elapsedTime > 0.25
end
% Detect
[bboxes,scores] = detect(yolov3Detector,img,'Threshold',0.6);
if ~isempty(bboxes)
img = insertObjectAnnotation(img,'rectangle',bboxes,scores);
[hI,wI,~] = size(img);
a = find(scores==max(scores));
x = bboxes(a,1);
y = bboxes(a,2);
w = bboxes(a,3);
h = bboxes(a,4);
if (wI/2 - (x + w/2) < 0)
n=n+u;
if n>=170
n = 150;
writePosition(s,n);
else
writePosition(s,n);
end
end
if (wI/2 - (x + w/2) > 0)
n=n-u;
if n<=10
n = 20;
writePosition(s,n);
else
writePosition(s,n);
end
end
if (hI/2 - (y + h/2) >0)
m=m+u;
if m>=170
m = 150;
writePosition(k,m);
else
writePosition(k,m);
end
end
if (hI/2 - (y + h/2) < 0)
m=m-u;
if m<=10
m = 20;
writePosition(k,m);
else
writePosition(k,m);
end
end
end
displayImage(mypi,img);
drawnow
end
%%
%when running the deploy script, I get an error
%Error executing command "touch -c /home/pi/MATLAB_ws/R2024a/C/Meruzhan/Yolov3/codegen/exe/deploy_tracing_raspberry_pi/*.*;make -j$(($(nproc)+1)) -Otarget -f deploy_tracing_raspberry_pi_rtw.mk all MATLAB_WORKSPACE="/home/pi/MATLAB_ws/R2024a" LINUX_TARGET_LIBS_MACRO="-lSDL -lmmal -lmmal_core -lmmal_util -lmmal_vc_client -lvcos -lbcm_host" -C /home/pi/MATLAB_ws/R2024a/C/Meruzhan/Yolov3/codegen/exe/deploy_tracing_raspberry_pi LC_ALL=C".
0 Commenti
Risposte (1)
Hitesh
il 15 Gen 2025
Hi Meruzhan,
The error message you're encountering indicates that the problem is with the deployment process of the MATLAB code onto the Raspberry Pi. Kindly ensure the following points as these are potential root cause of this error, such as incorrect paths, missing libraries, or configuration problems.
If the issue still persists, it would be best handled with MathWorks tech support. Could you submit a technical support request?
0 Commenti
Vedere anche
Categorie
Scopri di più su MATLAB Compiler in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!