Hi,
unfortunately I'm stuck again with CMake and external sources.
I'm not able to find the right way to add ST VL53L0X Api to my project to use it.
If some one help me I'll appreciate.
Add VL53L0X Api to ESP-IDF project
-
- Posts: 9766
- Joined: Thu Nov 26, 2015 4:08 am
Re: Add VL53L0X Api to ESP-IDF project
Sorry, I left my crystal ball home today, so I'm unable to diagnose your problem from just 'I'm stuck again'. Can you post where you are stuck, what the output of the compile process is, what you have tried, perhaps even a link to your code? That will help immensely in us being able to tell you what to do.
Re: Add VL53L0X Api to ESP-IDF project
I want to add the VL53L0X Api to my project
then in main/CMake.txt I call
but when I reload CMake project I receive this error:
"add_library cannot create target "__idf_main" because another target with
the same name already exists. The existing target is a static library
created in source directory"
, I created a CMake.txt like this:
Code: Select all
set(COMPONENT_SRCS
"core/src/vl53l0x_api.c"
"core/src/vl53l0x_api_calibration.c"
"core/src/vl53l0x_api_core.c"
"core/src/vl53l0x_api_ranging.c"
"core/src/vl53l0x_api_strings.c"
"platform/src/vl53l0x_platform.c"
"platform/src/vl53l0x_platform_log.c"
)
set(COMPONENT_ADD_INCLUDEDIRS "." "core/inc" "platform/inc")
register_component()
Code: Select all
add_subdirectory(...mylib/vl53l0x_Api VL53L0X)
"add_library cannot create target "__idf_main" because another target with
the same name already exists. The existing target is a static library
created in source directory"
Re: Add VL53L0X Api to ESP-IDF project
I think you need to write the platform specific parts under vl53l0x_platform.h like the documentation says to use the api for esp32.
You already did that?!
You already did that?!
Who is online
Users browsing this forum: No registered users and 158 guests