<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Undefined references (e.g zbPlatCryptoRandomGet) when building DK006 SDK ZigBee examples in MCUXpresso General</title>
    <link>https://community.nxp.com/t5/MCUXpresso-General/Undefined-references-e-g-zbPlatCryptoRandomGet-when-building/m-p/1929381#M5447</link>
    <description>&lt;P&gt;I am unable to successfully build DK006 application note samples, such as JN-AN-1243 or JN-AN-1267.&lt;/P&gt;&lt;P&gt;MCUXpresso has been installed and configured in line with AN1260 and the versions are:&lt;/P&gt;&lt;P&gt;- MCUXpresso v.11.10.0_3148&lt;/P&gt;&lt;P&gt;- SDK_2.6.15_JN5189&lt;/P&gt;&lt;P&gt;I'm building for the &lt;SPAN&gt;JN5189&lt;/SPAN&gt; target.&lt;/P&gt;&lt;P&gt;The samples compile correctly, but linking fails for both samples with the same undefined references in the ZigBee middleware:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;zbPlatCryptoAesMmoFinalUpdate
zbPlatCryptoAesHmacMmo
zbPlatCryptoAesMmoFinalUpdate
zbPlatCryptoRandom256Get
zbPlatCryptoRandomGet&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Example linker output:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;c:/nxp/MCUXpressoIDE_11.10.0_3148/ide/tools/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/bin/ld.exe: c:/nxp/SDKPackages/JN5189DK6/middleware/wireless/zigbee/platform/K32W0/libs\libZPSAPL.a(zps_apl_sec.o): in function `zps_pvAesGetKeyFromInstallCode':
zps_apl_sec.c:(.text.zps_pvAesGetKeyFromInstallCode+0x3c): undefined reference to `zbPlatCryptoAesMmoFinalUpdate'

c:/nxp/MCUXpressoIDE_11.10.0_3148/ide/tools/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/bin/ld.exe: c:/nxp/SDKPackages/JN5189DK6/middleware/wireless/zigbee/platform/K32W0/libs\libZPSAPL.a(zps_apl_sec.o): in function `vTransformKey':
zps_apl_sec.c:(.text.vTransformKey+0x36): undefined reference to `zbPlatCryptoAesHmacMmo'

c:/nxp/MCUXpressoIDE_11.10.0_3148/ide/tools/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/bin/ld.exe: zps_apl_sec.c:(.text.vTransformKey+0x5c): undefined reference to `zbPlatCryptoAesMmoFinalUpdate'

c:/nxp/MCUXpressoIDE_11.10.0_3148/ide/tools/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/bin/ld.exe: c:/nxp/SDKPackages/JN5189DK6/middleware/wireless/zigbee/platform/K32W0/libs\libZPSAPL.a(zps_apl_zdo_nwkmanager.o): in function `zps_vAplInitFactoryNewDistributedNetwork':
zps_apl_zdo_nwkmanager.c:(.text.zps_vAplInitFactoryNewDistributedNetwork+0x10c): undefined reference to `zbPlatCryptoRandom256Get'

c:/nxp/MCUXpressoIDE_11.10.0_3148/ide/tools/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/bin/ld.exe: c:/nxp/SDKPackages/JN5189DK6/middleware/wireless/zigbee/platform/K32W0/libs\libZPSAPL.a(zps_apl_zdo_nwkmanager.o): in function `vAplSecAuthTimerExpiry':
zps_apl_zdo_nwkmanager.c:(.text.vAplSecAuthTimerExpiry+0x48): undefined reference to `zbPlatCryptoRandomGet'&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 09 Aug 2024 17:40:58 GMT</pubDate>
    <dc:creator>dstevens</dc:creator>
    <dc:date>2024-08-09T17:40:58Z</dc:date>
    <item>
      <title>Undefined references (e.g zbPlatCryptoRandomGet) when building DK006 SDK ZigBee examples</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/Undefined-references-e-g-zbPlatCryptoRandomGet-when-building/m-p/1929381#M5447</link>
      <description>&lt;P&gt;I am unable to successfully build DK006 application note samples, such as JN-AN-1243 or JN-AN-1267.&lt;/P&gt;&lt;P&gt;MCUXpresso has been installed and configured in line with AN1260 and the versions are:&lt;/P&gt;&lt;P&gt;- MCUXpresso v.11.10.0_3148&lt;/P&gt;&lt;P&gt;- SDK_2.6.15_JN5189&lt;/P&gt;&lt;P&gt;I'm building for the &lt;SPAN&gt;JN5189&lt;/SPAN&gt; target.&lt;/P&gt;&lt;P&gt;The samples compile correctly, but linking fails for both samples with the same undefined references in the ZigBee middleware:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;zbPlatCryptoAesMmoFinalUpdate
zbPlatCryptoAesHmacMmo
zbPlatCryptoAesMmoFinalUpdate
zbPlatCryptoRandom256Get
zbPlatCryptoRandomGet&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Example linker output:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;c:/nxp/MCUXpressoIDE_11.10.0_3148/ide/tools/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/bin/ld.exe: c:/nxp/SDKPackages/JN5189DK6/middleware/wireless/zigbee/platform/K32W0/libs\libZPSAPL.a(zps_apl_sec.o): in function `zps_pvAesGetKeyFromInstallCode':
zps_apl_sec.c:(.text.zps_pvAesGetKeyFromInstallCode+0x3c): undefined reference to `zbPlatCryptoAesMmoFinalUpdate'

c:/nxp/MCUXpressoIDE_11.10.0_3148/ide/tools/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/bin/ld.exe: c:/nxp/SDKPackages/JN5189DK6/middleware/wireless/zigbee/platform/K32W0/libs\libZPSAPL.a(zps_apl_sec.o): in function `vTransformKey':
zps_apl_sec.c:(.text.vTransformKey+0x36): undefined reference to `zbPlatCryptoAesHmacMmo'

c:/nxp/MCUXpressoIDE_11.10.0_3148/ide/tools/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/bin/ld.exe: zps_apl_sec.c:(.text.vTransformKey+0x5c): undefined reference to `zbPlatCryptoAesMmoFinalUpdate'

c:/nxp/MCUXpressoIDE_11.10.0_3148/ide/tools/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/bin/ld.exe: c:/nxp/SDKPackages/JN5189DK6/middleware/wireless/zigbee/platform/K32W0/libs\libZPSAPL.a(zps_apl_zdo_nwkmanager.o): in function `zps_vAplInitFactoryNewDistributedNetwork':
zps_apl_zdo_nwkmanager.c:(.text.zps_vAplInitFactoryNewDistributedNetwork+0x10c): undefined reference to `zbPlatCryptoRandom256Get'

c:/nxp/MCUXpressoIDE_11.10.0_3148/ide/tools/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/bin/ld.exe: c:/nxp/SDKPackages/JN5189DK6/middleware/wireless/zigbee/platform/K32W0/libs\libZPSAPL.a(zps_apl_zdo_nwkmanager.o): in function `vAplSecAuthTimerExpiry':
zps_apl_zdo_nwkmanager.c:(.text.vAplSecAuthTimerExpiry+0x48): undefined reference to `zbPlatCryptoRandomGet'&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Aug 2024 17:40:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/Undefined-references-e-g-zbPlatCryptoRandomGet-when-building/m-p/1929381#M5447</guid>
      <dc:creator>dstevens</dc:creator>
      <dc:date>2024-08-09T17:40:58Z</dc:date>
    </item>
    <item>
      <title>Re: Undefined references (e.g zbPlatCryptoRandomGet) when building DK006 SDK ZigBee examples</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/Undefined-references-e-g-zbPlatCryptoRandomGet-when-building/m-p/1929890#M5448</link>
      <description>&lt;P&gt;Okay, so it turns out these functions:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;zbPlatCryptoAesMmoFinalUpdate
zbPlatCryptoAesHmacMmo
zbPlatCryptoAesMmoFinalUpdate
zbPlatCryptoRandom256Get
zbPlatCryptoRandomGet&lt;/LI-CODE&gt;&lt;P&gt;are declared&amp;nbsp; in:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;JNS5189DK6/middleware/wireless/zigbee/platform/zb_platform.h&lt;/LI-CODE&gt;&lt;P&gt;and defined in:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;JN5189DK6/middleware/wireless/zigbee/platform/K32W0/platform/crypto.c
JN5189DK6/middleware/wireless/zigbee/platform/NCP_HOST/platform/Posix/crypto.c&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As far as I can tell, the source files are not included anywhere in the build.&lt;/P&gt;&lt;P&gt;The makefile config_ZBPro.mk seems to be responsible for the inclusion, as it adds the platform folder as a source folder and adds timer.c to the build.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;config_ZBPro.mk from AN-1243&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;264 ifeq ($(FRAMEWORK_SWITCH),0)
265 ZIGBEE_BASE_DIR       = $(SDK2_BASE_DIR)/middleware/wireless/zigbee3.0
266 else
267 ZIGBEE_BASE_DIR       = $(SDK2_BASE_DIR)/middleware/wireless/zigbee
268 endif
...
385 ifeq ($(FRAMEWORK_SWITCH),1)
...
407    APPSRC += timer.c
...
654 ZIGBEE_BASE_src=$(OSA_BASE_SRC):$(ZIGBEE_COMMON_SRC):$(OS_ABSTRACT_SRC):$(GENERIC_LIST_SRC):$(BOARD_LEVEL_SRC)\
                  :$(CHIP_STARTUP_SRC):$(CHIP_SYSTEM_SRC):$(FSL_EXCEPTIONS_SRC):$(DEBUG_FIFO_SRC)\
                  :$(FRMWK_RNG_SRC):$(FRMWK_SECLIB_SRC):$(FRMWK_FUNCLIB_SRC):$(FRMWK_MSG_SRC)\
                  :$(ZIGBEE_COMMON_SRC)/../SelectiveOtaApp0/Source:$(FRMWK_MEMMGR_SRC)\
                  :$(FRMWK_TMRMGR_SRC):$(ZIGBEE_COMMON_SRC)/../SelectiveOtaApp1/Source\
                  :$(FSL_EEPROM_INT):$(FSL_OTA):$(FSL_EEPROM_GEN):$(FUNCTIONLIB):$(FRMWK_PANIC_SRC)\
                  :$(FRMWK_HEAP_SRC):$(FRMWK_LOWPOWER_SRC):$(FRMWK_GPIO_SRC):$(DEVICE_SP_DRIVERS)\
                  :$(FSL_COMPONENTS)/serial_manager:$(FSL_COMPONENTS)/uart:$(DEVICE_SP_UTILITIES)\
                  :$(DEVICE_SP_UTILITIES)/str:$(DEVICE_SP_UTILITIES)/debug_console:$(ZIGBEE_BASE_DIR)/platform/K32W0/platform
&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Adding crypto.c solves the problem and the build links correctly:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;408    APPSRC += crypto.c&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could someone from NXP please comment on this? It seems unlikely that this is a bug in the examples as they are not new and I can't imagine that it would have gone undiscovered since it prevents building.&lt;/P&gt;&lt;P&gt;So it's more likely a problem with the current SDK or my setup. Were these functions precompiled and included the libs previously? Are there some environment setup steps that are needed aside from those detailed in AN1260? Any guidance would be appreciated.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 12 Aug 2024 05:42:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/Undefined-references-e-g-zbPlatCryptoRandomGet-when-building/m-p/1929890#M5448</guid>
      <dc:creator>dstevens</dc:creator>
      <dc:date>2024-08-12T05:42:15Z</dc:date>
    </item>
    <item>
      <title>Re: Undefined references (e.g zbPlatCryptoRandomGet) when building DK006 SDK ZigBee examples</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/Undefined-references-e-g-zbPlatCryptoRandomGet-when-building/m-p/1930310#M5449</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope you are doing well. Could you please clarify the version of the AN?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;On the Release Notes of each AN, you can check the versions of IDE and SDK that were tested.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Ricardo&lt;/P&gt;</description>
      <pubDate>Mon, 12 Aug 2024 15:40:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/Undefined-references-e-g-zbPlatCryptoRandomGet-when-building/m-p/1930310#M5449</guid>
      <dc:creator>Ricardo_Zamora</dc:creator>
      <dc:date>2024-08-12T15:40:40Z</dc:date>
    </item>
    <item>
      <title>Re: Undefined references (e.g zbPlatCryptoRandomGet) when building DK006 SDK ZigBee examples</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/Undefined-references-e-g-zbPlatCryptoRandomGet-when-building/m-p/1930392#M5450</link>
      <description>&lt;P&gt;Hi Ricardo,&lt;/P&gt;&lt;P&gt;For AN-1243, it's rev. 2.8 — 12 December 2023.&lt;/P&gt;&lt;P&gt;I see in the release notes that the SDK is v2.6..13.&lt;/P&gt;&lt;P&gt;I am using v2.6.15 SDK, but I'm wondering if the SDK itself is different as I'd selected the JN5189 SDK using the SDK Builder rather than the JN5189DK6, which I suspect is what I should be using.&lt;/P&gt;&lt;P&gt;I'll try later today with the JN5189DK6 SDK to see if this changes things.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Aug 2024 17:15:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/Undefined-references-e-g-zbPlatCryptoRandomGet-when-building/m-p/1930392#M5450</guid>
      <dc:creator>dstevens</dc:creator>
      <dc:date>2024-08-12T17:15:48Z</dc:date>
    </item>
    <item>
      <title>Re: Undefined references (e.g zbPlatCryptoRandomGet) when building DK006 SDK ZigBee examples</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/Undefined-references-e-g-zbPlatCryptoRandomGet-when-building/m-p/1930817#M5453</link>
      <description>&lt;P&gt;Hi Ricardo,&lt;/P&gt;&lt;P&gt;I've confirmed that it's an issue with SDK v2.6.15 (and possibly 2.6.14). The release notes for JN-AN-1257 rev.2.8 list v2.6.13 as the version it was tested on and that version builds correctly.&lt;/P&gt;&lt;P&gt;So:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;SDK_2_6_13_JN5189DK6 builds correctly&lt;/LI&gt;&lt;LI&gt;SDK_2_6_15_JN5189DK6 suffers the linking problem previously described&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I would recommend fixing the problem, as a change in SDK patch version only should not introduce new behavior.&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Aug 2024 06:14:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/Undefined-references-e-g-zbPlatCryptoRandomGet-when-building/m-p/1930817#M5453</guid>
      <dc:creator>dstevens</dc:creator>
      <dc:date>2024-08-13T06:14:14Z</dc:date>
    </item>
  </channel>
</rss>

