2019-06-26 11:29 AM
I have a custom circuit board and below is my setup
MCU: STM32L151C8T6
Sensor: VL53L0X
IDE: Atollic
Language: C
I came to notice that I must include the VL53L0X library to use it, and I'm having trouble doing so. I have downloaded the "en.STSW-IMG005.zip" that contains the library for VL53L0X. I have included the "core" and "platform" folders into my project, but the compilation kept giving me the following error
"fatal error: vl53l0x_api.h: No such file or directory #include "vl53l0x_api.h"
I have included the .h to my main.c but the compilation error jumps from file to file, "vl53l0x_api_core.c", "vl53l0x_api_ranging.c", etc.
2019-06-28 02:58 PM
If the files are in your tree - and they should be, it's a matter of telling the IDE where to get them.
click on File in the upper left and then on import. Select the file and it will tell the IDE where to get the file.
After compilation, check the Build Console to insure you see the -I directory.
2019-06-29 01:47 PM
I have checked the build console and all the folders are in the -I directory. Everytime i hit build button the error will jump to another .c file.
2019-08-13 02:31 AM
Hi,
The easiest way for you is to download the X-CUBE-53L0A1 (API + example code for Keil, IAR and Eclipse) from st.com here.
Generate a project for STM32L151C8T6 target using Cube-MX. Then complete the project created with Cube-MX by porting the necessary files from the example code
C:\X-CUBE-53L0A1\X-CUBE-53L0A1\X-CUBE-53L0A1\STM32CubeExpansion_VL53L0X_V1.2.0\Projects\Multi\Examples\VL53L0X\RangingWithSatellites\SW4STM32\STM32F401RE-Nucleo
Thanks,
Julien