Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs

Adding ZCL clusters to application - Temperature - Error with build

Hi,

I've been trying to learn how to use the SDK and I was following the Adding ZCL clusters to application guide to add temperature. I skipped adding the on/off switch and so I used `ZBOSS_DECLARE_DEVICE_CTX_2_EP` instead of `ZBOSS_DECLARE_DEVICE_CTX_3_EP`.

I've been getting build errors and I haven't been able to figure out what I've done wrong. I've been comparing my main.c to the guide, and also to several of the SDK examples (light bulb, light switch, weather station, etc.). I'm using SDK V2.2.0

Can somebody please help me figure this out?

Kind regards,
Dan

What I've Done:

Following the guide, I included zb_zcl_temp_measurement_addons.h

#include <zephyr/kernel.h>
#include <zephyr/logging/log.h>
#include <dk_buttons_and_leds.h>

#include <zboss_api.h>
#include <zigbee/zigbee_error_handler.h>
#include <zigbee/zigbee_app_utils.h>
#include <zb_nrf_platform.h>
#include "zb_range_extender.h"

/* Include temperature measurement. */
#include <addons/zcl/zb_zcl_temp_measurement_addons.h>

I defined the temperature measurement endpoint and placed this under the app template endpoint.

/* Device endpoint, used to receive ZCL commands. */
#define APP_TEMPLATE_ENDPOINT               10

/* Endpoint used to send temperature data. */
#define TEMPERATURE_SENSOR_ENDPOINT			12

I added the temperature measurement attributes to the zb_device_ctx structure.

struct zb_device_ctx {
	zb_zcl_basic_attrs_t 			basic_attr;
	zb_zcl_identify_attrs_t 		identify_attr;
	zb_zcl_temp_measurement_attrs_t	temp_measure_attrs;
};

I declared the attribute list for the temperature measurement cluster, the cluster list for the device, declared the endpoint, and edited the device context. I also moved the device context below the other declarations.

/* Declare attribute list for temperature measurement cluster. */
ZB_ZCL_DECLARE_TEMP_MEASUREMENT_ATTRIB_LIST(
	temp_measurement_attr_list,
	&dev_ctx.temp_measure_attrs.measure_value,
	&dev_ctx.temp_measure_attrs.min_measure_value,
	&dev_ctx.temp_measure_attrs.max_measure_value,
	&dev_ctx.temp_measure_attrs.tolerance);

/* Declare cluster list for temperature measurement device. */
ZB_HA_DECLARE_TEMPERATURE_SENSOR_CLUSTER_LIST(
	temperature_sensor_clusters,
	basic_attr_list,
	identify_attr_list,
	temp_measurement_attr_list);

/* Declare endpoint for temperature measurement device. */
ZB_HA_DECLARE_TEMPERATURE_SENSOR_EP(
	temperature_sensor_ep,
	TEMPERATURE_SENSOR_ENDPOINT,
	temperature_sensor_clusters);

ZBOSS_DECLARE_DEVICE_CTX_2_EP(
	app_template_ctx,
	app_template_ep,
	temperature_sensor_ep);

VS Code highlights `TEMPERATURE_SENSOR_ENDPOINT` from the `ZB_HA_DECLARE_TEMPERATURE_SENSOR_EP` declaration saying "expected an identifier".
And it highlights `ZBOSS_DECLARE_DEVICE_CTX_2_EP(...` saying "identifier "temperature_sensor_ep" is undefined".

When I try to build, I get the following output in terminal.

n:\Projects\Nordic\myApps\RGBWC_nRF52840\src\main.c:114:1: warning: data definition has no type or storage class
  114 | ZB_HA_DECLARE_TEMPERATURE_SENSOR_CLUSTER_LIST(
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
n:\Projects\Nordic\myApps\RGBWC_nRF52840\src\main.c:114:1: error: type defaults to 'int' in declaration of 'ZB_HA_DECLARE_TEMPERATURE_SENSOR_CLUSTER_LIST' [-Werror=implicit-int]
n:\Projects\Nordic\myApps\RGBWC_nRF52840\src\main.c:118:9: warning: parameter names (without types) in function declaration
  118 |         temp_measurement_attr_list);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
n:\Projects\Nordic\myApps\RGBWC_nRF52840\src\main.c:122:31: error: expected ')' before numeric constant
  122 |         temperature_sensor_ep,
      |                               ^
      |                               )
In file included from C:\ncs\SDK\v2.2.0\nrfxlib\zboss\production\include\zboss_api.h:52,
                 from n:\Projects\Nordic\myApps\RGBWC_nRF52840\src\main.c:38:
n:\Projects\Nordic\myApps\RGBWC_nRF52840\src\main.c:129:9: error: 'temperature_sensor_ep' undeclared here (not in a function)
  129 |         temperature_sensor_ep);
      |         ^~~~~~~~~~~~~~~~~~~~~
C:\ncs\SDK\v2.2.0\nrfxlib\zboss\production\include\zboss_api_af.h:586:6: note: in definition of macro 'ZBOSS_DECLARE_DEVICE_CTX_2_EP'
  586 |     &ep2_name,                                                          \
      |      ^~~~~~~~
cc1.exe: some warnings being treated as errors

  • I broke my main.c code into sections for the above explanation in the hopes that it would be easier to follow what I'd done. But in case having the full main.c is easier, please see below.

    /*
     * Copyright (c) 2021 Nordic Semiconductor ASA
     *
     * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
     */
    
    /** @file
     *
     * @brief Zigbee application template.
     */
    
    
    
    /*
    ________ Steps
    
    1. Start with nRF Zigbee Template example, from SDK V2.2.0. https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.2.0/nrf/samples/zigbee/template/README.html
    2. Add temperature by following this guide. https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/protocols/zigbee/adding_clusters.html
    3. 
    */
    
    
    #include <zephyr/kernel.h>
    #include <zephyr/logging/log.h>
    #include <dk_buttons_and_leds.h>
    
    #include <zboss_api.h>
    #include <zigbee/zigbee_error_handler.h>
    #include <zigbee/zigbee_app_utils.h>
    #include <zb_nrf_platform.h>
    #include "zb_range_extender.h"
    
    /* Include temperature measurement. */
    #include <addons/zcl/zb_zcl_temp_measurement_addons.h>
    
    
    /* Device endpoint, used to receive ZCL commands. */
    #define APP_TEMPLATE_ENDPOINT               10
    
    /* Endpoint used to send temperature data. */
    #define TEMPERATURE_SENSOR_ENDPOINT			12
    
    /* Type of power sources available for the device.
     * For possible values see section 3.2.2.2.8 of ZCL specification.
     */
    #define TEMPLATE_INIT_BASIC_POWER_SOURCE    ZB_ZCL_BASIC_POWER_SOURCE_DC_SOURCE
    
    /* LED indicating that device successfully joined Zigbee network. */
    #define ZIGBEE_NETWORK_STATE_LED            DK_LED3
    
    /* LED used for device identification. */
    #define IDENTIFY_LED                        DK_LED4
    
    /* Button used to enter the Identify mode. */
    #define IDENTIFY_MODE_BUTTON                DK_BTN4_MSK
    
    /* Button to start Factory Reset */
    #define FACTORY_RESET_BUTTON                IDENTIFY_MODE_BUTTON
    
    
    LOG_MODULE_REGISTER(app, LOG_LEVEL_INF);
    
    /* Main application customizable context.
     * Stores all settings and static values.
     */
    struct zb_device_ctx {
    	zb_zcl_basic_attrs_t 			basic_attr;
    	zb_zcl_identify_attrs_t 		identify_attr;
    	zb_zcl_temp_measurement_attrs_t	temp_measure_attrs;
    };
    
    /* Zigbee device application context storage. */
    static struct zb_device_ctx dev_ctx;
    
    ZB_ZCL_DECLARE_IDENTIFY_ATTRIB_LIST(
    	identify_attr_list,
    	&dev_ctx.identify_attr.identify_time);
    
    ZB_ZCL_DECLARE_BASIC_ATTRIB_LIST(
    	basic_attr_list,
    	&dev_ctx.basic_attr.zcl_version,
    	&dev_ctx.basic_attr.power_source);
    
    ZB_DECLARE_RANGE_EXTENDER_CLUSTER_LIST(
    	app_template_clusters,
    	basic_attr_list,
    	identify_attr_list);
    
    ZB_DECLARE_RANGE_EXTENDER_EP(
    	app_template_ep,
    	APP_TEMPLATE_ENDPOINT,
    	app_template_clusters);
    
    /* Declare attribute list for temperature measurement cluster. */
    ZB_ZCL_DECLARE_TEMP_MEASUREMENT_ATTRIB_LIST(
    	temp_measurement_attr_list,
    	&dev_ctx.temp_measure_attrs.measure_value,
    	&dev_ctx.temp_measure_attrs.min_measure_value,
    	&dev_ctx.temp_measure_attrs.max_measure_value,
    	&dev_ctx.temp_measure_attrs.tolerance);
    
    /* Declare cluster list for temperature measurement device. */
    ZB_HA_DECLARE_TEMPERATURE_SENSOR_CLUSTER_LIST(
    	temperature_sensor_clusters,
    	basic_attr_list,
    	identify_attr_list,
    	temp_measurement_attr_list);
    
    /* Declare endpoint for temperature measurement device. */
    ZB_HA_DECLARE_TEMPERATURE_SENSOR_EP(
    	temperature_sensor_ep,
    	TEMPERATURE_SENSOR_ENDPOINT,
    	temperature_sensor_clusters);
    
    ZBOSS_DECLARE_DEVICE_CTX_2_EP(
    	app_template_ctx,
    	app_template_ep,
    	temperature_sensor_ep);
    
    /**@brief Function for initializing all clusters attributes. */
    static void app_clusters_attr_init(void)
    {
    	/* Basic cluster attributes data */
    	dev_ctx.basic_attr.zcl_version = ZB_ZCL_VERSION;
    	dev_ctx.basic_attr.power_source = TEMPLATE_INIT_BASIC_POWER_SOURCE;
    
    	/* Identify cluster attributes data. */
    	dev_ctx.identify_attr.identify_time =
    		ZB_ZCL_IDENTIFY_IDENTIFY_TIME_DEFAULT_VALUE;
    }
    
    /**@brief Function to toggle the identify LED
     *
     * @param  bufid  Unused parameter, required by ZBOSS scheduler API.
     */
    static void toggle_identify_led(zb_bufid_t bufid)
    {
    	static int blink_status;
    
    	dk_set_led(IDENTIFY_LED, (++blink_status) % 2);
    	ZB_SCHEDULE_APP_ALARM(toggle_identify_led, bufid, ZB_MILLISECONDS_TO_BEACON_INTERVAL(100));
    }
    
    /**@brief Function to handle identify notification events on the first endpoint.
     *
     * @param  bufid  Unused parameter, required by ZBOSS scheduler API.
     */
    static void identify_cb(zb_bufid_t bufid)
    {
    	zb_ret_t zb_err_code;
    
    	if (bufid) {
    		/* Schedule a self-scheduling function that will toggle the LED */
    		ZB_SCHEDULE_APP_CALLBACK(toggle_identify_led, bufid);
    	} else {
    		/* Cancel the toggling function alarm and turn off LED */
    		zb_err_code = ZB_SCHEDULE_APP_ALARM_CANCEL(toggle_identify_led, ZB_ALARM_ANY_PARAM);
    		ZVUNUSED(zb_err_code);
    
    		dk_set_led(IDENTIFY_LED, 0);
    	}
    }
    
    /**@brief Starts identifying the device.
     *
     * @param  bufid  Unused parameter, required by ZBOSS scheduler API.
     */
    static void start_identifying(zb_bufid_t bufid)
    {
    	ZVUNUSED(bufid);
    
    	if (ZB_JOINED()) {
    		/* Check if endpoint is in identifying mode,
    		 * if not put desired endpoint in identifying mode.
    		 */
    		if (dev_ctx.identify_attr.identify_time ==
    		ZB_ZCL_IDENTIFY_IDENTIFY_TIME_DEFAULT_VALUE) {
    
    			zb_ret_t zb_err_code = zb_bdb_finding_binding_target(
    				APP_TEMPLATE_ENDPOINT);
    
    			if (zb_err_code == RET_OK) {
    				LOG_INF("Enter identify mode");
    			} else if (zb_err_code == RET_INVALID_STATE) {
    				LOG_WRN("RET_INVALID_STATE - Cannot enter identify mode");
    			} else {
    				ZB_ERROR_CHECK(zb_err_code);
    			}
    		} else {
    			LOG_INF("Cancel identify mode");
    			zb_bdb_finding_binding_target_cancel();
    		}
    	} else {
    		LOG_WRN("Device not in a network - cannot enter identify mode");
    	}
    }
    
    /**@brief Callback for button events.
     *
     * @param[in]   button_state  Bitmask containing buttons state.
     * @param[in]   has_changed   Bitmask containing buttons
     *                            that have changed their state.
     */
    static void button_changed(uint32_t button_state, uint32_t has_changed)
    {
    	if (IDENTIFY_MODE_BUTTON & has_changed) {
    		if (IDENTIFY_MODE_BUTTON & button_state) {
    			/* Button changed its state to pressed */
    		} else {
    			/* Button changed its state to released */
    			if (was_factory_reset_done()) {
    				/* The long press was for Factory Reset */
    				LOG_DBG("After Factory Reset - ignore button release");
    			} else   {
    				/* Button released before Factory Reset */
    
    				/* Start identification mode */
    				ZB_SCHEDULE_APP_CALLBACK(start_identifying, 0);
    			}
    		}
    	}
    
    	check_factory_reset_button(button_state, has_changed);
    }
    
    /**@brief Function for initializing LEDs and Buttons. */
    static void configure_gpio(void)
    {
    	int err;
    
    	err = dk_buttons_init(button_changed);
    	if (err) {
    		LOG_ERR("Cannot init buttons (err: %d)", err);
    	}
    
    	err = dk_leds_init();
    	if (err) {
    		LOG_ERR("Cannot init LEDs (err: %d)", err);
    	}
    }
    
    /**@brief Zigbee stack event handler.
     *
     * @param[in]   bufid   Reference to the Zigbee stack buffer
     *                      used to pass signal.
     */
    void zboss_signal_handler(zb_bufid_t bufid)
    {
    	/* Update network status LED. */
    	zigbee_led_status_update(bufid, ZIGBEE_NETWORK_STATE_LED);
    
    	/* No application-specific behavior is required.
    	 * Call default signal handler.
    	 */
    	ZB_ERROR_CHECK(zigbee_default_signal_handler(bufid));
    
    	/* All callbacks should either reuse or free passed buffers.
    	 * If bufid == 0, the buffer is invalid (not passed).
    	 */
    	if (bufid) {
    		zb_buf_free(bufid);
    	}
    }
    
    void main(void)
    {
    	LOG_INF("Starting Zigbee application template example");
    
    	/* Initialize */
    	configure_gpio();
    	register_factory_reset_button(FACTORY_RESET_BUTTON);
    
    	/* Register device context (endpoints). */
    	ZB_AF_REGISTER_DEVICE_CTX(&app_template_ctx);
    
    	app_clusters_attr_init();
    
    	/* Register handlers to identify notifications */
    	ZB_AF_SET_IDENTIFY_NOTIFICATION_HANDLER(APP_TEMPLATE_ENDPOINT, identify_cb);
    
    	/* Start Zigbee default thread */
    	zigbee_enable();
    
    	LOG_INF("Zigbee application template started");
    }

  • Hi, 

    I am looking into this case and will reply later. 

    Regards,
    Amanda H.

  • Thanks Amanda,

    I really appreciate it.

    I forgot to add that I'm using nRF52840 DK. I don't see why that would matter but I wanted to add it just in case.

    In VS Code, when I right click on the macros that were already in the example `main.c`, I can use the Go To Definition option to be taken to where those macros are defined. But I can't do this for the `ZB_HA_DECLARE_TEMPERATURE_SENSOR_CLUSTER_LIST` and `ZB_HA_DECLARE_TEMPERATURE_SENSOR_EP` macros that I added, because clicking that option doesn't do anything. Where in the guide does it mention including or defining these macros? Is that the problem I'm having?

    Kind regards,

    Dan

  • Hi, 

    I'm using SDK V2.2.0

    The guide is only suitable for v2.3.0. Please use NCS v2.3.0. 

    -Amanda H.

  • Thanks Amanda,

    Converting my project to SDK V2.3.0 didn't fix the issue. I followed the following steps to change SDK version and got the exact same errors.

    1. nRF Connect: Select nRF Connect SDK
    2. nRF Connect: Select nRF Connect SDK Toolchain
    3. Pristine build.

    In case it helps, here's the full terminal output from the build.

     *  Executing task: nRF Connect: Build: RGBWC_nRF52840/build (active) 
    
    Building RGBWC_nRF52840
    west build --build-dir n:\Projects\Nordic\myApps\RGBWC_nRF52840\build n:\Projects\Nordic\myApps\RGBWC_nRF52840
    
    [1/225] Building C object modules/nrfxlib/nrfxlib/zboss/production/src/CMakeFiles/zboss-sources.dir/zcl/zcl_s_daily_schedule.c.obj
    [2/225] Building C object modules/nrfxlib/nrfxlib/zboss/production/src/CMakeFiles/zboss-sources.dir/zcl/zcl_reporting.c.obj
    [3/225] Building C object modules/nrfxlib/nrfxlib/zboss/production/src/CMakeFiles/zboss-sources.dir/zcl/zcl_pressure_measurement.c.obj
    [4/225] Building C object modules/nrfxlib/nrfxlib/zboss/production/src/CMakeFiles/zboss-sources.dir/zcl/zcl_s_drlc.c.obj
    [5/225] Building C object modules/nrfxlib/nrfxlib/zboss/production/src/CMakeFiles/zboss-sources.dir/zcl/zcl_rel_humidity.c.obj
    [6/225] Building C object modules/nrfxlib/nrfxlib/zboss/production/src/CMakeFiles/zboss-sources.dir/zcl/zcl_scenes.c.obj
    [7/225] Building C object CMakeFiles/app.dir/src/main.c.obj
    FAILED: CMakeFiles/app.dir/src/main.c.obj 
    C:\ncs\SDK\toolchains\v2.3.0\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe -DCUSTOM_IEEE802154_L2=ZIGBEE_L2 -DKERNEL -DLIBZBOSS_CONFIG_FILE=\"C:/ncs/SDK/v2.3.0/nrfxlib/zboss/production/include/osif/libzboss_config.h\" -DNRF52840_XXAA -DNRF_802154_ACK_TIMEOUT_ENABLED=1 -DNRF_802154_CCA_CORR_LIMIT_DEFAULT=2 -DNRF_802154_CCA_CORR_THRESHOLD_DEFAULT=45 -DNRF_802154_CCA_ED_THRESHOLD_DEFAULT=45 -DNRF_802154_CCA_MODE_DEFAULT=NRF_RADIO_CCA_MODE_ED -DNRF_802154_ECB_PRIORITY=-1 -DNRF_802154_ENCRYPTION_ENABLED=0 -DNRF_802154_IE_WRITER_ENABLED=0 -DNRF_802154_INTERNAL_RADIO_IRQ_HANDLING=0 -DNRF_802154_PENDING_EXTENDED_ADDRESSES=16 -DNRF_802154_PENDING_SHORT_ADDRESSES=16 -DNRF_802154_RX_BUFFERS=16 -DNRF_802154_SECURITY_WRITER_ENABLED=0 -DNRF_802154_SWI_PRIORITY=1 -DNRF_802154_TX_STARTED_NOTIFY_ENABLED=1 -DNRF_802154_USE_RAW_API=1 -DUSE_PARTITION_MANAGER=1 -DZIGBEE_L2=ZIGBEE -D__PROGRAM_START -D__ZEPHYR__=1 -I../include -IC:/ncs/SDK/v2.3.0/nrf/drivers/mpsl/clock_control -IC:/ncs/SDK/v2.3.0/zephyr/include -Izephyr/include/generated -IC:/ncs/SDK/v2.3.0/zephyr/soc/arm/nordic_nrf/nrf52 -IC:/ncs/SDK/v2.3.0/zephyr/soc/arm/nordic_nrf/common/. -IC:/ncs/SDK/v2.3.0/nrf/include -IC:/ncs/SDK/v2.3.0/nrf/lib/multithreading_lock/. -IC:/ncs/SDK/v2.3.0/zephyr/drivers/flash -IC:/ncs/SDK/v2.3.0/nrf/tests/include -IC:/ncs/SDK/v2.3.0/modules/hal/cmsis/CMSIS/Core/Include -IC:/ncs/SDK/v2.3.0/modules/hal/nordic/nrfx -IC:/ncs/SDK/v2.3.0/modules/hal/nordic/nrfx/drivers/include -IC:/ncs/SDK/v2.3.0/modules/hal/nordic/nrfx/mdk -IC:/ncs/SDK/v2.3.0/zephyr/modules/hal_nordic/nrfx/. -IC:/ncs/SDK/v2.3.0/modules/debug/segger/SEGGER -IC:/ncs/SDK/v2.3.0/modules/debug/segger/Config -IC:/ncs/SDK/v2.3.0/zephyr/modules/segger/. -IC:/ncs/SDK/v2.3.0/nrfxlib/mpsl/include -IC:/ncs/SDK/v2.3.0/nrfxlib/mpsl/include/protocol -IC:/ncs/SDK/v2.3.0/nrfxlib/nrf_802154/driver/include -IC:/ncs/SDK/v2.3.0/nrfxlib/nrf_802154/sl/include -IC:/ncs/SDK/v2.3.0/nrf/subsys/zigbee/osif -IC:/ncs/SDK/v2.3.0/nrfxlib/zboss/production/src/zb_error -IC:/ncs/SDK/v2.3.0/nrfxlib/zboss/production/include/addons -IC:/ncs/SDK/v2.3.0/nrfxlib/zboss/production/include -IC:/ncs/SDK/v2.3.0/nrfxlib/zboss/production/include/zcl -IC:/ncs/SDK/v2.3.0/nrfxlib/zboss/production/include/ha -IC:/ncs/SDK/v2.3.0/nrfxlib/zboss/production/include/se -IC:/ncs/SDK/v2.3.0/nrfxlib/zboss/production/include/osif -isystem C:/ncs/SDK/v2.3.0/zephyr/lib/libc/minimal/include -isystem c:/ncs/sdk/toolchains/v2.3.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.1.0/include -isystem c:/ncs/sdk/toolchains/v2.3.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.1.0/include-fixed -isystem C:/ncs/SDK/v2.3.0/nrfxlib/crypto/nrf_cc310_platform/include -fno-strict-aliasing -Os -imacros N:/Projects/Nordic/myApps/RGBWC_nRF52840/build/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m4 -mthumb -mabi=aapcs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mfp16-format=ieee --sysroot=C:/ncs/SDK/toolchains/v2.3.0/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi -imacros C:/ncs/SDK/v2.3.0/zephyr/include/zephyr/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-pic -fno-pie -fno-asynchronous-unwind-tables -fno-reorder-functions --param=min-pagesize=0 -fno-defer-pop -fmacro-prefix-map=N:/Projects/Nordic/myApps/RGBWC_nRF52840=CMAKE_SOURCE_DIR -fmacro-prefix-map=C:/ncs/SDK/v2.3.0/zephyr=ZEPHYR_BASE -fmacro-prefix-map=C:/ncs/SDK/v2.3.0=WEST_TOPDIR -ffunction-sections -fdata-sections -std=c99 -nostdinc -Wno-packed-bitfield-compat -MD -MT CMakeFiles/app.dir/src/main.c.obj -MF CMakeFiles\app.dir\src\main.c.obj.d -o CMakeFiles/app.dir/src/main.c.obj -c ../src/main.c
    n:\Projects\Nordic\myApps\RGBWC_nRF52840\src\main.c:114:1: warning: data definition has no type or storage class
      114 | ZB_HA_DECLARE_TEMPERATURE_SENSOR_CLUSTER_LIST(
          | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    n:\Projects\Nordic\myApps\RGBWC_nRF52840\src\main.c:114:1: error: type defaults to 'int' in declaration of 'ZB_HA_DECLARE_TEMPERATURE_SENSOR_CLUSTER_LIST' [-Werror=implicit-int]
    n:\Projects\Nordic\myApps\RGBWC_nRF52840\src\main.c:118:9: warning: parameter names (without types) in function declaration
      118 |         temp_measurement_attr_list);
          |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
    n:\Projects\Nordic\myApps\RGBWC_nRF52840\src\main.c:122:31: error: expected ')' before numeric constant
      122 |         temperature_sensor_ep,
          |                               ^
          |                               )
    In file included from C:\ncs\SDK\v2.3.0\nrfxlib\zboss\production\include\zboss_api.h:52,
                     from n:\Projects\Nordic\myApps\RGBWC_nRF52840\src\main.c:38:
    n:\Projects\Nordic\myApps\RGBWC_nRF52840\src\main.c:129:9: error: 'temperature_sensor_ep' undeclared here (not in a function)
      129 |         temperature_sensor_ep);
          |         ^~~~~~~~~~~~~~~~~~~~~
    C:\ncs\SDK\v2.3.0\nrfxlib\zboss\production\include\zboss_api_af.h:586:6: note: in definition of macro 'ZBOSS_DECLARE_DEVICE_CTX_2_EP'
      586 |     &ep2_name,                                                          \
          |      ^~~~~~~~
    cc1.exe: some warnings being treated as errors
    [8/225] Building C object modules/nrfxlib/nrfxlib/zboss/production/src/CMakeFiles/zboss-sources.dir/zcl/zcl_temp_measurement.c.obj
    [9/225] Building C object modules/nrfxlib/nrfxlib/zboss/production/src/CMakeFiles/zboss-sources.dir/zcl/zcl_s_price.c.obj
    [10/225] Building C object modules/nrfxlib/nrfxlib/zboss/production/src/CMakeFiles/zboss-sources.dir/zcl/zcl_s_wwah.c.obj
    [11/225] Building C object modules/nrfxlib/nrfxlib/zboss/production/src/CMakeFiles/zboss-sources.dir/zcl/zcl_s_messaging.c.obj
    [12/225] Building C object modules/nrfxlib/nrfxlib/zboss/production/src/CMakeFiles/zboss-sources.dir/zcl/zcl_shade_config_commands.c.obj
    [13/225] Building C object modules/nrfxlib/nrfxlib/zboss/production/src/CMakeFiles/zboss-sources.dir/zcl/zcl_thermostat_commands.c.obj
    [14/225] Building C object modules/nrfxlib/nrfxlib/zboss/production/src/CMakeFiles/zboss-sources.dir/zcl/zcl_wwah_common.c.obj
    [15/225] Building C object modules/nrfxlib/nrfxlib/zboss/production/src/CMakeFiles/zboss-sources.dir/zcl/zcl_thermostat_ui_config.c.obj
    [16/225] Building C object modules/nrfxlib/nrfxlib/zboss/production/src/CMakeFiles/zboss-sources.dir/zcl/zcl_s_metering.c.obj
    ninja: build stopped: subcommand failed.
    FATAL ERROR: command exited with status 1: 'c:\ncs\SDK\toolchains\v2.3.0\opt\bin\cmake.EXE' --build 'n:\Projects\Nordic\myApps\RGBWC_nRF52840\build'
    
     *  The terminal process terminated with exit code: 1. 
     *  Terminal will be reused by tasks, press any key to close it. 
    

Related