AnsweredAssumed Answered

Problem when creating custom devices based on JN-AN-1189

Question asked by Tim Gros on Jan 30, 2020
Latest reply on Feb 3, 2020 by Mario Ignacio Castaneda Lopez

Hi.
I guess the problem is me and i have missed something obvious, but i am stuck with this one for afew days.

 

I want to create custom devices firmware based on JN-AN-1189

I can build successfully each of the build configuration of the App Note.

 

As i want to create variants from the orginal examples provided in the appnote, i have created a copy of the example i want to use as a basis and i tried to build it after renaming it.

For instance, i have made a copy of MainsPowerSwitch directory, i renamed it 'MyMainsPowerSwitch' and after creating a new build configuration and adjusting a few settings (PWD, CWD, etc..) i have been able to build it succesfully. 
I can now modify it as required.

 

I want to do the same for a custom DimmerSwitch. So i have made a copy of made a copy of the DimmerSwitch directory, i renamed it 'MyDimmerSwitch' and after creating a ne build configuration "make SWITCH=myDimmerSwitch etc..." I am facing an error during compiling:

/c/NXP/bstudio_nxp/sdk/Tools/ba-elf-ba2-r36379/bin/ba-elf-gcc -c -o /c/NXP/bstudio_nxp/workspace/JN-AN-1189-ZigBee-HA-Demo/MyDimmerSwitch/Build/app_start_switch.o -DCONFIG_MANUFACTURER_CODE=0x1037 -DCONFIG_APP_SW_VERSION=7 -DCONFIG_HW_VERSION=1 -DCONFIG_MANUFACTURER_NAME=\""PimpMyBee"\" -DCONFIG_MODEL_ID=\""MyDimmerSwitch"\" -DCONFIG_DATE_CODE=\"22-01-2020\" -DKEEP_ALIVETIME=6 -DSLEEP_ENABLE -DDEEP_SLEEP_ENABLE -DMyDimmerSwitch -DMyDimmerSwitch -DBUTTON_MAP_MyDimmerSwitch -DEZ_MODE_INITIATOR -DEZ_ENABLE_GROUP -DDBG_ENABLE -DMyDimmerSwitch -DPDM_USER_SUPPLIED_ID -DOTA_DEMO_BUILD=TRUE -DJN516x=5160 -DJN5169=5169 -DJENNIC_CHIP_NAME=_JN5169 -DJENNIC_CHIP_FAMILY_NAME=_JN516x -march=ba2 -mcpu=jn51xx -mredzone-size=4 -mbranch-cost=3 -fomit-frame-pointer -Os -fshort-enums -Wall -Wpacked -Wcast-align -fdata-sections -ffunction-sections -flto -DWATCHDOG_ENABLED -DJENNIC_HW_BBC_RXINCCA=1 -DJENNIC_HW_BBC_DMA=1 -DJENNIC_HW_BBC_ISA=0 -DJENNIC_SW_EXTERNAL_FLASH=0 -DJN516X_DMA_UART_BACKWARDS_COMPATIBLE_API=1 -DUART_BACKWARDS_COMPATIBLE_API=1 -DRXPOWERADJUST_SUPPORT -DJENNIC_CHIP=JN5169 -DJENNIC_CHIP_JN5169 -DJENNIC_CHIP_FAMILY=JN516x -DJENNIC_CHIP_FAMILY_JN516x -DJENNIC_STACK_ZLLHA -DJENNIC_MAC_MiniMacShim -Wall -Wunreachable-code -DEMBEDDED -I/c/NXP/bstudio_nxp/sdk/JN-SW-4168/Platform/Common/Include -DJENNIC_PCB=DEVKIT4 -DJENNIC_PCB_DEVKIT4 -I/c/NXP/bstudio_nxp/sdk/JN-SW-4168/Platform/DK4/Include -I/c/NXP/bstudio_nxp/sdk/JN-SW-4168/Components/Common/Include -DPDM_USER_SUPPLIED_ID -DPDM_EEPROM -DDBG_ENABLE -DZPS_APL_OPT_SINGLE_INSTANCE -DOTA_NO_CERTIFICATE -DPLME_SAP -I/c/NXP/bstudio_nxp/workspace/JN-AN-1189-ZigBee-HA-Demo/Common_Switch/Source -I/c/NXP/bstudio_nxp/workspace/JN-AN-1189-ZigBee-HA-Demo/Common_Switch/Source/.. -I/c/NXP/bstudio_nxp/workspace/JN-AN-1189-ZigBee-HA-Demo/MyDimmerSwitch/Source -I/c/NXP/bstudio_nxp/workspace/JN-AN-1189-ZigBee-HA-Demo/Common/Source -I/c/NXP/bstudio_nxp/sdk/JN-SW-4168/Components/Utilities/Include -I/c/NXP/bstudio_nxp/sdk/JN-SW-4168/Components/ZCL/Include -I/c/NXP/bstudio_nxp/sdk/JN-SW-4168/Components/Xcv/Include/ -I/c/NXP/bstudio_nxp/sdk/JN-SW-4168/Components/Recal/Include/ -I/c/NXP/bstudio_nxp/sdk/JN-SW-4168/Components/MicroSpecific/Include -I/c/NXP/bstudio_nxp/sdk/JN-SW-4168/Components/HardwareApi/Include -I/c/NXP/bstudio_nxp/sdk/JN-SW-4168/Components/AppApi/Include -I/c/NXP/bstudio_nxp/sdk/JN-SW-4168/Components/MAC/Include -I/c/NXP/bstudio_nxp/sdk/JN-SW-4168/Components/MiniMac/Include -I/c/NXP/bstudio_nxp/sdk/JN-SW-4168/Components/MMAC/Include -I/c/NXP/bstudio_nxp/sdk/JN-SW-4168/Components/HardwareApi/Include -I/c/NXP/bstudio_nxp/sdk/JN-SW-4168/Components/Aes/Include -I/c/NXP/bstudio_nxp/sdk/JN-SW-4168/Components/DBG/Include -I/c/NXP/bstudio_nxp/sdk/JN-SW-4168/Components/MAC/Include -I/c/NXP/bstudio_nxp/sdk/JN-SW-4168/Components/MicroSpecific/Include -I/c/NXP/bstudio_nxp/sdk/JN-SW-4168/Components/MiniMAC/Include -I/c/NXP/bstudio_nxp/sdk/JN-SW-4168/Components/MMAC/Include -I/c/NXP/bstudio_nxp/sdk/JN-SW-4168/Components/TimerServer/Include -I/c/NXP/bstudio_nxp/sdk/JN-SW-4168/Components/Random/Include -I/c/NXP/bstudio_nxp/sdk/JN-SW-4168/Components/ZPSMAC_Mini/Include -I/c/NXP/bstudio_nxp/sdk/JN-SW-4168/Components/OS/Include -I/c/NXP/bstudio_nxp/sdk/JN-SW-4168/Components/PWRM/Include -I/c/NXP/bstudio_nxp/sdk/JN-SW-4168/Components/ZPSTSV/Include -I/c/NXP/bstudio_nxp/sdk/JN-SW-4168/Components/AES_SW/Include -I/c/NXP/bstudio_nxp/sdk/JN-SW-4168/Components/PDUM/Include -I/c/NXP/bstudio_nxp/sdk/JN-SW-4168/Components/ZPSAPL/Include -I/c/NXP/bstudio_nxp/sdk/JN-SW-4168/Components/Random/Include -I/c/NXP/bstudio_nxp/sdk/JN-SW-4168/Components/PDM_EEPROM/Include -I/c/NXP/bstudio_nxp/sdk/JN-SW-4168/Components/DBG/Include -I/c/NXP/bstudio_nxp/sdk/JN-SW-4168/Components/ZPSNWK_ZED/Include -I/c/NXP/bstudio_nxp/sdk/JN-SW-4168/Components/PDM/Include -I/c/NXP/bstudio_nxp/sdk/JN-SW-4168/Components/ZPSMAC/Include -I/c/NXP/bstudio_nxp/sdk/JN-SW-4168/Components/ZPSNWK/Include -I/c/NXP/bstudio_nxp/sdk/JN-SW-4168/Components/ZCL/Source -I/c/NXP/bstudio_nxp/sdk/JN-SW-4168/Components/ZCL/Include -I/c/NXP/bstudio_nxp/sdk/JN-SW-4168/Components/ZCL/Clusters/General/Include -I/c/NXP/bstudio_nxp/sdk/JN-SW-4168/Components/ZCL/Clusters/General/Source -I/c/NXP/bstudio_nxp/sdk/JN-SW-4168/Components/ZCL/Clusters/Lighting/Include -I/c/NXP/bstudio_nxp/sdk/JN-SW-4168/Components/ZCL/Clusters/MeasurementAndSensing/Include -I/c/NXP/bstudio_nxp/sdk/JN-SW-4168/Components/ZCL/Clusters/EnergyAtHome/Include -I/c/NXP/bstudio_nxp/sdk/JN-SW-4168/Components/ZCL/Clusters/SE/Include -I/c/NXP/bstudio_nxp/sdk/JN-SW-4168/Components/ZCL/Clusters/GreenPower/Include -I/c/NXP/bstudio_nxp/sdk/JN-SW-4168/Components/ZCL/Clusters/HVAC/Include -I/c/NXP/bstudio_nxp/sdk/JN-SW-4168/Components/ZCL/Clusters/OTA/Include -I/c/NXP/bstudio_nxp/sdk/JN-SW-4168/Components/ZCL/Clusters/SmartEnergy/Include -I/c/NXP/bstudio_nxp/sdk/JN-SW-4168/Components/ZCL/Clusters/IAS/Include -I/c/NXP/bstudio_nxp/sdk/JN-SW-4168/Components/ZCL/Profiles/HA/Common/Include -I/c/NXP/bstudio_nxp/sdk/JN-SW-4168/Components/ZCL/Profiles/HA/Generic/Include -I/c/NXP/bstudio_nxp/sdk/JN-SW-4168/Components/ZCL/Profiles/HA/Lighting/Include -I/c/NXP/bstudio_nxp/sdk/JN-SW-4168/Components/ZCL/Profiles/GP/Include /c/NXP/bstudio_nxp/workspace/JN-AN-1189-ZigBee-HA-Demo/Common_Switch/Source/app_start_switch.c -MD -MF /c/NXP/bstudio_nxp/workspace/JN-AN-1189-ZigBee-HA-Demo/MyDimmerSwitch/Build/app_start_switch.d -MP
In file included from c:/NXP/bstudio_nxp/workspace/JN-AN-1189-ZigBee-HA-Demo/Common_Switch/Source/app_start_switch.c:52:0:
c:/NXP/bstudio_nxp/workspace/JN-AN-1189-ZigBee-HA-Demo/Common_Switch/Source/zha_switch_node.h:88:23: error: unknown type name 'teCLD_OnOff_Command'
c:/NXP/bstudio_nxp/workspace/JN-AN-1189-ZigBee-HA-Demo/Common_Switch/Source/zha_switch_node.h:89:31: error: unknown type name 'teCLD_LevelControl_MoveMode'
c:/NXP/bstudio_nxp/workspace/JN-AN-1189-ZigBee-HA-Demo/Common_Switch/Source/zha_switch_node.h:90:27: error: unknown type name 'teCLD_LevelControl_MoveMode'
c:/NXP/bstudio_nxp/workspace/JN-AN-1189-ZigBee-HA-Demo/Common_Switch/Source/zha_switch_node.h:94:32: error: unknown type name 'teCLD_Identify_EffectId'

I suspect i have missed a step in my build configuration.

Can someone point me in the right direction ?

Outcomes