cancel
Showing results for 
Search instead for 
Did you mean: 

VL53L5CX-SATEL and Rpi Linux Driver Build failure?

VBhat.1
Associate III

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.

1 ACCEPTED SOLUTION

Accepted Solutions
Thomas.PEROTTO
ST Employee

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

View solution in original post

3 REPLIES 3
MOstr.1
Associate

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

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.

Thomas.PEROTTO
ST Employee

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