Author Topic: VL53l0x api  (Read 505 times)

0 Members and 1 Guest are viewing this topic.

Offline TadeuszhTopic starter

  • Newbie
  • Posts: 9
  • Country: pl
VL53l0x api
« on: March 25, 2024, 03:44:33 pm »
Hi there,
So im trying to configurate the VL53l0x API, there were multiple errors but i found a tutorial and it helped me so far with getting rid of them. But I'm stuck, I've done everything and I have one final error "fatal error: vl53l0x_api.c: No such file or directory". I have no idea how to solve it, i've added every possible source to the IDE and yet it doesnt work.

Have anyone had this kind of issue before?
 

Offline eutectique

  • Frequent Contributor
  • **
  • Posts: 392
  • Country: be
Re: VL53l0x api
« Reply #1 on: March 25, 2024, 06:23:12 pm »
I can see /.../Drivers and /.../Debug/Drivers/Api/Core/src mentioned but not /.../Drivers/Api/Core/src where the file is residing. My crystal ball is on maintenance, can't say what your IDE is and how to configure it properly.
 

Offline TadeuszhTopic starter

  • Newbie
  • Posts: 9
  • Country: pl
Re: VL53l0x api
« Reply #2 on: March 25, 2024, 06:47:02 pm »
I've tried it already, maybe im doing something wrong...
 

Offline eutectique

  • Frequent Contributor
  • **
  • Posts: 392
  • Country: be
Re: VL53l0x api
« Reply #3 on: March 25, 2024, 06:51:14 pm »
You are including this file. Do you have the path among the included directories?

Edit No, you don't.
 

Offline TadeuszhTopic starter

  • Newbie
  • Posts: 9
  • Country: pl
Re: VL53l0x api
« Reply #4 on: March 25, 2024, 06:55:42 pm »
Are You asking for this one? I'm sorry im kinda new to this.
 

Offline eutectique

  • Frequent Contributor
  • **
  • Posts: 392
  • Country: be
Re: VL53l0x api
« Reply #5 on: March 25, 2024, 07:00:42 pm »
Yes. You are using #include directive, so the file should be listed among include directories.

In the 1s.png screenshot you can see compiler commands, there are include options of the form -I../Core/Inc and so on. These are include directories, and you are missing the one which contains your file.
 

Offline TadeuszhTopic starter

  • Newbie
  • Posts: 9
  • Country: pl
Re: VL53l0x api
« Reply #6 on: March 25, 2024, 07:05:46 pm »
I think i've got it, but um... compiler now warns about 260 errors. It says that the functions are used multiple times, don't really get it, it's and api from the producer of the sensors.
 

Offline TadeuszhTopic starter

  • Newbie
  • Posts: 9
  • Country: pl
Re: VL53l0x api
« Reply #7 on: March 25, 2024, 07:10:50 pm »
Not sure if the screenshot can be read, it says "Users/mikol/STM32CubeIDE/workspace_1.14.1/uubibiujb/Debug/../Drivers/Api/core/src/vl53l0x_api_strings.c:383: multiple definition of `VL53L0X_get_sequence_steps_info'; ./Api_src/vl53l0x_api_strings.o:C:/Users/mikol/STM32CubeIDE/workspace_1.14.1/uubibiujb/Drivers/Api/core/src/vl53l0x_api_strings.c:383: first defined here" like 260 times. ;/
 

Offline eutectique

  • Frequent Contributor
  • **
  • Posts: 392
  • Country: be
Re: VL53l0x api
« Reply #8 on: March 25, 2024, 07:16:05 pm »
Why do you #include this file into main.c? I guess you should add it to the project source files, so that it will be compiled separately.

There is probably a file named vl53l0x_api.h which you are supposed to include?
 

Offline TadeuszhTopic starter

  • Newbie
  • Posts: 9
  • Country: pl
Re: VL53l0x api
« Reply #9 on: March 25, 2024, 07:28:13 pm »
So i've changed the "#include "vl53l0x_api.c" to "#include "vl53l0x_api.h" as you said and it gives 0 errors! Seems like it's finally working. I dont know why it was "#include "vl53l0x_api.c" in the first place, the guide said that it should be...

Thanks a lot man, you are the best!
 

Offline eutectique

  • Frequent Contributor
  • **
  • Posts: 392
  • Country: be
Re: VL53l0x api
« Reply #10 on: March 25, 2024, 08:42:47 pm »
Glad I could help you.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf