Skip to main content
Visitor II
August 11, 2019
Solved

Where to locate missing header files for VL53L0X API?

  • August 11, 2019
  • 2 replies
  • 1322 views

Hi all

I am currently trying to integrate the VL53L0X sensor to a STM32F33R8 using CubeMX and KEIL, but I haven't had the best of luck...

I am inexperienced regarding the integration of sensors and I2C.

I have watched countless videos integrating different I2C devices to an STM using KEIL and CubeMX.

I have tried replicating Arduino library codes for this sensor, but I fail to understand what is accomplished by each function.

I have downloaded the API and API user manual. I have read the datasheet for the VL53L0X which only seems to provide me with two addresses for reading and writing (0x52 and 0x53). I have managed to send an "is device ready" command that came out true.

The datasheet seem to rely on the API library provided by ST, making it hard (or impossible for a newbie such as myself) to integrate otherwise.

Now my issue is: after downloading the API and including all c-files and header-files provided under the API folder (core and platform) I am unable to build the project and get an error message that the windows.h, Windows.h and SERIAL_COMMS.h files do not exist.

I do not understand why windows.h is needed, but it seems to complicate issues when I try to remove the #include. The SERIAL_COMMS.h sounds important and also (as expected) gives complications when removed.

I also get a strange error saying "expected a ';'" when a semicolon is already provided.

Does anyone know how to resolve this issue? Is there anyone who also struggle with this issue?

    This topic has been closed for replies.
    Best answer by Julien NGUYEN

    ​Hi ADP1114,

    I can understand your frustration.

    The VL53L0X API can be found in two software package.

    The VL53L0X API  (STSW-IMG005) you recently downloaded and also in the X-CUBE-53L0A1.

    For your usage I suggest you to download the X-CUBE-53L0A1. Use CUBE-MX to create the STM32F33R8 project template. Complete the STM32F33R8 project with the existing example code in X-CUBE-53L0A1\STM32CubeExpansion_VL53L0X_V1.2.0\Projects\Multi\Examples\VL53L0X\RangingWithSatellites\MDK-ARM\STM32F401RE-Nucleo

    I hope it helps you.

    Julien

    2 replies

    Graduate II
    August 11, 2019

    Windows.h suggest the app in question is PC hosted​

    ST Employee
    August 12, 2019

    ​Hi ADP1114,

    I can understand your frustration.

    The VL53L0X API can be found in two software package.

    The VL53L0X API  (STSW-IMG005) you recently downloaded and also in the X-CUBE-53L0A1.

    For your usage I suggest you to download the X-CUBE-53L0A1. Use CUBE-MX to create the STM32F33R8 project template. Complete the STM32F33R8 project with the existing example code in X-CUBE-53L0A1\STM32CubeExpansion_VL53L0X_V1.2.0\Projects\Multi\Examples\VL53L0X\RangingWithSatellites\MDK-ARM\STM32F401RE-Nucleo

    I hope it helps you.

    Julien

    ADP1114Author
    Visitor II
    August 12, 2019

    Thank you so much. I will do this and verify whether it worked.