wififund_less3_exer1 build issue

I was working through the wifi course in dev academy. I'm having a hard time getting exercise 1 to build. Anyone else running into this? I'm building for nrf7002dk_nrf5340_cpuapp.

 *  Executing task: nRF Connect: Build [clean]: wififund_less3_exer1/build (active)

Building wififund_less3_exer1
west build -t clean --build-dir c:/Nordic/nRF53_apps/wifi-fund/lesson3/wififund_less3_exer1/build

-- west build: running target clean
[2/2] Cleaning all built files...
Cleaning... 423 files.
 *  Terminal will be reused by tasks, press any key to close it.

 *  Executing task: nRF Connect: Build: wififund_less3_exer1/build (active)

Building wififund_less3_exer1
west build --build-dir c:/Nordic/nRF53_apps/wifi-fund/lesson3/wififund_less3_exer1/build c:/Nordic/nRF53_apps/wifi-fund/lesson3/wififund_less3_exer1

[3/422] Generating include/generated/version.h
[417/422] Linking C executable zephyr\zephyr_pre0.elf
FAILED: zephyr/zephyr_pre0.elf zephyr/zephyr_pre0.map
cmd.exe /C "cd . && C:\ncs\toolchains\c57af46cb7\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe  -gdwarf-4 @CMakeFiles\zephyr_pre0.rsp -o zephyr\zephyr_pre0.elf  && cmd.exe /C "cd /D C:\Nordic\nRF53_apps\wifi-fund\lesson3\wififund_less3_exer1\build\zephyr && C:\ncs\toolchains\c57af46cb7\opt\bin\cmake.exe -E true""
c:/ncs/toolchains/c57af46cb7/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd.exe: modules/nrf/subsys/net/lib/wifi_credentials/libwifi_credentials.a(wifi_credentials.c.obj): in function `init':
C:/ncs/v2.5.2/nrf/subsys/net/lib/wifi_credentials/wifi_credentials.c:77: undefined reference to `wifi_credentials_backend_init'
c:/ncs/toolchains/c57af46cb7/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd.exe: modules/nrf/subsys/net/lib/wifi_credentials/libwifi_credentials.a(wifi_credentials.c.obj): in function `wifi_credentials_get_by_ssid_personal_struct':
C:/ncs/v2.5.2/nrf/subsys/net/lib/wifi_credentials/wifi_credentials.c:128: undefined reference to `wifi_credentials_load_entry'
c:/ncs/toolchains/c57af46cb7/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd.exe: modules/nrf/subsys/net/lib/wifi_credentials/libwifi_credentials.a(wifi_credentials.c.obj): in function `wifi_credentials_set_personal_struct':
C:/ncs/v2.5.2/nrf/subsys/net/lib/wifi_credentials/wifi_credentials.c:177: undefined reference to `wifi_credentials_store_entry'
c:/ncs/toolchains/c57af46cb7/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd.exe: modules/nrf/subsys/net/lib/wifi_credentials/libwifi_credentials.a(wifi_credentials.c.obj): in function `wifi_credentials_delete_by_ssid':
C:/ncs/v2.5.2/nrf/subsys/net/lib/wifi_credentials/wifi_credentials.c:331: undefined reference to `wifi_credentials_delete_entry'
collect2.exe: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: 'C:\ncs\toolchains\c57af46cb7\opt\bin\cmake.EXE' --build 'c:\Nordic\nRF53_apps\wifi-fund\lesson3\wififund_less3_exer1\build'

 *  The terminal process terminated with exit code: 1.
 *  Terminal will be reused by tasks, press any key to close it.

Parents
  • Hello Collin,

    Could you check if you are having any issues building other default samples in NCS?

    Regards,

    Elfving

  • I just tried a lesson 2 sample that built without issue. And then a lesson 4 solution failed. I guess this may be on my end.

  • A colleague tried to build this application as well and got the same output as above.

  • Sorry about the wait Collin,

    I just wanted to make sure that you had no issues building a default sample earlier, because there's typically nothing wrong with just the fundamentals course. It would typically rather be something wrong with an installation etc.

    Though I am seeing the same issue as you. And one other colleague of mine is seeing the same issue, though another is not. 

    I find that I do manage to build it though, if I add these configurations to the prj.conf. Could you check if that fixes it on your side as well?

    CONFIG_FLASH=y
    CONFIG_FLASH_MAP=y
    CONFIG_NVS=y
    CONFIG_SETTINGS=y
    CONFIG_SETTINGS_NVS=y

    Thanks for reporting this, and sorry about not trying the sample myself immediately.

    Regards,

    Elfving

  • No problem at all, I appreciate you looking into this. I was not sure if it was my environment causing the issue or not. I think another wifi course exercise has issues too. I will get back to you once I test these again.

  • Thanks, that would be great :) Good if you could also test if the configs I've provided also fixes anything for you.

    Regards,

    Elfving

  • I face the same problem. I tried to build the less3 exer 1 solution example, but I get the same error in the linking process:

    Build files have been written to: C:/wifi-fund/lesson3/wififund_less3_exer1_solution/build/tfm
    [159/163] Linking C executable bin\tfm_s.axf
    Memory region Used Size Region Size %age Used
    FLASH: 48456 B 64 KB 73.94%
    RAM: 19780 B 32 KB 60.36%
    [15/433] Performing install step for 'tfm'
    -- Install configuration: "Debug"
    [426/433] Linking C executable zephyr\zephyr_pre0.elf
    FAILED: zephyr/zephyr_pre0.elf zephyr/zephyr_pre0.map
    cmd.exe /C "cd . && C:\ncs\toolchains\c57af46cb7\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe -gdwarf-4 @CMakeFiles\zephyr_pre0.rsp -o zephyr\zephyr_pre0.elf && cmd.exe /C "cd /D C:\wifi-fund\lesson3\wififund_less3_exer1_solution\build\zephyr && C:\ncs\toolchains\c57af46cb7\opt\bin\cmake.exe -E true""
    c:/ncs/toolchains/c57af46cb7/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd.exe: modules/nrf/subsys/net/lib/wifi_credentials/libwifi_credentials.a(wifi_credentials.c.obj): in function `init':
    C:/ncs/v2.5.2/nrf/subsys/net/lib/wifi_credentials/wifi_credentials.c:77: undefined reference to `wifi_credentials_backend_init'
    c:/ncs/toolchains/c57af46cb7/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd.exe: modules/nrf/subsys/net/lib/wifi_credentials/libwifi_credentials.a(wifi_credentials.c.obj): in function `wifi_credentials_get_by_ssid_personal_struct':
    C:/ncs/v2.5.2/nrf/subsys/net/lib/wifi_credentials/wifi_credentials.c:128: undefined reference to `wifi_credentials_load_entry'
    c:/ncs/toolchains/c57af46cb7/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd.exe: modules/nrf/subsys/net/lib/wifi_credentials/libwifi_credentials.a(wifi_credentials.c.obj): in function `wifi_credentials_set_personal_struct':
    C:/ncs/v2.5.2/nrf/subsys/net/lib/wifi_credentials/wifi_credentials.c:177: undefined reference to `wifi_credentials_store_entry'
    c:/ncs/toolchains/c57af46cb7/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd.exe: modules/nrf/subsys/net/lib/wifi_credentials/libwifi_credentials.a(wifi_credentials.c.obj): in function `wifi_credentials_delete_by_ssid':
    C:/ncs/v2.5.2/nrf/subsys/net/lib/wifi_credentials/wifi_credentials.c:331: undefined reference to `wifi_credentials_delete_entry'
    collect2.exe: error: ld returned 1 exit status
    ninja: build stopped: subcommand failed.
    FATAL ERROR: command exited with status 1: 'C:\ncs\toolchains\c57af46cb7\opt\bin\cmake.EXE' --build 'c:\wifi-fund\lesson3\wififund_less3_exer1_solution\build'

    However, when I build the less2 exer1 example, it builds fine:

    Building wififund_less2_exer1
    C:\Windows\system32\cmd.exe /d /s /c "west build --build-dir c:/wifi-fund/lesson2/wififund_less2_exer1/build_nrf7002_dk c:/wifi-fund/lesson2/wififund_less2_exer1 --pristine --board nrf7002dk_nrf5340_cpuapp --no-sysbuild -- -DNCS_TOOLCHAIN_VERSION=NONE -DCONFIG_CORTEX_M_DEBUG_MONITOR_HOOK=y -DCONFIG_DEBUG_OPTIMIZATIONS=y -DCONFIG_DEBUG_THREAD_INFO=y -DCONFIG_SEGGER_DEBUGMON=y -DCACHED_CONF_FILE=c:/wifi-fund/lesson2/wififund_less2_exer1/prj.conf"

    -- west build: generating a build system
    Loading Zephyr default modules (Zephyr base).
    -- Application: C:/wifi-fund/lesson2/wififund_less2_exer1
    -- CMake version: 3.20.5
    -- Found Python3: C:/ncs/toolchains/c57af46cb7/opt/bin/python.exe (found suitable version "3.8.2", minimum required is "3.8") found components: Interpreter
    -- Cache files will be written to: C:/ncs/v2.5.2/zephyr/.cache
    -- Zephyr version: 3.4.99 (C:/ncs/v2.5.2/zephyr)
    -- Found west (found suitable version "1.1.0", minimum required is "0.14.0")
    -- Board: nrf7002dk_nrf5340_cpuapp
    -- Found host-tools: zephyr 0.16.1 (C:/ncs/toolchains/c57af46cb7/opt/zephyr-sdk)
    -- Found toolchain: zephyr 0.16.1 (C:/ncs/toolchains/c57af46cb7/opt/zephyr-sdk)
    -- Found Dtc: C:/ncs/toolchains/c57af46cb7/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
    -- Found BOARD.dts: C:/ncs/v2.5.2/nrf/boards/arm/nrf7002dk_nrf5340/nrf7002dk_nrf5340_cpuapp.dts
    -- Generated zephyr.dts: C:/wifi-fund/lesson2/wififund_less2_exer1/build_nrf7002_dk/zephyr/zephyr.dts
    -- Generated devicetree_generated.h: C:/wifi-fund/lesson2/wififund_less2_exer1/build_nrf7002_dk/zephyr/include/generated/devicetree_generated.h
    -- Including generated dts.cmake file: C:/wifi-fund/lesson2/wififund_less2_exer1/build_nrf7002_dk/zephyr/dts.cmake
    Parsing C:/ncs/v2.5.2/zephyr/Kconfig
    Loaded configuration 'C:/ncs/v2.5.2/nrf/boards/arm/nrf7002dk_nrf5340/nrf7002dk_nrf5340_cpuapp_defconfig'
    Merged configuration 'c:/wifi-fund/lesson2/wififund_less2_exer1/prj.conf'
    Merged configuration 'C:/wifi-fund/lesson2/wififund_less2_exer1/build_nrf7002_dk/zephyr/misc/generated/extra_kconfig_options.conf'
    Configuration saved to 'C:/wifi-fund/lesson2/wififund_less2_exer1/build_nrf7002_dk/zephyr/.config'
    Kconfig header saved to 'C:/wifi-fund/lesson2/wififund_less2_exer1/build_nrf7002_dk/zephyr/include/generated/autoconf.h'
    -- Found GnuLd: c:/ncs/toolchains/c57af46cb7/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd.exe (found version "2.38")
    -- The C compiler identification is GNU 12.2.0
    -- The CXX compiler identification is GNU 12.2.0
    -- The ASM compiler identification is GNU
    -- Found assembler: C:/ncs/toolchains/c57af46cb7/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc.exe
    -- Configuring done
    -- Generating done
    -- Build files have been written to: C:/wifi-fund/lesson2/wififund_less2_exer1/build_nrf7002_dk
    -- west build: building application
    [2/449] Generating include/generated/version.h
    -- Zephyr version: 3.4.99 (C:/ncs/v2.5.2/zephyr), build: v3.4.99-ncs1-2
    [449/449] Linking C executable zephyr\zephyr.elf
    Memory region Used Size Region Size %age Used
    FLASH: 808208 B 1 MB 77.08%
    RAM: 170260 B 448 KB 37.11%
    IDT_LIST: 0 GB 2 KB 0.00%
    * Terminal will be reused by tasks, press any key to close it.

    I also tried to build another example in Exercise 2 of the Wifi Basics course and also got an error in building the code. So I think it has something to do with PSA and TF-M, because the exercise 2 example 1 is not trying to use TF-M, the rest of the examples are using TF-M. 

     

Reply
  • I face the same problem. I tried to build the less3 exer 1 solution example, but I get the same error in the linking process:

    Build files have been written to: C:/wifi-fund/lesson3/wififund_less3_exer1_solution/build/tfm
    [159/163] Linking C executable bin\tfm_s.axf
    Memory region Used Size Region Size %age Used
    FLASH: 48456 B 64 KB 73.94%
    RAM: 19780 B 32 KB 60.36%
    [15/433] Performing install step for 'tfm'
    -- Install configuration: "Debug"
    [426/433] Linking C executable zephyr\zephyr_pre0.elf
    FAILED: zephyr/zephyr_pre0.elf zephyr/zephyr_pre0.map
    cmd.exe /C "cd . && C:\ncs\toolchains\c57af46cb7\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe -gdwarf-4 @CMakeFiles\zephyr_pre0.rsp -o zephyr\zephyr_pre0.elf && cmd.exe /C "cd /D C:\wifi-fund\lesson3\wififund_less3_exer1_solution\build\zephyr && C:\ncs\toolchains\c57af46cb7\opt\bin\cmake.exe -E true""
    c:/ncs/toolchains/c57af46cb7/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd.exe: modules/nrf/subsys/net/lib/wifi_credentials/libwifi_credentials.a(wifi_credentials.c.obj): in function `init':
    C:/ncs/v2.5.2/nrf/subsys/net/lib/wifi_credentials/wifi_credentials.c:77: undefined reference to `wifi_credentials_backend_init'
    c:/ncs/toolchains/c57af46cb7/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd.exe: modules/nrf/subsys/net/lib/wifi_credentials/libwifi_credentials.a(wifi_credentials.c.obj): in function `wifi_credentials_get_by_ssid_personal_struct':
    C:/ncs/v2.5.2/nrf/subsys/net/lib/wifi_credentials/wifi_credentials.c:128: undefined reference to `wifi_credentials_load_entry'
    c:/ncs/toolchains/c57af46cb7/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd.exe: modules/nrf/subsys/net/lib/wifi_credentials/libwifi_credentials.a(wifi_credentials.c.obj): in function `wifi_credentials_set_personal_struct':
    C:/ncs/v2.5.2/nrf/subsys/net/lib/wifi_credentials/wifi_credentials.c:177: undefined reference to `wifi_credentials_store_entry'
    c:/ncs/toolchains/c57af46cb7/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd.exe: modules/nrf/subsys/net/lib/wifi_credentials/libwifi_credentials.a(wifi_credentials.c.obj): in function `wifi_credentials_delete_by_ssid':
    C:/ncs/v2.5.2/nrf/subsys/net/lib/wifi_credentials/wifi_credentials.c:331: undefined reference to `wifi_credentials_delete_entry'
    collect2.exe: error: ld returned 1 exit status
    ninja: build stopped: subcommand failed.
    FATAL ERROR: command exited with status 1: 'C:\ncs\toolchains\c57af46cb7\opt\bin\cmake.EXE' --build 'c:\wifi-fund\lesson3\wififund_less3_exer1_solution\build'

    However, when I build the less2 exer1 example, it builds fine:

    Building wififund_less2_exer1
    C:\Windows\system32\cmd.exe /d /s /c "west build --build-dir c:/wifi-fund/lesson2/wififund_less2_exer1/build_nrf7002_dk c:/wifi-fund/lesson2/wififund_less2_exer1 --pristine --board nrf7002dk_nrf5340_cpuapp --no-sysbuild -- -DNCS_TOOLCHAIN_VERSION=NONE -DCONFIG_CORTEX_M_DEBUG_MONITOR_HOOK=y -DCONFIG_DEBUG_OPTIMIZATIONS=y -DCONFIG_DEBUG_THREAD_INFO=y -DCONFIG_SEGGER_DEBUGMON=y -DCACHED_CONF_FILE=c:/wifi-fund/lesson2/wififund_less2_exer1/prj.conf"

    -- west build: generating a build system
    Loading Zephyr default modules (Zephyr base).
    -- Application: C:/wifi-fund/lesson2/wififund_less2_exer1
    -- CMake version: 3.20.5
    -- Found Python3: C:/ncs/toolchains/c57af46cb7/opt/bin/python.exe (found suitable version "3.8.2", minimum required is "3.8") found components: Interpreter
    -- Cache files will be written to: C:/ncs/v2.5.2/zephyr/.cache
    -- Zephyr version: 3.4.99 (C:/ncs/v2.5.2/zephyr)
    -- Found west (found suitable version "1.1.0", minimum required is "0.14.0")
    -- Board: nrf7002dk_nrf5340_cpuapp
    -- Found host-tools: zephyr 0.16.1 (C:/ncs/toolchains/c57af46cb7/opt/zephyr-sdk)
    -- Found toolchain: zephyr 0.16.1 (C:/ncs/toolchains/c57af46cb7/opt/zephyr-sdk)
    -- Found Dtc: C:/ncs/toolchains/c57af46cb7/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
    -- Found BOARD.dts: C:/ncs/v2.5.2/nrf/boards/arm/nrf7002dk_nrf5340/nrf7002dk_nrf5340_cpuapp.dts
    -- Generated zephyr.dts: C:/wifi-fund/lesson2/wififund_less2_exer1/build_nrf7002_dk/zephyr/zephyr.dts
    -- Generated devicetree_generated.h: C:/wifi-fund/lesson2/wififund_less2_exer1/build_nrf7002_dk/zephyr/include/generated/devicetree_generated.h
    -- Including generated dts.cmake file: C:/wifi-fund/lesson2/wififund_less2_exer1/build_nrf7002_dk/zephyr/dts.cmake
    Parsing C:/ncs/v2.5.2/zephyr/Kconfig
    Loaded configuration 'C:/ncs/v2.5.2/nrf/boards/arm/nrf7002dk_nrf5340/nrf7002dk_nrf5340_cpuapp_defconfig'
    Merged configuration 'c:/wifi-fund/lesson2/wififund_less2_exer1/prj.conf'
    Merged configuration 'C:/wifi-fund/lesson2/wififund_less2_exer1/build_nrf7002_dk/zephyr/misc/generated/extra_kconfig_options.conf'
    Configuration saved to 'C:/wifi-fund/lesson2/wififund_less2_exer1/build_nrf7002_dk/zephyr/.config'
    Kconfig header saved to 'C:/wifi-fund/lesson2/wififund_less2_exer1/build_nrf7002_dk/zephyr/include/generated/autoconf.h'
    -- Found GnuLd: c:/ncs/toolchains/c57af46cb7/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd.exe (found version "2.38")
    -- The C compiler identification is GNU 12.2.0
    -- The CXX compiler identification is GNU 12.2.0
    -- The ASM compiler identification is GNU
    -- Found assembler: C:/ncs/toolchains/c57af46cb7/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc.exe
    -- Configuring done
    -- Generating done
    -- Build files have been written to: C:/wifi-fund/lesson2/wififund_less2_exer1/build_nrf7002_dk
    -- west build: building application
    [2/449] Generating include/generated/version.h
    -- Zephyr version: 3.4.99 (C:/ncs/v2.5.2/zephyr), build: v3.4.99-ncs1-2
    [449/449] Linking C executable zephyr\zephyr.elf
    Memory region Used Size Region Size %age Used
    FLASH: 808208 B 1 MB 77.08%
    RAM: 170260 B 448 KB 37.11%
    IDT_LIST: 0 GB 2 KB 0.00%
    * Terminal will be reused by tasks, press any key to close it.

    I also tried to build another example in Exercise 2 of the Wifi Basics course and also got an error in building the code. So I think it has something to do with PSA and TF-M, because the exercise 2 example 1 is not trying to use TF-M, the rest of the examples are using TF-M. 

     

Children
Related