[Zigbee] How to overwrite libzboss_config

Setup: 

NCS v2.4.1

Hi, 

I would like to customize the ZBOSS binary by disabling some of the features which I am not going to use anyway. Like CONFIG_ZB_HAVE_SERIAL, CONFIG_ZB_USE_LEDS, CONFIG_ZB_USE_BUTTONS etc.


libzboss_config.h note:

/**
* This is an autogenerated file.
* Please use Kconfig to change it.
*/
I tried to set this configs to 'n' in my project prj.conf but then my build fails.  
What is the proper way of disabling any of the configs listed in nrfxlib/zboss/production/include/osif/libzboss_config.h? 
Will the binary be OTA compatible after disabling some of these features ? 
Thanks in advance,
Pawel



Parents
  • Hi, 

    What is the proper way of disabling any of the configs listed in nrfxlib/zboss/production/include/osif/libzboss_config.h? 

    You can't change those configs directly. The configs you can change in prj.conf are the ones here:

    https://github.com/nrfconnect/sdk-nrf/blob/v2.5.2/subsys/zigbee/Kconfig

    In most cases he can replace "ZB" with "ZIGBEE". So for example for serial, LEDs, and buttons which you asks for you can use

    Will the binary be OTA compatible after disabling some of these features ? 

    You can check the Configuring Zigbee FOTA to see the related configs. 

    Regards,
    Amanda H.

  • Hi, 

    Do you mean that configs listed in libzboss_config can not be changed ? or do you mean that changing them is possible but not in a obvious way through prj.conf ? 

    CONFIG_ZIGBEE_USE_BUTTONS=n
    CONFIG_ZIGBEE_USE_DIMMABLE_LED=n
    CONFIG_ZIGBEE_USE_LEDS=n
    


    Disabling configs above works smoothly in prj.conf but 

    CONFIG_ZIGBEE_HAVE_SERIAL=n generates an error during build

    [507/552] Linking C executable zephyr/zephyr_pre0.elf
    FAILED: zephyr/zephyr_pre0.elf zephyr/zephyr_pre0.map /home/sc/Desktop/es/FH-EV_CHARGER/build/zephyr/zephyr_pre0.map 
    : && ccache /home/sc/zephyr_sdk/zephyr-sdk-0.15.2/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc  -gdwarf-4 zephyr/CMakeFiles/zephyr_pre0.dir/misc/empty_file.c.obj -o zephyr/zephyr_pre0.elf  zephyr/CMakeFiles/offsets.dir/./arch/arm/core/offsets/offsets.c.obj  -fuse-ld=bfd  -T  zephyr/linker_zephyr_pre0.cmd  -Wl,-Map=/home/sc/Desktop/es/FH-EV_CHARGER/build/zephyr/zephyr_pre0.map  -Wl,--whole-archive  app/libapp.a  zephyr/libzephyr.a  zephyr/arch/common/libarch__common.a  zephyr/arch/arch/arm/core/aarch32/libarch__arm__core__aarch32.a  zephyr/arch/arch/arm/core/aarch32/cortex_m/libarch__arm__core__aarch32__cortex_m.a  zephyr/arch/arch/arm/core/aarch32/mpu/libarch__arm__core__aarch32__mpu.a  zephyr/lib/libc/minimal/liblib__libc__minimal.a  zephyr/soc/arm/common/cortex_m/libsoc__arm__common__cortex_m.a  zephyr/soc/arm/nordic_nrf/nrf52/libsoc__arm__nordic_nrf__nrf52.a  zephyr/subsys/mgmt/mcumgr/mgmt/libsubsys__mgmt__mcumgr__mgmt.a  zephyr/subsys/mgmt/mcumgr/smp/libsubsys__mgmt__mcumgr__smp.a  zephyr/subsys/mgmt/mcumgr/util/libsubsys__mgmt__mcumgr__util.a  zephyr/subsys/mgmt/mcumgr/grp/img_mgmt/libsubsys__mgmt__mcumgr__grp__img_mgmt.a  zephyr/subsys/mgmt/mcumgr/grp/os_mgmt/libsubsys__mgmt__mcumgr__grp__os_mgmt.a  zephyr/subsys/mgmt/mcumgr/grp/zephyr_basic/libsubsys__mgmt__mcumgr__grp__zephyr_basic.a  zephyr/subsys/mgmt/mcumgr/transport/libsubsys__mgmt__mcumgr__transport.a  zephyr/subsys/random/libsubsys__random.a  zephyr/subsys/bluetooth/common/libsubsys__bluetooth__common.a  zephyr/subsys/bluetooth/host/libsubsys__bluetooth__host.a  zephyr/subsys/bluetooth/crypto/libsubsys__bluetooth__crypto.a  zephyr/subsys/dfu/boot/libsubsys__dfu__boot.a  zephyr/subsys/net/libsubsys__net.a  zephyr/subsys/net/ip/libsubsys__net__ip.a  zephyr/drivers/clock_control/libdrivers__clock_control.a  zephyr/drivers/console/libdrivers__console.a  zephyr/drivers/counter/libdrivers__counter.a  zephyr/drivers/crypto/libdrivers__crypto.a  zephyr/drivers/entropy/libdrivers__entropy.a  zephyr/drivers/flash/libdrivers__flash.a  zephyr/drivers/gpio/libdrivers__gpio.a  zephyr/drivers/hwinfo/libdrivers__hwinfo.a  zephyr/drivers/ieee802154/libdrivers__ieee802154.a  zephyr/drivers/pinctrl/libdrivers__pinctrl.a  zephyr/drivers/serial/libdrivers__serial.a  zephyr/drivers/spi/libdrivers__spi.a  zephyr/drivers/timer/libdrivers__timer.a  zephyr/drivers/watchdog/libdrivers__watchdog.a  modules/nrf/lib/dk_buttons_and_leds/lib..__nrf__lib__dk_buttons_and_leds.a  modules/nrf/lib/multithreading_lock/lib..__nrf__lib__multithreading_lock.a  modules/nrf/subsys/bluetooth/controller/lib..__nrf__subsys__bluetooth__controller.a  modules/nrf/subsys/dfu/dfu_multi_image/lib..__nrf__subsys__dfu__dfu_multi_image.a  modules/nrf/subsys/dfu/dfu_target/lib..__nrf__subsys__dfu__dfu_target.a  modules/nrf/subsys/mpsl/init/lib..__nrf__subsys__mpsl__init.a  modules/nrf/subsys/mpsl/fem/lib..__nrf__subsys__mpsl__fem.a  modules/nrf/subsys/zigbee/lib/zigbee_fota/lib..__nrf__subsys__zigbee__lib__zigbee_fota.a  modules/nrf/subsys/zigbee/lib/zigbee_app_utils/lib..__nrf__subsys__zigbee__lib__zigbee_app_utils.a  modules/nrf/subsys/zigbee/lib..__nrf__subsys__zigbee.a  modules/nrf/subsys/nfc/ndef/lib..__nrf__subsys__nfc__ndef.a  modules/nrf/subsys/nfc/lib/lib..__nrf__subsys__nfc__lib.a  modules/nrf/subsys/fw_info/lib..__nrf__subsys__fw_info.a  modules/nrf/subsys/ieee802154/lib..__nrf__subsys__ieee802154.a  modules/nrf/drivers/mpsl/clock_control/lib..__nrf__drivers__mpsl__clock_control.a  modules/nrf/drivers/mpsl/flash_sync/lib..__nrf__drivers__mpsl__flash_sync.a  modules/nrf/drivers/mpsl/temp_nrf5/lib..__nrf__drivers__mpsl__temp_nrf5.a  modules/nrf/drivers/hw_cc310/lib..__nrf__drivers__hw_cc310.a  modules/mcuboot/boot/bootutil/zephyr/libmcuboot_util.a  modules/hal_nordic/nrf_802154/libnrf-802154-platform.a  modules/nrfxlib/nrf_802154/nrf_802154/driver/libnrf-802154-driver.a  modules/hal_nordic/nrfx/libmodules__hal_nordic__nrfx.a  modules/segger/libmodules__segger.a  modules/zcbor/libmodules__zcbor.a  modules/nrfxlib/nrfxlib/zboss/production/lib..__nrfxlib__zboss__production.a  modules/nrfxlib/nrfxlib/zboss/production/src/libzboss-sources.a  -Wl,--no-whole-archive  zephyr/kernel/libkernel.a  -L"/home/sc/zephyr_sdk/zephyr-sdk-0.15.2/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.1.0/thumb/v7e-m+fp/hard"  -L/home/sc/Desktop/es/FH-EV_CHARGER/build/zephyr  -lgcc  zephyr/arch/common/libisr_tables.a  /home/sc/ncs/ncs_v2.4.1/nrfxlib/crypto/nrf_oberon/lib/cortex-m4/hard-float/liboberon_3.0.13.a  modules/hal_nordic/nrf_802154/libnrf-802154-platform.a  /home/sc/ncs/ncs_v2.4.1/nrfxlib/nrf_802154/sl/sl/lib/nRF52840/hard-float/libnrf-802154-sl.a  /home/sc/ncs/ncs_v2.4.1/nrfxlib/zboss/production/lib/cortex-m4/hard-float/libzboss.a  /home/sc/ncs/ncs_v2.4.1/nrfxlib/zboss/production/lib/cortex-m4/hard-float/libgppb.a  -mcpu=cortex-m4  -mthumb  -mabi=aapcs  -mfpu=fpv4-sp-d16  -mfloat-abi=hard  -Wl,--gc-sections  -Wl,--build-id=none  -Wl,--sort-common=descending  -Wl,--sort-section=alignment  -Wl,-u,_OffsetAbsSyms  -Wl,-u,_ConfigAbsSyms  -nostdlib  -static  -Wl,-X  -Wl,-N  -Wl,--orphan-handling=warn  -Wl,-no-pie  /home/sc/ncs/ncs_v2.4.1/nrfxlib/nfc/lib/cortex-m4/hard-float/libnfc_t2t.a  /home/sc/ncs/ncs_v2.4.1/nrfxlib/crypto/nrf_cc310_platform/lib/cortex-m4/hard-float/no-interrupts/libnrf_cc310_platform_0.9.17.a  /home/sc/ncs/ncs_v2.4.1/nrfxlib/softdevice_controller/lib/cortex-m4/hard-float/libsoftdevice_controller_multirole.a  /home/sc/ncs/ncs_v2.4.1/nrfxlib/mpsl/lib/cortex-m4/hard-float/libmpsl.a && cd /home/sc/Desktop/es/FH-EV_CHARGER/build/zephyr && /usr/bin/cmake -E echo
    /home/sc/zephyr_sdk/zephyr-sdk-0.15.2/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.1.0/../../../../arm-zephyr-eabi/bin/ld.bfd: modules/nrf/subsys/zigbee/lib..__nrf__subsys__zigbee.a(zb_nrf_platform.c.obj): in function `zb_osif_init':
    /home/sc/ncs/ncs_v2.4.1/nrf/subsys/zigbee/osif/zb_nrf_platform.c:560: undefined reference to `zb_osif_serial_init'
    /home/sc/zephyr_sdk/zephyr-sdk-0.15.2/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.1.0/../../../../arm-zephyr-eabi/bin/ld.bfd: modules/nrf/subsys/zigbee/lib..__nrf__subsys__zigbee.a(zb_nrf_platform.c.obj): in function `zb_osif_abort':
    /home/sc/ncs/ncs_v2.4.1/nrf/subsys/zigbee/osif/zb_nrf_platform.c:582: undefined reference to `zb_osif_serial_flush'
    /home/sc/zephyr_sdk/zephyr-sdk-0.15.2/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.1.0/../../../../arm-zephyr-eabi/bin/ld.bfd: /home/sc/ncs/ncs_v2.4.1/nrfxlib/zboss/production/lib/cortex-m4/hard-float/libzboss.a(zb_init_default.o): in function `zb_init':
    zb_init_default.c:(.text.zb_init+0x14): undefined reference to `zb_osif_serial_init'
    /home/sc/zephyr_sdk/zephyr-sdk-0.15.2/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.1.0/../../../../arm-zephyr-eabi/bin/ld.bfd: /home/sc/ncs/ncs_v2.4.1/nrfxlib/zboss/production/lib/cortex-m4/hard-float/libzboss.a(zb_serial_trace_bin.o): in function `zb_trace_put_bytes':
    zb_serial_trace_bin.c:(.text.zb_trace_put_bytes+0x1c): undefined reference to `zb_osif_serial_put_bytes'
    collect2: error: ld returned 1 exit status
    ninja: build stopped: subcommand failed.

    light_switch sample is enough to reproduce that

    Regards,
    Pawel
  • I can reproduce it. Let me check with the team and then back to you. 

Reply Children
Related