Using VL53L0X with STM32L151 MCU, library header file compilation error
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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.
- Labels:
-
Time of flight
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-06-28 2: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.
If this or any post solves your issue, please mark them as 'Accept as Solution' It really helps. And if you notice anything wrong do not hesitate to 'Report Inappropriate Content'. Someone will review it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-06-29 1: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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-08-13 2: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
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
