Problem with raspi() function on raspberry pi4 B
2 次查看(过去 30 天)
显示 更早的评论
Hello,
I try to use the MATLAB Support Package for Raspberry Pi Hardware with my brand new raspberry pi 4B. I started trying to use the Mathworks raspbian image but it doesn't seems to be compatible with my board, as I get a message at boot telling me to try another OS (don't want to start). Thus I installed different OS and chose to "customize the existing operating system" option. The installation goes to the end (wiringpi library fails to install but I don't think that the error is coming from that). Then when I use the raspi() command I get the following error :
### Updating Raspberry Pi I/O server...
### Connecting to board...
### Connected to 192.168.0.35...
### Installing userland software (this might take a while)...
### Creating server folder...
### Transferring source files...
### Building MATLAB I/O server...
Error executing command "make ONLY_MATLAB_IO=1 -C /opt/MATLAB/mw_server_v20.2.0 -f Makefile". Details:
STDERR: IO_wrapperv4l2.c: In function ‘v4l2CameraInitialize’:
IO_wrapperv4l2.c:43:9: warning: implicit declaration of function ‘printf’ [-Wimplicit-function-declaration]
printf("Webcam: Initialized successfully \n");
^~~~~~
IO_wrapperv4l2.c:43:9: warning: incompatible implicit declaration of built-in function ‘printf’
IO_wrapperv4l2.c:43:9: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’
IO_wrapperv4l2.c:11:1:
+#include <stdio.h>
IO_wrapperv4l2.c:43:9:
printf("Webcam: Initialized successfully \n");
^~~~~~
IO_wrapperv4l2.c:45:9: warning: incompatible implicit declaration of built-in function ‘printf’
printf("Webcam: Initialization failed \n");
^~~~~~
IO_wrapperv4l2.c:45:9: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’
IO_wrapperv4l2.c: In function ‘v4l2CameraSnapshot’:
IO_wrapperv4l2.c:96:5: warning: incompatible implicit declaration of built-in function ‘printf’
printf("Webcam: Sent an image of framesize %u \n",payloadSize);
^~~~~~
IO_wrapperv4l2.c:96:5: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’
v4l2_cam.c: In function ‘EXT_webcamInit’:
v4l2_cam.c:900:26: warning: unused variable ‘imageHeight’ [-Wunused-variable]
uint32_T imageWidth, imageHeight;
^~~~~~~~~~~
v4l2_cam.c:900:14: warning: unused variable ‘imageWidth’ [-Wunused-variable]
uint32_T imageWidth, imageHeight;
^~~~~~~~~~
v4l2_cam.c:898:9: warning: unused variable ‘ret’ [-Wunused-variable]
int ret = 0;
^~~
In file included from v4l2_cam.c:21:
At top level:
availableWebcam.h:29:36: warning: ‘numSupportedRes’ defined but not used [-Wunused-variable]
static int numberOfConnetions = 0, numSupportedRes[10];
^~~~~~~~~~~~~~~
availableWebcam.h:29:12: warning: ‘numberOfConnetions’ defined but not used [-Wunused-variable]
static int numberOfConnetions = 0, numSupportedRes[10];
^~~~~~~~~~~~~~~~~~
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’
availableWebcam.c: In function ‘getCameraResolution’:
availableWebcam.c:156:11: warning: unused variable ‘search’ [-Wunused-variable]
char *search = "x";
^~~~~~
availableWebcam.c:155:11: warning: unused variable ‘token’ [-Wunused-variable]
char *token;
^~~~~
availableWebcam.c:153:16: warning: unused variable ‘indx_count’ [-Wunused-variable]
static int indx_count = 0;
^~~~~~~~~~
availableWebcam.c: In function ‘getCameraAddrIndex’:
availableWebcam.c:145:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
availableWebcam.c: In function ‘validateResolution’:
availableWebcam.c:226:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
At top level:
availableWebcam.c:153:16: warning: ‘indx_count’ defined but not used [-Wunused-variable]
static int indx_count = 0;
^~~~~~~~~~
picam.c:10:10: fatal error: bcm_host.h: No such file or directory
#include "bcm_host.h"
^~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:81: obj/picam.o] Error 1
STDOUT: make: Entering directory '/opt/MATLAB/mw_server_v20.2.0'
[Compiling] GPIO.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_ GPIO.c -o
obj/GPIO.o
[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_ 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_ 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_ MW_pigs.c -o
obj/MW_pigs.o
[Compiling] devices.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_ devices.c -o
obj/devices.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_ sharedServer.c
-o obj/sharedServer.o
[Compiling] v4l2_cam.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_ v4l2_cam.c -o
obj/v4l2_cam.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_
IO_wrapperCameraboard.c -o obj/IO_wrapperCameraboard.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_ LED.c -o
obj/LED.o
[Compiling] MW_SPI.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_ MW_SPI.c -o
obj/MW_SPI.o
[Compiling] availableWebcam.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_
availableWebcam.c -o obj/availableWebcam.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_ picam.c -o
obj/picam.o
make: Leaving directory '/opt/MATLAB/mw_server_v20.2.0'
I tried with buster, bullseye and ubuntu OS and the error is the same everywhere. Am I doing something wrong or is the package not supporting PI4 B ? Thanks a lot for your help.
1 个评论
回答(1 个)
Esha Chakraborty
2022-4-6
Hi Kaoane,
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. You can find solution to this from a similar example in the link below:
This is likely to resolve your issue.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Installation Setup and Configuration 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!