2021-09-14 12:50 PM
Hi, I am trying to build the user mode linux driver on my raspberry pi 4 for the VL53L5CX module, and when I follow the instructions in the guide for RPI, I cd into user/test and make, I get the following error:
../uld-driver/src/vl53l5cx_api.c: In function ‘_vl53l5cx_send_offset_data’:
../uld-driver/src/vl53l5cx_api.c:163:8: error: ‘memcpy’ accessing 484 bytes at offsets 1288 and 1296 overlaps 476 bytes at offset 1296 [-Werror=restrict]
(void)memcpy(p_dev->temp_buffer, &(p_dev->temp_buffer[8]),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
VL53L5CX_OFFSET_BUFFER_SIZE - (uint16_t)4);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make: *** [Makefile:29: all] Error 1
I'm not sure why this is failing, I haven't modified the code in any way.
Solved! Go to Solution.
2021-09-20 09:23 AM
Hello VBhat.1, MOstr.1,
We did a driver update to patch this issue. You should not have it anymore using V1.1.1.
Regards,
Thomas
2021-09-17 04:22 AM
Hi,
In your other post I saw you managed to build linux drivers. I face the same problem you posted above. Could you share your knowledge of how to solve this failure?
I would be grateful,
Thank you
2021-09-17 08:50 AM
Hi, yes I realized that this was just a warning because memcpy is just shifting a large amount of data down by 8 bytes, and is overwriting some data. I just edited the makefile to remove the -werror term and it built fine, because it is ignoring errors now.
2021-09-20 09:23 AM
Hello VBhat.1, MOstr.1,
We did a driver update to patch this issue. You should not have it anymore using V1.1.1.
Regards,
Thomas