VL53L1X being included when it shouldnt

I have a private version of the VL53L1X driver ecause the driver in ncs2.9.0 hasnt been properly updated per my previous case.  They suggested changing the CONFIG_VL53L1X=y to something like CONFIG_VL53L1X_PRIV which I have done.  All of my code is compiled fine, however so is the driver from ncs2.9.0  So i get duplicate definitions.  What would be causing this driver to still be included?

c:/ncs/toolchains/b620d30767/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd.exe: zephyr/drivers/sensor/st/vl53l1x/libdrivers__sensor__st__vl53l1x.a(vl53l1_platform.c.obj): in function `VL53L1_WriteMulti':
C:/ncs/v2.9.0/zephyr/drivers/sensor/st/vl53l1x/vl53l1_platform.c:25: multiple definition of `VL53L1_WriteMulti'; app/libapp.a(vl53l1_platform.c.obj):C:/Users/-----/source/repos/hhhhhh-plus/cpuapp/src/vl53l1x/vl53l1_platform.c:25: first defined here

etc...

I have defined a new config: 

CONFIG_VL53L1X_ABC=y
my kconfig file now contains:
menuconfig VL53L1X_ABC
	bool "VL53L1X time of flight sensor"
	#depends on I2C <--took out because of a circular reference
	select HAS_STLIB
	help
	  Enable driver for VL53L1X_ABC I2C-based time of flight sensor.

if VL53L1X_ABC

config VL53L1X_PROXIMITY_THRESHOLD
	int "Proximity threshold in millimeters"
	default 100
	depends on VL53L1X_ABC
	help
	  Threshold used for proximity detection when sensor is used with SENSOR_CHAN_PROX.

config VL53L1X_INTERRUPT_MODE
	bool "Use interrupt mode for VL53L1X time of flight sensor"
	default n
	depends on GPIO
	help
	  Enable interrupt mode for VL53L1X time of flight sensor. Otherwise,
	  the driver will use the polling method.

config VL53L1X_XSHUT
	bool "Use xshut pin on VL53L1X time of flight sensor"
  default n
	depends on GPIO
	help
	  Enable to use the xshut pin on the VL53L1X. If not, the pin should be
	  connected to VDD.

module = VL53L1X_ABC
module-str = VL53L1X_ABC
source "${ZEPHYR_BASE}/subsys/logging/Kconfig.template.log_config"

module = RANGER
module-str = RANGER
source "${ZEPHYR_BASE}/subsys/logging/Kconfig.template.log_config"

endif # VL53L1X_ABC
Im not sure what else i have to do.  im working my way through devacademy but that obviously takes some time.  ive been tasked to get this code from 2.3.0 to 2.9.0 and have made great progress and i think this is the last problem since it happens during link.
Brian
Parents
  • Hi Brian,

    I looked into the VL53L1X driver built in the SDK, and it should only be included when CONFIG_VL53L1X ís enabled.
    Ref: https://github.com/nrfconnect/sdk-zephyr/blob/v3.7.99-ncs2/drivers/sensor/st/CMakeLists.txt

    Could you please check the compiled .config file of your application to see if that config is accidentally enabled?

    It is in <project>/<build_dir>/<project_dir_name>/zephyr/.config.

    Hieu

  • CONFIG_VL53L1X_ABC=y
    CONFIG_VL53L1X_PROXIMITY_THRESHOLD=100
    # CONFIG_VL53L1X_INTERRUPT_MODE is not set
    # CONFIG_VL53L1X_XSHUT is not set
    # CONFIG_VL53L1X_ABC_LOG_LEVEL_OFF is not set
    CONFIG_VL53L1X_ABC_LOG_LEVEL_ERR=y
    # CONFIG_VL53L1X_ABC_LOG_LEVEL_WRN is not set
    # CONFIG_VL53L1X_ABC_LOG_LEVEL_INF is not set
    # CONFIG_VL53L1X_ABC_LOG_LEVEL_DBG is not set
    # CONFIG_VL53L1X_ABC_LOG_LEVEL_DEFAULT is not set
    CONFIG_VL53L1X_ABC_LOG_LEVEL=1
    These are all the VL53L1X lines in .config  but as you can see from the above it still is pulling the zepyr version:
    zephyr/drivers/sensor/st/vl53l1x/libdrivers__sensor__st__vl53l1x.a(vl53l1_platform.c.obj): in function `VL53L1_WriteMulti':
    If i could get the zephyr version to work i can exclude mine.  but you cant include the header file for some reason, another ticket I had on a similar subject said that it wasnt fully implemented yet in 2.9.0
Reply
  • CONFIG_VL53L1X_ABC=y
    CONFIG_VL53L1X_PROXIMITY_THRESHOLD=100
    # CONFIG_VL53L1X_INTERRUPT_MODE is not set
    # CONFIG_VL53L1X_XSHUT is not set
    # CONFIG_VL53L1X_ABC_LOG_LEVEL_OFF is not set
    CONFIG_VL53L1X_ABC_LOG_LEVEL_ERR=y
    # CONFIG_VL53L1X_ABC_LOG_LEVEL_WRN is not set
    # CONFIG_VL53L1X_ABC_LOG_LEVEL_INF is not set
    # CONFIG_VL53L1X_ABC_LOG_LEVEL_DBG is not set
    # CONFIG_VL53L1X_ABC_LOG_LEVEL_DEFAULT is not set
    CONFIG_VL53L1X_ABC_LOG_LEVEL=1
    These are all the VL53L1X lines in .config  but as you can see from the above it still is pulling the zepyr version:
    zephyr/drivers/sensor/st/vl53l1x/libdrivers__sensor__st__vl53l1x.a(vl53l1_platform.c.obj): in function `VL53L1_WriteMulti':
    If i could get the zephyr version to work i can exclude mine.  but you cant include the header file for some reason, another ticket I had on a similar subject said that it wasnt fully implemented yet in 2.9.0
Children
No Data
Related