static assertion failed: "CONFIG_WIFI_CREDENTIALS_STATIC_SSID required" when building mqtt example with nRF7002 dev board

Hi.

I am new to using VS Code so i am thinking i am doing something wrong. I am using the NCS 2.4, the nrf7002dk_nrf5340  dev board with the MQTT example that is here. 

I am trying to compile the example here https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/net/mqtt/doc/description.html

I have used the below build configuration

But the compile is failing with the following error: 

C:\ncs\v2.4.0\zephyr\include\zephyr\toolchain\gcc.h:81:36: error: static assertion failed: "CONFIG_WIFI_CREDENTIALS_STATIC_SSID required"
81 | #define BUILD_ASSERT(EXPR, MSG...) _Static_assert(EXPR, "" MSG)
| ^~~~~~~~~~~~~~
C:\ncs\v2.4.0\nrf\subsys\net\lib\wifi_mgmt_ext\wifi_mgmt_ext.c:23:9: note: in expansion of macro 'BUILD_ASSERT'
23 | BUILD_ASSERT(sizeof(CONFIG_WIFI_CREDENTIALS_STATIC_SSID) != 1,
| ^~~~~~~~~~~~

and looking further back into the build log i see:

-- Found assembler: C:/ncs/toolchains/31f4403e35/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc.exe
CMake Warning at C:/ncs/v2.4.0/nrf/subsys/net/lib/mqtt_helper/CMakeLists.txt:12 (message):
Credentials are exposed in non-secure memory. This should be avoided in
production.


CMake Warning at C:/ncs/v2.4.0/zephyr/CMakeLists.txt:838 (message):
No SOURCES given to Zephyr library: lib__libc__common

Excluding target from build.


CMake Warning at C:/ncs/v2.4.0/zephyr/CMakeLists.txt:838 (message):
No SOURCES given to Zephyr library: drivers__ethernet

Excluding target from build.


CMake Warning at C:/ncs/v2.4.0/zephyr/CMakeLists.txt:838 (message):
No SOURCES given to Zephyr library: drivers__wifi

Excluding target from build.


CMake Warning at C:/ncs/v2.4.0/zephyr/CMakeLists.txt:1864 (message):
__ASSERT() statements are globally ENABLED

 I am able to build the provisioning example for the dev board fine. However i cant seem to build this example.

Any ideas?

Mark

Parents
  • Hi,

    You need to configure the SSID for your Wi-Fi network in prj.conf. If your Wi-Fi network is password protected, then you must also configure the password.

    CONFIG_WIFI_CREDENTIALS_STATIC_SSID="my_network_ssid"
    CONFIG_WIFI_CREDENTIALS_STATIC_PASSWORD="my_network_password"

    Best regards,
    Marte

  • Hi, thanks this was not clear to me that needed to be added to the defines from the kconfig. I have configured this now and get this far. 

    [00:00:00.475,799] <inf> fs_nvs: 6 Sectors of 4096 bytes
    [00:00:00.475,830] <inf> fs_nvs: alloc wra: 0, fe8
    [00:00:00.475,830] <inf> fs_nvs: data wra: 0, 0
    *** Booting Zephyr OS build v3.3.99-ncs1-1 ***
    [00:00:01.479,614] <wrn> wifi_credentials: Cannot retrieve WiFi credentials, no entry found for the provided SSID
    [00:00:01.479,644] <inf> wifi_mgmt_ext: Adding statically configured WiFi network [Irwin] to internal list.
    [00:00:08.128,540] <inf> network: Wi-Fi Connected, waiting for IP address
    [00:00:08.282,470] <inf> network: IPv4 address acquired
    ASSERTION FAIL [dns_offload] @ WEST_TOPDIR/zephyr/subsys/net/lib/sockets/socket_offload.c:29
    [00:00:13.286,132] <err> os: r0/a1: 0x00000004 r1/a2: 0x0000001d r2/a3: 0x20001190
    [00:00:13.286,132] <err> os: r3/a4: 0x20004dfc r12/ip: 0x00000003 r14/lr: 0x00007cbd
    [00:00:13.286,132] <err> os: xpsr: 0x61000000
    [00:00:13.286,163] <err> os: Faulting instruction address (r15/pc): 0x00049e7c
    [00:00:13.286,193] <err> os: >>> ZEPHYR FATAL ERROR 4: Kernel panic on CPU 0
    [00:00:13.286,224] <err> os: Current thread: 0x20001190 (unknown)

    Any ideas about this kernel panic?

  • Hi,

    Have you made any changes to the sample other than configuring the network credentials? Do you get the same error if you build without TLS, that is, without adding overlay-tls-nrf7002.conf in the build configuration?

    Best regards,
    Marte

  • I will check now if there is any other code snippets missing. Or added, i was trying to load the boilerplate example.

    I have cleaned and rebuilt the configuration file but it still keeps crashing with the kernel panic. 

    I have noticed that VS Code is adding that CMake arguements and even if i delete them it re-adds it next time it builds. 

    I am seeing the first LED light thats its connecting to the server then its crashing.

    A snippet from the prj.conf is below

    Could the fact the head size being set cause it to crash?

Reply
  • I will check now if there is any other code snippets missing. Or added, i was trying to load the boilerplate example.

    I have cleaned and rebuilt the configuration file but it still keeps crashing with the kernel panic. 

    I have noticed that VS Code is adding that CMake arguements and even if i delete them it re-adds it next time it builds. 

    I am seeing the first LED light thats its connecting to the server then its crashing.

    A snippet from the prj.conf is below

    Could the fact the head size being set cause it to crash?

Children
Related