Having trouble getting the stm vl53lx driver working on RPI
Hi - I can't seem to get the driver to compile on a RPi 3+..
Grateful for any assistance !!
This is the error message I get:
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]: Entering directory '/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
In file included from /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: error: field ‘start_tv’ has incomplete type
struct timeval start_tv;/*!< stream start time */
^~~~~~~~
/home/pi/VL53L3CX_LinuxDriver_1.0.5_bare_1.2.4/driver/vl53Lx/stmvl53lx.h:240:18: error: field ‘start_tv’ has incomplete type
struct timeval start_tv;
^~~~~~~~
/home/pi/VL53L3CX_LinuxDriver_1.0.5_bare_1.2.4/driver/vl53Lx/stmvl53lx.h:241:18: error: field ‘comp_tv’ has incomplete type
struct timeval comp_tv;
^~~~~~~
/home/pi/VL53L3CX_LinuxDriver_1.0.5_bare_1.2.4/driver/vl53Lx/stmvl53lx_module.c: In function ‘st_gettimeofday’:
/home/pi/VL53L3CX_LinuxDriver_1.0.5_bare_1.2.4/driver/vl53Lx/stmvl53lx_module.c:103:4: error: dereferencing pointer to incomplete type ‘struct timeval’
tv->tv_sec = now.tv_sec;
^~
/home/pi/VL53L3CX_LinuxDriver_1.0.5_bare_1.2.4/driver/vl53Lx/stmvl53lx_module.c: In function ‘stmvl53lx_intr_process’:
/home/pi/VL53L3CX_LinuxDriver_1.0.5_bare_1.2.4/driver/vl53Lx/stmvl53lx_module.c:2414:17: error: storage size of ‘tv_now’ isn’t known
struct timeval tv_now;
^~~~~~
/home/pi/VL53L3CX_LinuxDriver_1.0.5_bare_1.2.4/driver/vl53Lx/stmvl53lx_module.c:2414:17: warning: unused variable ‘tv_now’ [-Wunused-variable]
/home/pi/VL53L3CX_LinuxDriver_1.0.5_bare_1.2.4/driver/vl53Lx/stmvl53lx_module.c: In function ‘stmvl53lx_input_push_data_multiobject’:
/home/pi/VL53L3CX_LinuxDriver_1.0.5_bare_1.2.4/driver/vl53Lx/stmvl53lx_module.c:2508:17: error: storage size of ‘tv’ isn’t known
struct timeval tv;
^~
/home/pi/VL53L3CX_LinuxDriver_1.0.5_bare_1.2.4/driver/vl53Lx/stmvl53lx_module.c:2508:17: warning: unused variable ‘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] Error 1
make[1]: *** [Makefile:1804: /home/pi/VL53L3CX_LinuxDriver_1.0.5_bare_1.2.4/driver/vl53Lx] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.10.17-v7+'
make: *** [Makefile:8: default] Error 2
