cancel
Showing results for 
Search instead for 
Did you mean: 

How to implement en.VL53L1CB_BareDriver (STSW-IMG019) for VL53L1 using NUCLEOF401RE ?

VNava
Associate III

Hi! My name is Vincenzo,

I would like to know how to include the driver for VL53L1 inside an application for F401RE.

Up to now I have used the X-CUBE-53L1A2 which helped me to easily implement the driver using the structure of this software as a reference, but now, I would like to learn to include the API for VL53L1 starting from the bare driver.

I place this problem in the community, because until now, my attempts have ended in an error message concerning the windows.h header

I also encountered this error when trying to include the driver for VL53L3CX, and also in this case i used the X-CUBE software for VL53L3CX.

Moreover, in the community also I run into something similar to my problem:

https://community.st.com/s/global-search/Where%20to%20locate%20missing%20header%20files%20for%20VL53L0X%20API%3F

How can I fix this windows.h file issue?

NOTE: i'm using STM32CubeIDE or SW4STM32

Thanks in advance for your support!

Vincenzo

1 ACCEPTED SOLUTION

Accepted Solutions
Ben1
Associate III

Hi,

The API comes with vl53l1cb_platform.c and vl53l1cb_platform.h you have to customize. In the case of bare driver, it is already customized with features you don't really need, included this window.h (for debug purpose it seems). I faced the same problem and I switched to the API I took from expasion board example like you did with the STSW-IMG019 to make it work. This API is customized to fit STM32F4 application, so it works well

View solution in original post

3 REPLIES 3
VNava
Associate III

UPDATE:

I also observed that the platform part of the X-CUBE-53L1A2 (X-CUBE-53L3A2) software and the platform part of the baredriver STSW-IMG019 (STSW-IMG015) are different. Now I ask myself, Are the two platform parts really different? If so, what changes?

Why by including the driver as in the case of X-CUBE-53L3A2 the compilation ends successfully, while including it in the form of a bare driver I go into error?

What is the role of the windows.h header in bare driver?

Thanks in advance for your support,

Vincenzo

Ben1
Associate III

Hi,

The API comes with vl53l1cb_platform.c and vl53l1cb_platform.h you have to customize. In the case of bare driver, it is already customized with features you don't really need, included this window.h (for debug purpose it seems). I faced the same problem and I switched to the API I took from expasion board example like you did with the STSW-IMG019 to make it work. This API is customized to fit STM32F4 application, so it works well

VNava
Associate III

Thanks for this useful information.

Vincenzo