raspi() makefile error connecting to raspberry pi
17 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I have been trying to connect to my raspberry pi 4 board using raspi(), and I am getting this error:
### Building MATLAB I/O server...
Error executing command "make ONLY_MATLAB_IO=0 -C /opt/MATLAB/mw_server_v21.2.0 -f Makefile". Details:
STDERR: IO_wrapperCameraboard.c: In function ‘camerboardInitialize’:
IO_wrapperCameraboard.c:38:19: warning: pointer targets in assignment from ‘uint8_T *’ {aka ‘unsigned char *’} to ‘char_T *’ {aka ‘char *’} differ
in signedness [-Wpointer-sign]
controlParams = &payloadBufferRx[index];
^
IO_wrapperCameraboard.c:41:5: warning: implicit declaration of function ‘printf’ [-Wimplicit-function-declaration]
printf("REQUEST_CAMERABOARD_INIT: (w, h, fps, q) = [%d, %d, %d, %d]\n", width, height,
^~~~~~
IO_wrapperCameraboard.c:41:5: warning: incompatible implicit declaration of built-in function ‘printf’
IO_wrapperCameraboard.c:41:5: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’
IO_wrapperCameraboard.c:11:1:
+#include <stdio.h>
IO_wrapperCameraboard.c:41:5:
printf("REQUEST_CAMERABOARD_INIT: (w, h, fps, q) = [%d, %d, %d, %d]\n", width, height,
^~~~~~
IO_wrapperCameraboard.c: In function ‘cameraboardSnapshot’:
IO_wrapperCameraboard.c:66:5: warning: incompatible implicit declaration of built-in function ‘printf’
printf("REQUEST_CAMERABOARD_SNAPSHOT \n");
^~~~~~
IO_wrapperCameraboard.c:66:5: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’
IO_wrapperCameraboard.c: In function ‘cameraboardControl’:
IO_wrapperCameraboard.c:95:19: warning: pointer targets in assignment from ‘uint8_T *’ {aka ‘unsigned char *’} to ‘char_T *’ {aka ‘char *’} differ
in signedness [-Wpointer-sign]
controlParams = &payloadBufferRx[0];
^
IO_wrapperCameraboard.c:96:5: warning: incompatible implicit declaration of built-in function ‘printf’
printf("REQUEST_CAMERABOARD_CONTROL: %s \n", controlParams);
^~~~~~
IO_wrapperCameraboard.c:96:5: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’
IO_wrapperCameraboard.c: In function ‘cameraboardTerminate’:
IO_wrapperCameraboard.c:118:5: warning: incompatible implicit declaration of built-in function ‘printf’
printf("REQUEST_CAMERABOARD_TERMINATE \n");
^~~~~~
IO_wrapperCameraboard.c:118:5: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’
In file included from sharedServer.h:16,
from mw_wrapperCANChannel.h:16,
from mw_wrapperCANChannel.c:11:
mw_wrapperCANChannel.c: In function ‘canWrite’:
mw_wrapperCANChannel.c:18:23: warning: too many arguments for format [-Wformat-extra-args]
LOG_PRINT(stdout, "REQUEST_CAN_WRITE: \n",0);
^~~~~~~~~~~~~~~~~~~~~~~
common.h:12:51: note: in definition of macro ‘LOG_PRINT’
#define LOG_PRINT(fd, format, ...) fprintf(fd, format, __VA_ARGS__); fflush(fd)
^~~~~~
mw_wrapperCANChannel.c:53:26: warning: too many arguments for format [-Wformat-extra-args]
LOG_PRINT(stdout,"CANChannel: Write successful \n",0);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
common.h:12:51: note: in definition of macro ‘LOG_PRINT’
#define LOG_PRINT(fd, format, ...) fprintf(fd, format, __VA_ARGS__); fflush(fd)
^~~~~~
mw_wrapperCANChannel.c:56:26: warning: too many arguments for format [-Wformat-extra-args]
LOG_PRINT(stdout,"CANChannel: Write failed \n",0);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
common.h:12:51: note: in definition of macro ‘LOG_PRINT’
#define LOG_PRINT(fd, format, ...) fprintf(fd, format, __VA_ARGS__); fflush(fd)
^~~~~~
mw_wrapperCANChannel.c: In function ‘canRead’:
mw_wrapperCANChannel.c:65:22: warning: too many arguments for format [-Wformat-extra-args]
LOG_PRINT(stdout,"REQUEST_CAN_Read: \n",0);
^~~~~~~~~~~~~~~~~~~~~~
common.h:12:51: note: in definition of macro ‘LOG_PRINT’
#define LOG_PRINT(fd, format, ...) fprintf(fd, format, __VA_ARGS__); fflush(fd)
^~~~~~
mw_wrapperCANChannel.c:98:26: warning: too many arguments for format [-Wformat-extra-args]
LOG_PRINT(stdout,"CANChannel: Read successful \n",0);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
common.h:12:51: note: in definition of macro ‘LOG_PRINT’
#define LOG_PRINT(fd, format, ...) fprintf(fd, format, __VA_ARGS__); fflush(fd)
^~~~~~
mw_wrapperCANChannel.c:100:26: warning: too many arguments for format [-Wformat-extra-args]
LOG_PRINT(stdout,"CANChannel: Read failed \n",0);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
common.h:12:51: note: in definition of macro ‘LOG_PRINT’
#define LOG_PRINT(fd, format, ...) fprintf(fd, format, __VA_ARGS__); fflush(fd)
^~~~~~
picam.c:10:10: fatal error: bcm_host.h: No such file or directory
#include "bcm_host.h"
^~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:79: obj/picam.o] Error 1
STDOUT: make: Entering directory '/opt/MATLAB/mw_server_v21.2.0'
[Compiling] IO_wrapperv4l2.c
gcc -c -g -O0 -D_DEBUG -Wall -I/opt/userland -I/opt/userland/host_applications/linux/libs/bcm_host/include -I/opt/userland/interface/vcos
-I/opt/userland/interface/vcos/pthreads -I/opt/userland/interface/vmcs_host/linux -I/opt/userland/host_applications/linux/apps/raspicam
-I/opt/nanomsg/include -Winline -pipe -D_DEBUG -D_MATLABIO_ -DMW_WEBSOC_INUSE -DMW_ENCODER_INUSE IO_wrapperv4l2.c -o obj/IO_wrapperv4l2.o
[Compiling] MW_PWM.c
gcc -c -g -O0 -D_DEBUG -Wall -I/opt/userland -I/opt/userland/host_applications/linux/libs/bcm_host/include -I/opt/userland/interface/vcos
-I/opt/userland/interface/vcos/pthreads -I/opt/userland/interface/vmcs_host/linux -I/opt/userland/host_applications/linux/apps/raspicam
-I/opt/nanomsg/include -Winline -pipe -D_DEBUG -D_MATLABIO_ -DMW_WEBSOC_INUSE -DMW_ENCODER_INUSE MW_PWM.c -o obj/MW_PWM.o
[Compiling] MW_pigs.c
gcc -c -g -O0 -D_DEBUG -Wall -I/opt/userland -I/opt/userland/host_applications/linux/libs/bcm_host/include -I/opt/userland/interface/vcos
-I/opt/userland/interface/vcos/pthreads -I/opt/userland/interface/vmcs_host/linux -I/opt/userland/host_applications/linux/apps/raspicam
-I/opt/nanomsg/include -Winline -pipe -D_DEBUG -D_MATLABIO_ -DMW_WEBSOC_INUSE -DMW_ENCODER_INUSE MW_pigs.c -o obj/MW_pigs.o
[Compiling] sharedServer.c
gcc -c -g -O0 -D_DEBUG -Wall -I/opt/userland -I/opt/userland/host_applications/linux/libs/bcm_host/include -I/opt/userland/interface/vcos
-I/opt/userland/interface/vcos/pthreads -I/opt/userland/interface/vmcs_host/linux -I/opt/userland/host_applications/linux/apps/raspicam
-I/opt/nanomsg/include -Winline -pipe -D_DEBUG -D_MATLABIO_ -DMW_WEBSOC_INUSE -DMW_ENCODER_INUSE sharedServer.c -o obj/sharedServer.o
[Compiling] IO_wrapperCameraboard.c
gcc -c -g -O0 -D_DEBUG -Wall -I/opt/userland -I/opt/userland/host_applications/linux/libs/bcm_host/include -I/opt/userland/interface/vcos
-I/opt/userland/interface/vcos/pthreads -I/opt/userland/interface/vmcs_host/linux -I/opt/userland/host_applications/linux/apps/raspicam
-I/opt/nanomsg/include -Winline -pipe -D_DEBUG -D_MATLABIO_ -DMW_WEBSOC_INUSE -DMW_ENCODER_INUSE IO_wrapperCameraboard.c -o
obj/IO_wrapperCameraboard.o
[Compiling] mw_wrapperCANChannel.c
gcc -c -g -O0 -D_DEBUG -Wall -I/opt/userland -I/opt/userland/host_applications/linux/libs/bcm_host/include -I/opt/userland/interface/vcos
-I/opt/userland/interface/vcos/pthreads -I/opt/userland/interface/vmcs_host/linux -I/opt/userland/host_applications/linux/apps/raspicam
-I/opt/nanomsg/include -Winline -pipe -D_DEBUG -D_MATLABIO_ -DMW_WEBSOC_INUSE -DMW_ENCODER_INUSE mw_wrapperCANChannel.c -o
obj/mw_wrapperCANChannel.o
[Compiling] LED.c
gcc -c -g -O0 -D_DEBUG -Wall -I/opt/userland -I/opt/userland/host_applications/linux/libs/bcm_host/include -I/opt/userland/interface/vcos
-I/opt/userland/interface/vcos/pthreads -I/opt/userland/interface/vmcs_host/linux -I/opt/userland/host_applications/linux/apps/raspicam
-I/opt/nanomsg/include -Winline -pipe -D_DEBUG -D_MATLABIO_ -DMW_WEBSOC_INUSE -DMW_ENCODER_INUSE LED.c -o obj/LED.o
[Compiling] picam.c
gcc -c -g -O0 -D_DEBUG -Wall -I/opt/userland -I/opt/userland/host_applications/linux/libs/bcm_host/include -I/opt/userland/interface/vcos
-I/opt/userland/interface/vcos/pthreads -I/opt/userland/interface/vmcs_host/linux -I/opt/userland/host_applications/linux/apps/raspicam
-I/opt/nanomsg/include -Winline -pipe -D_DEBUG -D_MATLABIO_ -DMW_WEBSOC_INUSE -DMW_ENCODER_INUSE picam.c -o obj/picam.o
make: Leaving directory '/opt/MATLAB/mw_server_v21.2.0'
Did anyone face a similar error and was able to solve it?
0 Kommentare
Antworten (1)
Esha Chakraborty
am 6 Apr. 2022
Bearbeitet: Esha Chakraborty
am 6 Apr. 2022
Hi Menna,
I understand that you are experiencing raspi() makefile error while connecting to raspberry pi 4 board.
I can see that bcm_host.h file is missing in paticular, which is likely to cause this error. Firstly, please ensure that you are using either raspbian strech or raspbian jessie as your raspberry pi OS. Then run these commands in command line in pi's desktop:
sudo apt-get update
sudo apt-get install libnanomsg-dev libasound2-dev
If the issue still persists, it is likely that you are missing some libraries and linux packages that needs to be installed on Raspberry Pi before you can use MATLAB/Simulink Support Package for Raspberry Pi. This is handled by the "Hardware Setup" process just after installing the Add-On.
In the Hardware Setup, you could choose either MathWorks Customized Image (this would have all the libraries pre-installed) or you could customize your existing raspberry pi's operating system to install the addtional library dependencies.
Please refer the below video to know more about the hardware setup process.
2 Kommentare
Sajjad Keshtkar
am 13 Aug. 2023
Hi.
In the newst version of addons and for model 4B, there is no option to choose the operating system. What should we do?
Simon Schirk
am 2 Nov. 2023
Hi Esha,
do I understand you correctly, that newer OS like Bullseye or Bookworm are not supported?
Siehe auch
Kategorien
Mehr zu MATLAB Support Package for Raspberry Pi Hardware finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!