From a720b6c7086321aa84bd80cf913d9156cac29c4a Mon Sep 17 00:00:00 2001 From: Jacob Szwejbka Date: Tue, 3 Nov 2026 09:09:00 -0800 Subject: [PATCH] [release/1.6] Fix NXP MCUXpresso CIFAR link failure Compile the SDK sys_info implementation called by the CIFAR example. Use the SDK version parser to provide the version-string macro that the SDK normally supplies through its generated build header. Prepared with OpenAI Codex. --- .../imxrt700/executorch_cifarnet/CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/examples/nxp/mcuxpresso/imxrt700/executorch_cifarnet/CMakeLists.txt b/examples/nxp/mcuxpresso/imxrt700/executorch_cifarnet/CMakeLists.txt index 0b0dd3f8849..491ed964c1f 100644 --- a/examples/nxp/mcuxpresso/imxrt700/executorch_cifarnet/CMakeLists.txt +++ b/examples/nxp/mcuxpresso/imxrt700/executorch_cifarnet/CMakeLists.txt @@ -58,6 +58,7 @@ add_executable( ${SdkRootDirPath}/examples/eiq_examples/executorch_cifarnet/main.cpp ${SdkRootDirPath}/examples/eiq_examples/executorch_cifarnet/RegisterKernels.cpp ${SdkRootDirPath}/examples/eiq_examples/common/timer.c + ${SdkRootDirPath}/examples/eiq_examples/common/sys_info/sys_info.c ${SdkRootDirPath}/devices/RT/RT700/MIMXRT798S/startup_MIMXRT798S_cm33_core0.c ${EXECUTORCH_ROOT_DIR}/backends/nxp/runtime/NeutronBackend.cpp ${SdkRootDirPath}/middleware/tfm/tf-m/platform/ext/common/syscalls_stub.c @@ -83,6 +84,13 @@ add_executable( ${SdkRootDirPath}/components/debug_console_lite/fsl_debug_console.c ) +# sys_info.c needs the version macro supplied by the SDK's normal build system. +include(${SdkRootDirPath}/cmake/extension/mcux_version.cmake) +target_compile_definitions( + ${MCUX_SDK_PROJECT_NAME} + PRIVATE "MCUXSDK_VERSION_FULL_STR=\"${MCUXSDK_VERSION_FULL}\"" +) + target_include_directories( ${MCUX_SDK_PROJECT_NAME} PRIVATE