Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Build] AppTask.cpp error 'Custom0taEntries_t' was not declared in this scope #33512

Open
chajk opened this issue May 18, 2024 · 2 comments
Open

Comments

@chajk
Copy link

chajk commented May 18, 2024

Build issue(s)

Hi
When I tried to build lighting-app for nxp/k32w/k32w0, The following compile errors come up although the same step is tried.
Can you please help to fix this issue?

https://github.com/NXP/matter/tree/v1.0-branch-nxp/examples/lighting-app/nxp/k32w/k32w0

  1. Download K32W0 SDK 2.6.9.
  2. Start building the application either with Secure Element or without

without Secure Element
$ export NXP_K32W0_SDK_ROOT=/home/$user/DK_2_6_9_K32W061DK6/
$ source ./scripts/activate.sh
$ cd examples/lighting-app/nxp/k32w/k32w0
$ gn gen out/debug --args="k32w0_sdk_root="${NXP_K32W0_SDK_ROOT}" chip_with_OM15082=1 chip_with_ot_cli=0 is_debug=false chip_crypto="platform" chip_with_se05x=0 chip_pw_tokenizer_logging=true"
$ ninja -C out/debug

arrow@ubuntu:~/connectedhomeip/examples/lighting-app/nxp/k32w/k32w0$ ninja -C out/debug/
ninja: Entering directory `out/debug/'
[0/1] Regenerating ninja files
device: K32W061
board: k32w061dk6
ntag: 0
increased TX power: 0
FRO32k:  0
low power:  0
OTA default firmware processor:  1
OTA default factory data processor:  0
PDM Encryption:  1
Antenna Diversity enabled:  0
ECC crypto lib:  NXP-Ultrafast-P256
chip_with_sdk_package: 1
[20/850] c++ obj/main/chip-k32w0x-light-example.AppTask.cpp.o
FAILED: obj/main/chip-k32w0x-light-example.AppTask.cpp.o 
arm-none-eabi-g++ -MMD -MF obj/main/chip-k32w0x-light-example.AppTask.cpp.o.d -Wconversion -march=armv7e-m -mcpu=cortex-m4 -mfloat-abi=soft -mthumb -Os -g2 -fno-common -ffunction-sections -fdata-sections --specs=nosys.specs --specs=nano.specs -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -Wall -Werror -Wstack-usage=8192 -Wextra -Wshadow -Wunreachable-code -Wvla -Wformat -Wformat-nonliteral -Wformat-security -Wno-deprecated-declarations -Wno-missing-field-initializers -Wno-unknown-warning-option -Wno-unused-parameter -Wno-unused -Wno-cast-function-type -Wno-psabi -Wno-maybe-uninitialized -fdiagnostics-color -fno-strict-aliasing -Wno-unused-function -Wno-conversion -Wno-sign-compare -Wno-clobbered -Wno-implicit-fallthrough -Wno-shadow -mthumb -MMD -MP -fno-optimize-strlen -Wno-error=address -isystem../../../../../../../../SDK_2_6_9_K32W061DK6/middleware/mbedtls/port/matter -isystem../../../../../../../../SDK_2_6_9_K32W061DK6/middleware/mbedtls/port/ksdk -isystem../../../../../../../../SDK_2_6_9_K32W061DK6/boards/k32w061dk6/wireless_examples/openthread/reed/bm -isystem../../third_party/connectedhomeip/src/platform/nxp/k32w/k32w0 -isystem../../../../../../../../SDK_2_6_9_K32W061DK6/CMSIS/Include -isystem../../../../../../../../SDK_2_6_9_K32W061DK6/components/serial_manager -isystem../../../../../../../../SDK_2_6_9_K32W061DK6/components/uart -isystem../../../../../../../../SDK_2_6_9_K32W061DK6/devices/K32W061 -isystem../../../../../../../../SDK_2_6_9_K32W061DK6/utilities/debug_console/str -isystem../../../../../../../../SDK_2_6_9_K32W061DK6/utilities/debug_console -isystem../../../../../../../../SDK_2_6_9_K32W061DK6/devices/K32W061/utilities -isystem../../../../../../../../SDK_2_6_9_K32W061DK6/devices/K32W061/utilities/debug_console -isystem../../../../../../../../SDK_2_6_9_K32W061DK6/devices/K32W061/utilities/str -isystem../../../../../../../../SDK_2_6_9_K32W061DK6/middleware/wireless/ble_controller/interface -isystem../../../../../../../../SDK_2_6_9_K32W061DK6/middleware/wireless/bluetooth/application/common -isystem../../../../../../../../SDK_2_6_9_K32W061DK6/middleware/wireless/bluetooth/application/common/gatt_db -isystem../../../../../../../../SDK_2_6_9_K32W061DK6/middleware/wireless/bluetooth/application/common/gatt_db/macros -isystem../../../../../../../../SDK_2_6_9_K32W061DK6/middleware/wireless/bluetooth/host/config -isystem../../../../../../../../SDK_2_6_9_K32W061DK6/middleware/wireless/bluetooth/host/interface -isystem../../../../../../../../SDK_2_6_9_K32W061DK6/middleware/wireless/framework/Common -isystem../../../../../../../../SDK_2_6_9_K32W061DK6/middleware/wireless/framework/Flash/External/Interface -isystem../../../../../../../../SDK_2_6_9_K32W061DK6/middleware/wireless/framework/Flash/Internal -isystem../../../../../../../../SDK_2_6_9_K32W061DK6/middleware/wireless/framework/FunctionLib -isystem../../../../../../../../SDK_2_6_9_K32W061DK6/middleware/wireless/framework/GPIO -isystem../../../../../../../../SDK_2_6_9_K32W061DK6/middleware/wireless/framework/Logging/Interface -isystem../../../../../../../../SDK_2_6_9_K32W061DK6/middleware/wireless/framework/Keyboard/Interface -isystem../../../../../../../../SDK_2_6_9_K32W061DK6/middleware/wireless/framework/LED/Interface -isystem../../../../../../../../SDK_2_6_9_K32W061DK6/middleware/wireless/framework/Lists -isystem../../../../../../../../SDK_2_6_9_K32W061DK6/middleware/wireless/framework/LowPower/Interface/k32w061dk6 -isystem../../../../../../../../SDK_2_6_9_K32W061DK6/middleware/wireless/framework/MemManager/Interface -isystem../../../../../../../../SDK_2_6_9_K32W061DK6/middleware/wireless/framework/Messaging/Interface -isystem../../../../../../../../SDK_2_6_9_K32W061DK6/middleware/wireless/framework/ModuleInfo -isystem../../../../../../../../SDK_2_6_9_K32W061DK6/middleware/wireless/framework/OSAbstraction/Interface -isystem../../../../../../../../SDK_2_6_9_K32W061DK6/middleware/wireless/framework/OtaSupport/Interface/ -isystem../../../../../../../../SDK_2_6_9_K32W061DK6/middleware/wireless/framework/Panic/Interface -isystem../../../../../../../../SDK_2_6_9_K32W061DK6/middleware/wireless/framework/PDM/Include -isystem../../../../../../../../SDK_2_6_9_K32W061DK6/middleware/wireless/framework/RNG/Interface -isystem../../../../../../../../SDK_2_6_9_K32W061DK6/middleware/wireless/framework/SecLib -isystem../../../../../../../../SDK_2_6_9_K32W061DK6/middleware/wireless/framework/SerialManager/Interface -isystem../../../../../../../../SDK_2_6_9_K32W061DK6/middleware/wireless/framework/SerialManager/Source -isystem../../../../../../../../SDK_2_6_9_K32W061DK6/middleware/wireless/framework/TimersManager/Interface -isystem../../../../../../../../SDK_2_6_9_K32W061DK6/middleware/wireless/framework/TimersManager/Source -isystem../../../../../../../../SDK_2_6_9_K32W061DK6/middleware/wireless/framework/XCVR/DK6 -isystem../../../../../../../../SDK_2_6_9_K32W061DK6/middleware/wireless/framework/XCVR/DK6/Build/Include -isystem../../../../../../../../SDK_2_6_9_K32W061DK6/middleware/wireless/ieee-802.15.4/MacDynamic/Include -isystem../../../../../../../../SDK_2_6_9_K32W061DK6/middleware/wireless/ieee-802.15.4/uMac/Include -isystem../../../../../../../../SDK_2_6_9_K32W061DK6/rtos/amazon-freertos/lib/FreeRTOS/portable/GCC/ARM_CM3 -isystem../../../../../../../../SDK_2_6_9_K32W061DK6/rtos/amazon-freertos/lib/include -isystem../../../../../../../../SDK_2_6_9_K32W061DK6/rtos/amazon-freertos/lib/include/private -isystem../../../../../../../../SDK_2_6_9_K32W061DK6/rtos/amazon-freertos/lib/third_party/unity/src -isystem../../../../../../../../SDK_2_6_9_K32W061DK6/devices/K32W061/drivers -Wno-type-limits -fmacro-prefix-map=../../third_party/connectedhomeip/= -std=gnu++17 -fno-rtti -Wnon-virtual-dtor -DNDEBUG -DgMainThreadPriority_c=5 -DCPU_JN518X -DCPU_JN518X_REV=2 -DJENNIC_CHIP_FAMILY_NAME=_JN518x -DMAC_PROTO_TAG=1 -DJENNIC_CHIP_FAMILY_JN518x -DgPWR_LDOMEM_0_9V_PD=0 -DSDK_DEBUGCONSOLE=DEBUGCONSOLE_REDIRECT_TO_SDK -DPRINTF_ADVANCED_ENABLE -DNO_SYSCORECLK_UPD=0 -DUSE_RTOS=1 -DUSE_SDK_OSA=0 -DgSerialManagerMaxInterfaces_c=2 -DFSL_RTOS_FREE_RTOS=1 -DgTotalHeapSize_c=0xF000 -DDEBUG_SERIAL_INTERFACE_INSTANCE=0 -DAPP_SERIAL_INTERFACE_INSTANCE=1 -DgOTA_externalFlash_d=1 -DgEepromPostedOperations_d=1 -DgOtaEepromPostedOperations_d=1 -DgOtaVerifyWrite_d=0 -DgExternalFlashIsCiphered_d=1 -DPDM_USE_DYNAMIC_MEMORY=1 -DPDM_SAVE_IDLE=1 -DgBootData_None_c=1 -DPROGRAM_PAGE_SZ=256 -DconfigFRTOS_MEMORY_SCHEME=4 -DosCustomStartup=1 -DENABLE_RAM_VECTOR_TABLE=1 -DgTMR_Enabled_d=1 -DgTimestamp_Enabled_d=0 -DCHIP_ENABLE_OPENTHREAD=1 -DgOtaMemPoolId_c=1 -DPoolsDetails_c=_block_size_\ 32\ _number_of_blocks_\ 6\ _pool_id_\(0\)\ _eol_\ _block_size_\ 256\ _number_of_blocks_\ 3\ _pool_id_\(0\)\ _eol_\ _block_size_\ 512\ _number_of_blocks_\ 2\ _pool_id_\(0\)\ _eol_\ _block_size_\ 768\ _number_of_blocks_\ 1\ _pool_id_\(0\)\ _eol_\ _block_size_\ 268\ \ _number_of_blocks_\ 8\ _pool_id_\(gOtaMemPoolId_c\)\ _eol_ -DSUPPORT_FOR_15_4=1 -DgAppMaxConnections_c=1 -DgAppUseBonding_d=0 -DgAppUsePairing_d=0 -DgAppUsePrivacy_d=0 -DgController_ReducedRxThoughput=1 -DgPasskeyValue_c=999999 -DgSupportBle=1 -DSUPPORT_FOR_BLE=1 -DgEnableBleInactivityTimeNotify=1 -DgConnPhyUpdateReqTxPhySettings_c=\(gLePhy2MFlag_c\) -DgConnPhyUpdateReqRxPhySettings_c=\(gLePhy2MFlag_c\) -DgConnPhyUpdateReqPhyOptions_c=\(gLeCodingNoPreference_c\) -DBLE_HIGH_TX_POWER=0 -DgAdvertisingPowerLeveldBm_c=0 -DgConnectPowerLeveldBm_c=0 -DDUAL_MODE_APP=1 -DgMainThreadStackSize_c=5096 -DHEAP_SIZE=gTotalHeapSize_c -DgLoggingActive_d=0 -DgLogRingPlacementOffset_c=0xF000 -DgSecLibUseSha256Alt_d=1 -DgOTA_UseSecLibAes=1 -DgResetSystemReset_d=1 -DNXP_OT_IDLE_INTERVAL=2000 -DNXP_OT_ACTIVE_INTERVAL=500 -DNXP_ICD_ENABLED=1 -DNXP_ACTIVE_MODE_THRESHOLD=1000 -DNXP_ACTIVE_MODE_DURATION_MS=10000 -DNXP_IDLE_MODE_DURATION_SEC=600 -DNXP_ICD_SUPPORTED_CLIENTS_PER_FABRIC=2 -DgOTAAllowCustomStartAddress=1 -DgOTAUseCustomOtaEntry=1 -DgOTACustomOtaEntryMemory=1 -DOTA_ENTRY_TOP_ADDR=0x000C1000 -DEC_P256_DSPEXT=1 -DgClkUseFro32K=0 -DgPWR_CpuClk_48MHz=1 -DPDM_ENCRYPTION=1 -DOTA_ENCRYPTION_ENABLE=0 -DOPENTHREAD_CONFIG_SRP_CLIENT_ENABLE=1 -DOPENTHREAD_CONFIG_ECDSA_ENABLE=1 -DOPENTHREAD_CONFIG_DNS_CLIENT_SERVICE_DISCOVERY_ENABLE=1 -DOPENTHREAD_CONFIG_DNS_CLIENT_ENABLE=1 -DgUsePdm_d=1 -DPDM_EXT_FLASH=1 -DgEepromType_d=gEepromDevice_MX25R8035F_c -DgPdmNbSegments=63 -DgRadioUsePdm_d=1 -DOM15082=1 -DgKeyBoardSupported_d=1 -DgKBD_KeysCount_c=4 -DgLEDSupported_d=1 -DgLEDsOnTargetBoardCnt_c=2 -DgLED_InvertedMode_d=1 -DcPWR_UsePowerDownMode=0 -DcPWR_FullPowerDownMode=0 -DK32W_LOG_ENABLED=1 -DgUartDebugConsole_d=1 -DCPU_K32W061HN -DBUILD_RELEASE=1 -DCHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR=3840 -DOPENTHREAD_PROJECT_CORE_CONFIG_FILE=\"OpenThreadConfig.h\" -DOPENTHREAD_CORE_CONFIG_PLATFORM_CHECK_FILE=\"openthread-core-k32w061-config-check.h\" -DPACKAGE_NAME=\"OPENTHREAD\" -DPACKAGE_VERSION=\"1.0.0\" -DOPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE=1 -DOPENTHREAD_CONFIG_IP6_SLAAC_ENABLE=1 -DK32W0_RADIO_NUM_OF_RX_BUFS=16 -DOPENTHREAD_PLATFORM_CORE_CONFIG_FILE=\"app/project_include/OpenThreadConfig.h\" -DCHIP_HAVE_CONFIG_H=1 -DMBEDTLS_CONFIG_FILE=\<third_party/openthread/repo/third_party/mbedtls/mbedtls-config.h\> -DMBEDTLS_USER_CONFIG_FILE=\<src/platform/nxp/k32w/k32w0/k32w0-chip-mbedtls-config.h\> -DMBEDTLS_FREESCALE_FREERTOS_CALLOC_ALT=1 -DMBEDTLS_THREADING_C=1 -DMBEDTLS_THREADING_ALT=1 -DMBEDTLS_X509_CSR_WRITE_C -DMBEDTLS_X509_CREATE_C -DMBEDTLS_PEM_WRITE_C -DMBEDTLS_HKDF_C -DMBEDTLS_PKCS5_C -I../../main/include -I../../main -I../../include -I../../third_party/connectedhomeip/examples/platform/nxp/k32w/k32w0/app/project_include -I../../third_party/connectedhomeip/examples/platform/nxp/k32w/k32w0/app/support -I../../third_party/connectedhomeip/examples/platform/nxp/k32w/k32w0/util/include -I../../third_party/connectedhomeip/examples/platform/nxp/k32w/k32w0/common -I../../third_party/connectedhomeip/third_party/openthread/repo/examples/platforms -I../../third_party/connectedhomeip/third_party/openthread/repo/src -I../../third_party/connectedhomeip/third_party/openthread/repo/src/core -Igen/include -I../../third_party/connectedhomeip/third_party/openthread/repo/include -I../../third_party/connectedhomeip -I../../third_party/connectedhomeip/third_party/openthread/ot-nxp/src/k32w0/k32w061 -I../../third_party/connectedhomeip/third_party/openthread/ot-nxp/src/k32w0/platform -I../../third_party/connectedhomeip/third_party/openthread/ot-nxp/src/common -I../../third_party/connectedhomeip/examples/platform/nxp/k32w/k32w0 -I../../third_party/connectedhomeip/examples/common/QRCode/repo/c -Igen/third_party/connectedhomeip/examples/lighting-app/nxp/zap -Igen/third_party/connectedhomeip/examples/lighting-app/nxp/zap/zapgen -I../../third_party/connectedhomeip/src/include -I../../third_party/connectedhomeip/src -I../../third_party/connectedhomeip/examples/platform/k32w/k32w0/app/project_include -I../../third_party/connectedhomeip/zzz_generated/app-common -I../../third_party/connectedhomeip/third_party/nlassert/repo/include -I../../third_party/connectedhomeip/third_party/nlio/repo/include -I../../third_party/connectedhomeip/third_party/mbedtls/repo/include -I../../third_party/connectedhomeip/examples/providers -I../../third_party/connectedhomeip/examples/platform -c ../../main/AppTask.cpp -o obj/main/chip-k32w0x-light-example.AppTask.cpp.o
../../main/AppTask.cpp: In function 'void CheckOtaEntry()':
../../main/AppTask.cpp:148:5: error: 'CustomOtaEntries_t' was not declared in this scope
  148 |     CustomOtaEntries_t ota_entries;
      |     ^~~~~~~~~~~~~~~~~~
../../main/AppTask.cpp:148:5: note: maximum limit of 1000 namespaces searched for 'CustomOtaEntries_t'
../../main/AppTask.cpp:149:48: error: 'ota_entries' was not declared in this scope
  149 |     if (gOtaSuccess_c == OTA_GetCustomEntries(&ota_entries) && ota_entries.ota_state != otaNoImage)
      |                                                ^~~~~~~~~~~
../../main/AppTask.cpp:149:48: note: maximum limit of 1000 namespaces searched for 'ota_entries'
../../main/AppTask.cpp:149:26: error: 'OTA_GetCustomEntries' was not declared in this scope
  149 |     if (gOtaSuccess_c == OTA_GetCustomEntries(&ota_entries) && ota_entries.ota_state != otaNoImage)
      |                          ^~~~~~~~~~~~~~~~~~~~
../../main/AppTask.cpp:149:26: note: maximum limit of 1000 namespaces searched for 'OTA_GetCustomEntries'
../../main/AppTask.cpp:149:89: error: 'otaNoImage' was not declared in this scope; did you mean 'gOtaNoImage_c'?
  149 |     if (gOtaSuccess_c == OTA_GetCustomEntries(&ota_entries) && ota_entries.ota_state != otaNoImage)
      |                                                                                         ^~~~~~~~~~
      |                                                                                         gOtaNoImage_c
../../main/AppTask.cpp:149:89: note: maximum limit of 1000 namespaces searched for 'otaNoImage'
../../main/AppTask.cpp:151:38: error: 'otaApplied' was not declared in this scope
  151 |         if (ota_entries.ota_state == otaApplied)
      |                                      ^~~~~~~~~~
../../main/AppTask.cpp:151:38: note: maximum limit of 1000 namespaces searched for 'otaApplied'
../../main/AppTask.cpp:168:9: error: 'OTA_ResetCustomEntries' was not declared in this scope
  168 |         OTA_ResetCustomEntries();
      |         ^~~~~~~~~~~~~~~~~~~~~~
../../main/AppTask.cpp:168:9: note: maximum limit of 1000 namespaces searched for 'OTA_ResetCustomEntries'
At global scope:
cc1plus: note: unrecognized command-line option '-Wno-unknown-warning-option' may have been intended to silence earlier diagnostics
[25/850] c++ obj/third_party/connectedhomeip/zzz_generate...n/app-common/zap-generated/attributes/zap.Accessors.cpp.o
ninja: build stopped: subcommand failed.
arrow@ubuntu:~/connectedhomeip/examples/lighting-app/nxp/k32w/k32w0$ 

Platform

k32w0, nxp with ubuntu 20, 22

Anything else?

It's also reproducible regardless of Ubuntu version.

@bzbarsky-apple
Copy link
Contributor

@doru91 can you take a look, please?

@doru91
Copy link
Contributor

doru91 commented May 24, 2024

Hi, @chajk

Please note that SDK 2.6.9 is not the latest SDK.

I would recommend using west for automatically downloading the latest SDK, see detailed instructions here: https://github.com/project-chip/connectedhomeip/tree/master/examples/contact-sensor-app/nxp/k32w/k32w0#building

Thanks,
Doru

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Todo
Development

No branches or pull requests

3 participants