Skip to main content
VBhat.1
Associate II
September 14, 2021
Solved

VL53L5CX-SATEL and Rpi Linux Driver Build failure?

  • September 14, 2021
  • 2 replies
  • 1465 views

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.

This topic has been closed for replies.
Best answer by Thomas.PEROTTO

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

2 replies

MOstr.1
Visitor II
September 17, 2021

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

VBhat.1
VBhat.1Author
Associate II
September 17, 2021

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
Thomas.PEROTTOBest answer
ST Employee
September 20, 2021

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