Skip to main content
Associate
December 16, 2024
Solved

VL53L0X library installation error

  • December 16, 2024
  • 1 reply
  • 902 views

I have added all the drivers for the VL53L0X API, but I still encounter this error. Why is that?image.png

Best answer by John E KVAM

When interfacing the sensor with your MCU, it is up to you to write the 'platform' layer. This layer actually executes the I2C_read and I2C_write commands.

As delivered, the platform layer is configured to interface to a PC using its internal bus. (It's how ST developed the code.)

No one wants that. 

So, edit the platform.c file - remove all the guts of those functions (references to Windows) . You should be left with a half dozen functions that look like 

VL53L0X_Error VL53L0X_WriteMulti(...) 

Re-write those functions for your MCU. 

Perhaps you don't have to the work. Look in GetHub.com for someone who has already written I2C functions for your MCU. 

- john 

1 reply

Daijr11Author
Associate
December 16, 2024

Help me please!!!!!

John E KVAM
John E KVAMBest answer
ST Employee
December 16, 2024

When interfacing the sensor with your MCU, it is up to you to write the 'platform' layer. This layer actually executes the I2C_read and I2C_write commands.

As delivered, the platform layer is configured to interface to a PC using its internal bus. (It's how ST developed the code.)

No one wants that. 

So, edit the platform.c file - remove all the guts of those functions (references to Windows) . You should be left with a half dozen functions that look like 

VL53L0X_Error VL53L0X_WriteMulti(...) 

Re-write those functions for your MCU. 

Perhaps you don't have to the work. Look in GetHub.com for someone who has already written I2C functions for your MCU. 

- john