Wifi Fundamentals Lesson 4 Exercise 2 not building, using nrf5340dk with nrf7002ek shield

Hello,

I am using the nrf5340dk with nrf7002ek shield and trying to build the wifi fundamentals lesson 4 exercise 2 code (connecting to MQTT over TLS) but it isn't building. I'm using the code from here: https://github.com/NordicDeveloperAcademy/wifi-fund/blob/main/lesson4/wififund_less4_exer2_solution/boards/nrf5340dk_nrf5340_cpuapp_ns.conf

Here are the build logs:
[433/443] Building C object zephyr/lib/posix/options/CMakeFiles/lib__posix__options.dir/uname.c.obj
[434/443] Building C object zephyr/kernel/CMakeFiles/kernel.dir/dynamic_disabled.c.obj
[435/443] Linking C static library modules/nrf/modules/hostap/lib..__nrf__modules__hostap.a
[436/443] Linking C static library zephyr/lib/posix/options/liblib__posix__options.a
[437/443] Linking C static library zephyr/kernel/libkernel.a
[438/443] Linking C executable zephyr/zephyr_pre0.elf
FAILED: zephyr/zephyr_pre0.elf zephyr/zephyr_pre0.map /Users/mayb/Documents/hello_world2/build/hello_world2/zephyr/zephyr_pre0.map
: && ccache /opt/nordic/ncs/toolchains/f8037e9b83/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc -gdwarf-4 zephyr/CMakeFiles/zephyr_pre0.dir/misc/empty_file.c.obj -o zephyr/zephyr_pre0.elf zephyr/CMakeFiles/offsets.dir/./arch/arm/core/offsets/offsets.c.obj tfm/api_ns/interface/lib/s_veneers.o -fuse-ld=bfd -T zephyr/linker_zephyr_pre0.cmd -Wl,-Map=/Users/mayb/Documents/hello_world2/build/hello_world2/zephyr/zephyr_pre0.map -Wl,--whole-archive app/libapp.a zephyr/libzephyr.a zephyr/arch/common/libarch__common.a zephyr/arch/arch/arm/core/libarch__arm__core.a zephyr/arch/arch/arm/core/cortex_m/libarch__arm__core__cortex_m.a zephyr/arch/arch/arm/core/cortex_m/cmse/libarch__arm__core__cortex_m__cmse.a zephyr/arch/arch/arm/core/mpu/libarch__arm__core__mpu.a zephyr/lib/libc/newlib/liblib__libc__newlib.a zephyr/lib/libc/common/liblib__libc__common.a zephyr/lib/posix/options/liblib__posix__options.a zephyr/soc/soc/nrf5340/libsoc__nordic.a zephyr/subsys/random/libsubsys__random.a zephyr/subsys/net/libsubsys__net.a zephyr/subsys/net/l2/ethernet/libsubsys__net__l2__ethernet.a zephyr/subsys/net/l2/wifi/libsubsys__net__l2__wifi.a zephyr/subsys/net/ip/libsubsys__net__ip.a zephyr/subsys/net/lib/mqtt/libsubsys__net__lib__mqtt.a zephyr/subsys/net/lib/dhcpv4/libsubsys__net__lib__dhcpv4.a zephyr/subsys/net/lib/dns/libsubsys__net__lib__dns.a zephyr/subsys/net/conn_mgr/libsubsys__net__conn_mgr.a zephyr/drivers/clock_control/libdrivers__clock_control.a zephyr/drivers/console/libdrivers__console.a zephyr/drivers/entropy/libdrivers__entropy.a zephyr/drivers/gpio/libdrivers__gpio.a zephyr/drivers/mbox/libdrivers__mbox.a zephyr/drivers/pinctrl/libdrivers__pinctrl.a zephyr/drivers/serial/libdrivers__serial.a zephyr/drivers/timer/libdrivers__timer.a modules/nrf/lib/dk_buttons_and_leds/lib..__nrf__lib__dk_buttons_and_leds.a modules/nrf/subsys/nrf_security/src/zephyr/libmbedtls_zephyr.a modules/nrf/subsys/net/lib/wifi_credentials/libwifi_credentials.a modules/nrf/subsys/net/lib/wifi_mgmt_ext/lib..__nrf__subsys__net__lib__wifi_mgmt_ext.a modules/nrf/modules/trusted-firmware-m/lib..__nrf__modules__trusted-firmware-m.a modules/nrf/modules/trusted-firmware-m/libtfm_api_nrf.a modules/nrf/modules/hostap/lib..__nrf__modules__hostap.a modules/trusted-firmware-m/libtfm_api.a modules/hal_nordic/nrfx/libmodules__hal_nordic__nrfx.a -Wl,--no-whole-archive zephyr/kernel/libkernel.a -L"/opt/nordic/ncs/toolchains/f8037e9b83/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/thumb/v8-m.main/nofp" -L/Users/mayb/Documents/hello_world2/build/hello_world2/zephyr -lgcc zephyr/arch/common/libisr_tables.a -Wl,--gc-sections -Wl,--build-id=none -Wl,--sort-common=descending -Wl,--sort-section=alignment -Wl,-u,_OffsetAbsSyms -Wl,-u,_ConfigAbsSyms -nostdlib -static -Wl,-X -Wl,-N -Wl,--orphan-handling=warn -Wl,-no-pie -lm -Wl,-lc -L"/opt/nordic/ncs/toolchains/f8037e9b83/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi"/lib/thumb/v8-m.main/nofp -Wl,-lgcc -lc modules/nrf/subsys/nrf_security/src/libmbedtls.a modules/nrf/subsys/nrf_security/src/libmbedx509.a modules/nrf/subsys/nrf_security/src/libmbedcrypto.a /opt/nordic/ncs/v2.7.0/nrfxlib/crypto/nrf_oberon/lib/cortex-m33/soft-float/liboberon_mbedtls_3.0.15.a modules/nrf/subsys/nrf_security/src/libmbedcrypto_base.a -mcpu=cortex-m33 -mthumb -mabi=aapcs -mfp16-format=ieee /opt/nordic/ncs/v2.7.0/nrfxlib/crypto/nrf_oberon/lib/cortex-m33/soft-float/liboberon_3.0.15.a -lc && cd /Users/mayb/Documents/hello_world2/build/hello_world2/zephyr && /opt/nordic/ncs/toolchains/f8037e9b83/Cellar/cmake/3.21.0/bin/cmake -E true
/opt/nordic/ncs/toolchains/f8037e9b83/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: modules/nrf/modules/hostap/lib..__nrf__modules__hostap.a(supp_main.c.obj): in function `iface_cb':
/opt/nordic/ncs/v2.7.0/nrf/modules/hostap/src/supp_main.c:391: undefined reference to `__device_dts_ord_6'
/opt/nordic/ncs/toolchains/f8037e9b83/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: modules/nrf/modules/hostap/lib..__nrf__modules__hostap.a(supp_main.c.obj): in function `z_wpas_start':
/opt/nordic/ncs/v2.7.0/nrf/modules/hostap/src/supp_main.c:623: undefined reference to `__device_dts_ord_6'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
FAILED: _sysbuild/sysbuild/images/hello_world2-prefix/src/hello_world2-stamp/hello_world2-build /Users/mayb/Documents/hello_world2/build/_sysbuild/sysbuild/images/hello_world2-prefix/src/hello_world2-stamp/hello_world2-build
cd /Users/mayb/Documents/hello_world2/build/hello_world2 && /opt/nordic/ncs/toolchains/f8037e9b83/Cellar/cmake/3.21.0/bin/cmake --build .
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: /opt/nordic/ncs/toolchains/f8037e9b83/bin/cmake --build /Users/mayb/Documents/hello_world2/build

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

and here is the build configuration i'm using:


other than that, i am using the code directly from the github file. i do not have a app.overlay file and I did not change the ca_certificate value. i tried to update my cmakelists.txt file to this but it didn't do anything to fix the issue:

cmake_minimum_required(VERSION 3.20.0)
set(SHIELD nrf7002ek)
set(CONF_FILE "prj.conf")
set(BOARD nrf5340dk_nrf5340)
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(hello_world2)
target_sources(app PRIVATE src/main.c)

I am building on a mac with the nrf connect SDK v2.7.0 arm64 and toolchain 2.7.20240620 with toolchain variant zephyr.

Can you help me fix this? Thank you so much in advance!
Parents Reply Children
No Data
Related