嗨 - 我似乎无法让驱动程序在 RPi 3+ 上编译..
感谢您的帮助!
这是我收到的错误消息:
pi@raspberrypi:~/VL53L3CX_LinuxDriver_1.0.5_bare_1.2.4/driver/vl53Lx $ make VL53LX_FULL_KERNEL=1
CONFIG_STMVL53LX=m make -C /lib/modules/`uname -r`/build M=$PWD
make[1]: 进入目录 '/usr/src/linux-headers-5.10.17-v7+'
CC [M] /home/pi/VL53L3CX_LinuxDriver_1.0.5_bare_1.2.4/driver/vl53Lx/stmvl53lx_module.o
在 /home/pi/VL53L3CX_LinuxDriver_1.0.5_bare_1.2.4/driver/vl53Lx/stmvl53lx_module.c:49 包含的文件中:
/home/pi/VL53L3CX_LinuxDriver_1.0.5_bare_1.2.4/driver/vl53Lx/stmvl53lx.h:208:17:错误:字段“start_tv”的类型不完整
struct
timeval start_tv;/*!< 流开始时间 */
^~~~~~~~
/home/pi/VL53L3CX_LinuxDriver_1.0.5_bare_1.2.4/driver/vl53Lx/stmvl53lx.h:240:18:错误:字段“start_tv”的类型不完整
结构timeval start_tv;
^~~~~~~~
/home/pi/VL53L3CX_LinuxDriver_1.0.5_bare_1.2.4/driver/vl53Lx/stmvl53lx.h:241:18:错误:字段“comp_tv”的类型不完整
结构timeval comp_tv;
^~~~~~~
/home/pi/VL53L3CX_LinuxDriver_1.0.5_bare_1.2.4/driver/vl53Lx/stmvl53lx_module.c:在函数“st_gettimeofday”中:
/home/pi/VL53L3CX_LinuxDriver_1.0.5_bare_1.2.4/driver/vl53Lx/stmvl53lx_module.c:103:4:错误:取消引用指向不完整类型“struct timeval”的指针
tv->tv_sec = now.tv_sec;
^~
/home/pi/VL53L3CX_LinuxDriver_1.0.5_bare_1.2.4/driver/vl53Lx/stmvl53lx_module.c:在函数“stmvl53lx_intr_process”中:
/home/pi/VL53L3CX_LinuxDriver_1.0.5_bare_1.2.4/driver/vl53Lx/stmvl53lx_module.c:2414:17:错误:“tv_now”的存储大小未知
结构timeval tv_now;
^~~~~~
/home/pi/VL53L3CX_LinuxDriver_1.0.5_bare_1.2.4/driver/vl53Lx/stmvl53lx_module.c:2414:17: 警告:未使用的变量 'tv_now' [-Wunused-variable]
/home/pi/VL53L3CX_LinuxDriver_1.0.5_bare_1.2.4/driver/vl53Lx/stmvl53lx_module.c:在函数“stmvl53lx_input_push_data_multiobject”中:
/home/pi/VL53L3CX_LinuxDriver_1.0.5_bare_1.2.4/driver/vl53Lx/stmvl53lx_module.c:2508:17: 错误:'tv' 的存储大小未知
结构时间电视;
^~
/home/pi/VL53L3CX_LinuxDriver_1.0.5_bare_1.2.4/driver/vl53Lx/stmvl53lx_module.c:2508:17: 警告:未使用的变量 'tv' [-Wunused-variable]
make[2]: *** [scripts/Makefile.build:279: /home/pi/VL53L3CX_LinuxDriver_1.0.5_bare_1.2.4/driver/vl53Lx/stmvl53lx_module.o] 错误 1
make[1]: *** [Makefile:1804: /home/pi/VL53L3CX_LinuxDriver_1.0.5_bare_1.2.4/driver/vl53Lx] 错误2
make[1]: 离开目录 '/usr/src/linux-headers-5.10.17-v7+'
make: *** [Makefile:8: default] 错误 2