Hello_world and other samples do not build properly for thingy53_NRF5340_cpuapp_ns

I cannot build the hello_world sample (and blinky for that matter). Target I have tested here is thingy53_NRF5340_cpuapp_ns. Everything is installed according to the recommendations using the nRF connect for desktop. The version of sdk is v.2.4.1

In VS code, I create a new application hello_world. Seems to work fine.

Add a build configuration for nrf5340 (thingy53). It generates 19 "problems" - out of the box - so to say.

I have thingy connected via Segger J-link Plus. J-link plus can access the thingy53/nrf5340 and download code. But this is no use when the code is broken.

Unfortunately there is no direct way to copy the "PROBLEMS" list to a file (would you believe !) from the darn VS Code (*1) so I have added a picture.

I have similar performance when building Blinky for same target. I have no interest in trying other targets as we will be using nrf5340.

Any ideas what I am missing? Looks like some path or configuration error but I am clueless as to what it can be. Should this not just work without further editing and with zero warnings?

(*1) It appears that I have to install an extension to copy the PROBLEMS at a textual listing - this is sort of - silly!

Here is support dump: Slight edited wrt. paths

----------------------------------------------

IMPORTANT: The data below could contain sensitive or confidential information about your environment.
If you do not wish this to be seen by others, please make sure to remove it before sharing.

For help and support, visit the Nordic DevZone at devzone.nordicsemi.com/.

{
"platform": {
"os": "win32",
"osVersion": "Windows 10 Pro",
"osKernel": "10.0.22621",
"vscode": "1.81.0",
"electron": "22.3.18",
"node": "v16.17.1"
},
"system": {
"date": "2023-08-05T21:18:21.664Z",
"vscodeRoot": "c:\\Users\\he\\AppData\\Local\\Programs\\Microsoft VS Code\\resources\\app",
"nrfConnectForDesktopInstalled": true,
"vscodeUptime": "00:33:53",
"osUptime": "303:01:49",
"cpu": {
"model": "12th Gen Intel(R) Core(TM) i7-12700H",
"speed": "2688 MHz",
"count": 10
},
"memory": {
"total": "63.68 GB",
"free": "43.77 GB"
}
},
"workspace": {
"name": "Untitled (Workspace)",
"workspaceFile": "1691263624658",
"folders": [
"c:\\Users\\he\\OneDrive\\Documents\\ncs\\hello_world"
]
},
"extensions": {
"internal": {
"nordic-semiconductor.nrf-connect": {
"version": "2023.7.129",
"path": "c:\\Users\\he\\.vscode\\extensions\\nordic-semiconductor.nrf-connect-2023.7.129-win32-x64",
"isActive": true
},
"nordic-semiconductor.nrf-terminal": {
"version": "2023.7.47",
"path": "c:\\Users\\he\\.vscode\\extensions\\nordic-semiconductor.nrf-terminal-2023.7.47",
"isActive": true
},
"nordic-semiconductor.nrf-devicetree": {
"version": "2023.7.56",
"path": "c:\\Users\\he\\.vscode\\extensions\\nordic-semiconductor.nrf-devicetree-2023.7.56",
"isActive": true
},
"nordic-semiconductor.nrf-kconfig": {
"version": "2023.6.51",
"path": "c:\\Users\\he\\.vscode\\extensions\\nordic-semiconductor.nrf-kconfig-2023.6.51",
"isActive": true
}
},
"external": {
"marus25.cortex-debug": null,
"ms-vscode.cpptools": "1.16.3",
"ms-vscode-remote.remote-wsl-recommender": "0.0.19",
"ms-vscode.js-debug": "1.81.0",
"ms-vscode.js-debug-companion": "1.1.2",
"ms-vscode.vscode-js-profile-table": "1.0.3",
"luveti.kconfig": "1.0.3",
"ms-python.python": "2023.14.0",
"ms-python.vscode-pylance": "2023.8.10",
"ms-vscode-remote.remote-wsl": "0.81.0",
"ms-vscode.cpptools-extension-pack": "1.3.0",
"ms-vscode.cpptools-themes": "2.0.0",
"trond-snekvik.gnu-mapfiles": "1.1.0"
}
},
"tools": {
"C:\\ncs\\toolchains\\31f4403e35\\opt\\zephyr-sdk\\arm-zephyr-eabi\\bin\\arm-zephyr-eabi-gcc.exe": "0.16.0",
"C:\\Program Files\\SEGGER\\JLink\\JLink.exe": "7.88m",
"C:\\Program Files\\Nordic Semiconductor\\nrf-command-line-tools\\bin\\nrfjprog.exe": "10.23.0",
"nrfutil": "Not found",
"C:\\ncs\\toolchains\\31f4403e35\\opt\\bin\\cmake.exe": "3.20.5",
"C:\\ncs\\toolchains\\31f4403e35\\opt\\bin\\Scripts\\west.exe": "1.0.0",
"C:\\ncs\\toolchains\\31f4403e35\\opt\\bin\\python.exe": "3.8.2",
"C:\\ncs\\toolchains\\31f4403e35\\opt\\bin\\ninja.exe": "1.9.0",
"C:\\ncs\\toolchains\\31f4403e35\\opt\\bin\\gperf.exe": "3.1",
"C:\\ncs\\toolchains\\31f4403e35\\opt\\bin\\dtc.exe": "1.4.7",
"C:\\ncs\\toolchains\\31f4403e35\\opt\\bin\\gn.exe": "2105",
"C:\\ncs\\toolchains\\31f4403e35\\mingw64\\bin\\git.exe": "2.37.3.windows.1",
"gdbPath": "c:\\ncs\\toolchains\\31f4403e35\\opt\\zephyr-sdk\\arm-zephyr-eabi\\bin\\arm-zephyr-eabi-gdb.exe"
},
"sdks": [
{
"version": "2.4.0",
"path": "c:\\ncs\\v2.4.0"
},
{
"version": "2.4.1",
"path": "c:\\ncs\\v2.4.1"
}
],
"toolchains": [
{
"version": "2.4.0",
"path": "c:\\ncs\\toolchains\\31f4403e35"
}
],
"connectedDevices": [
{
"serialNumber": "602003877"
}
],
"deviceProvider": "nrfjprog",
"config": {
"nordic-semiconductor.nrf-connect": {
"topdir": "${nrf-connect.sdk:2.4.1}",
"toolchain": {
"path": "${nrf-connect.toolchain:2.4.0}"
},
"ozonePath": "",
"applications": [],
"applicationOptions": {},
"kconfig": {
"interface": "kconfig",
"executeInDefaultShell": false
},
"welcome": {
"showOnStartup": true
},
"west": {
"env": {
"$base": "terminal"
}
},
"boardRoots": [],
"taskBindings": {},
"debugging": {
"flash": true,
"bindings": {
"c:/Users/he/OneDrive/Documents/ncs/hello_world/build": "Launch hello_world\\build"
}
},
"activeAppFollowActiveEditor": true,
"deviceProvider": "nrfjprog",
"enableTelemetry": true
},
"nordic-semiconductor.nrf-terminal": {
"terminalMode": "character"
}
},
"environment": {
"westEnv": {
"ELECTRON_RUN_AS_NODE": "1",
"HOME": "C:\\Users\\he",
"HOMEDRIVE": "C:",
"HOMEPATH": "\\Users\\he",
"PATH": "C:\\ncs\\toolchains\\31f4403e35;C:\\ncs\\toolchains\\31f4403e35\\mingw64\\bin;C:\\ncs\\toolchains\\31f4403e35\\bin;C:\\ncs\\toolchains\\31f4403e35\\opt\\bin;C:\\ncs\\toolchains\\31f4403e35\\opt\\bin\\Scripts;C:\\ncs\\toolchains\\31f4403e35\\opt\\nanopb\\generator-bin;C:\\ncs\\toolchains\\31f4403e35\\opt\\zephyr-sdk\\aarch64-zephyr-elf\\bin;C:\\ncs\\toolchains\\31f4403e35\\opt\\zephyr-sdk\\x86_64-zephyr-elf\\bin;C:\\ncs\\toolchains\\31f4403e35\\opt\\zephyr-sdk\\arm-zephyr-eabi\\bin;c:\\Users\\he\\.vscode\\extensions\\nordic-semiconductor.nrf-connect-2023.7.129-win32-x64\\platform\\nrfutil\\lib\\nrfutil-toolchain-manager;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Windows\\System32\\OpenSSH\\;C:\\Program Files\\dotnet\\;C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common;C:\\Program Files\\Nordic Semiconductor\\nrf-command-line-tools\\bin\\;C:\\Users\\he\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\he\\AppData\\Local\\Programs\\Microsoft VS Code\\bin",
"ZEPHYR_BASE": "c:\\ncs\\v2.4.1\\zephyr",
"ZEPHYR_TOOLCHAIN_VARIANT": "zephyr",
"ZEPHYR_SDK_INSTALL_DIR": "C:\\ncs\\toolchains\\31f4403e35\\opt\\zephyr-sdk",
"PYTHONPATH": "C:\\ncs\\toolchains\\31f4403e35\\opt\\bin;C:\\ncs\\toolchains\\31f4403e35\\opt\\bin\\Lib;C:\\ncs\\toolchains\\31f4403e35\\opt\\bin\\Lib\\site-packages"
},
"inherited": {
"ELECTRON_RUN_AS_NODE": "1",
"HOME": "C:\\Users\\he",
"HOMEDRIVE": "C:",
"HOMEPATH": "\\Users\\he",
"Path": "C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Windows\\System32\\OpenSSH\\;C:\\Program Files\\dotnet\\;C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common;C:\\Program Files\\Nordic Semiconductor\\nrf-command-line-tools\\bin\\;C:\\Users\\he\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\he\\AppData\\Local\\Programs\\Microsoft VS Code\\bin",
"PATH": "C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Windows\\System32\\OpenSSH\\;C:\\Program Files\\dotnet\\;C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common;C:\\Program Files\\Nordic Semiconductor\\nrf-command-line-tools\\bin\\;C:\\Users\\he\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\he\\AppData\\Local\\Programs\\Microsoft VS Code\\bin"
},
"toolchainPath": "c:\\ncs\\toolchains\\31f4403e35",
"toolchainBinPath": "c:\\ncs\\toolchains\\31f4403e35\\opt\\zephyr-sdk\\arm-zephyr-eabi\\bin",
"toolchainVersion": "2.4.0"
},
"terminal": {
"defaultProfile": null
}
}

Parents Reply Children
  • Hello,

    Thanks for your answer.

    I installed sdk according to the recommendations using the tool for that. And I have tried two different pc's with same result.

    I have built as you suggest using bash terminal and it builds but with a number of warnings. Actually it also builds in VS code. But does not execute. (note 1#)

    I realize that the messages I describe above are warnings, despite they appear quite substantial like

    "No SOURCES given to Zephyr library: lib__libc__common"

    I also note that the "PROBLEMS" listing holds different warnings compared to the bash build - or do I have to open a logfile to see those when using west directly?

    Anyway, this warning issue may be an insignificant thing, but when I debug in VS code it never enters the main program but gets stuck inside the fih_panic_loop inside the file "fault_injection_hardening.c"

    I have built in VS code using debug enabled. So should that not just allow me to put a breakpoint in the main.c code and halt on that? It does not work.

    You say that you tested the code with v2.4.0 so I am curious do you also get a similar list of warnings and does the debugging work?

    thanks for your support. It is really a struggle to get this off the ground.

    Br henning

    Note 2#

    inside VS code, inside "fault_injection_hardening.c" (which opens when pausing the debug session) the line
    #include "bootutil/fault_injection_hardening.h"

    has: #include errors detected based on information provided by the configuration Provider setting. Squiggles are disabled for this translation unit. cannot open source file "bootutil/fault_injection_hardening.h"C/C++(1696)
    should that be a concern? Certainly looks like missing paths.

    (Note 1#) My reasoning: The debug did not produce running code, as described, so I assumed the warnings  which only manifest as errors at runtime and the reason for the broken debug code.

    ------------------------------------ bash build console dump ----


    he@D MINGW64 ~/Documents/nRF/hello_world_thing (master)
    $ west build -b thingy53_nrf5340_cpuapp_ns
    -- west build: generating a build system
    Loading Zephyr default modules (Zephyr base).
    -- Application: C:/Users/he/Documents/nRF/hello_world_thing
    -- CMake version: 3.20.5
    -- Using NCS Toolchain 2.4.0 for building. (C:/ncs/toolchains/31f4403e35/cmake)
    -- Found Python3: C:/ncs/toolchains/31f4403e35/opt/bin/python.exe (found suitable exact version "3.8.2") found components: Interpreter
    -- Cache files will be written to: C:/ncs/v2.4.1/zephyr/.cache
    -- Zephyr version: 3.3.99 (C:/ncs/v2.4.1/zephyr)
    -- Found west (found suitable version "1.0.0", minimum required is "0.7.1")
    -- Board: thingy53_nrf5340_cpuapp_ns
    -- Found host-tools: zephyr 0.16.0 (C:/ncs/toolchains/31f4403e35/opt/zephyr-sdk)
    -- Found toolchain: zephyr 0.16.0 (C:/ncs/toolchains/31f4403e35/opt/zephyr-sdk)
    -- Found Dtc: C:/ncs/toolchains/31f4403e35/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
    -- Found BOARD.dts: C:/ncs/v2.4.1/zephyr/boards/arm/thingy53_nrf5340/thingy53_nrf5340_cpuapp_ns.dts
    -- Generated zephyr.dts: C:/Users/he/Documents/nRF/hello_world_thing/build/zephyr/zephyr.dts
    -- Generated devicetree_generated.h: C:/Users/he/Documents/nRF/hello_world_thing/build/zephyr/include/generated/devicetree_generated.h
    -- Including generated dts.cmake file: C:/Users/he/Documents/nRF/hello_world_thing/build/zephyr/dts.cmake
    Parsing C:/ncs/v2.4.1/zephyr/Kconfig
    Loaded configuration 'C:/ncs/v2.4.1/zephyr/boards/arm/thingy53_nrf5340/thingy53_nrf5340_cpuapp_ns_defconfig'
    Merged configuration 'C:/Users/he/Documents/nRF/hello_world_thing/prj.conf'
    Configuration saved to 'C:/Users/he/Documents/nRF/hello_world_thing/build/zephyr/.config'
    Kconfig header saved to 'C:/Users/he/Documents/nRF/hello_world_thing/build/zephyr/include/generated/autoconf.h'
    -- Found GnuLd: c:/ncs/toolchains/31f4403e35/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/31f4403e35/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc.exe

    === child image empty_net_core - CPUNET begin ===
    loading initial cache file C:/Users/he/Documents/nRF/hello_world_thing/build/empty_net_core/child_image_preload.cmake
    Loading Zephyr default modules (Zephyr base (cached)).
    -- Application: C:/ncs/v2.4.1/nrf/samples/nrf5340/empty_net_core
    -- CMake version: 3.20.5
    -- Cache files will be written to: C:/ncs/v2.4.1/zephyr/.cache
    -- Zephyr version: 3.3.99 (C:/ncs/v2.4.1/zephyr)
    -- Found west (found suitable version "1.0.0", minimum required is "0.7.1")
    -- Board: thingy53_nrf5340_cpunet
    -- Found host-tools: zephyr 0.16.0 (C:/ncs/toolchains/31f4403e35/opt/zephyr-sdk)
    -- Found toolchain: zephyr 0.16.0 (C:/ncs/toolchains/31f4403e35/opt/zephyr-sdk)
    -- Found BOARD.dts: C:/ncs/v2.4.1/zephyr/boards/arm/thingy53_nrf5340/thingy53_nrf5340_cpunet.dts
    -- Generated zephyr.dts: C:/Users/he/Documents/nRF/hello_world_thing/build/empty_net_core/zephyr/zephyr.dts
    -- Generated devicetree_generated.h: C:/Users/he/Documents/nRF/hello_world_thing/build/empty_net_core/zephyr/include/generated/devicetree_generated.h
    -- Including generated dts.cmake file: C:/Users/he/Documents/nRF/hello_world_thing/build/empty_net_core/zephyr/dts.cmake
    Parsing C:/ncs/v2.4.1/zephyr/Kconfig
    Loaded configuration 'C:/Users/he/Documents/nRF/hello_world_thing/build/empty_net_core/zephyr/.config'
    No change to configuration in 'C:/Users/he/Documents/nRF/hello_world_thing/build/empty_net_core/zephyr/.config'
    No change to Kconfig header in 'C:/Users/he/Documents/nRF/hello_world_thing/build/empty_net_core/zephyr/include/generated/autoconf.h'

    === child image b0n - CPUNET (inherited) begin ===
    loading initial cache file C:/Users/he/Documents/nRF/hello_world_thing/build/empty_net_core/b0n/child_image_preload.cmake
    Loading Zephyr default modules (Zephyr base (cached)).
    -- Application: C:/ncs/v2.4.1/nrf/samples/nrf5340/netboot
    -- CMake version: 3.20.5
    -- Cache files will be written to: C:/ncs/v2.4.1/zephyr/.cache
    -- Zephyr version: 3.3.99 (C:/ncs/v2.4.1/zephyr)
    -- Found west (found suitable version "1.0.0", minimum required is "0.7.1")
    -- Board: thingy53_nrf5340_cpunet
    -- Found host-tools: zephyr 0.16.0 (C:/ncs/toolchains/31f4403e35/opt/zephyr-sdk)
    -- Found toolchain: zephyr 0.16.0 (C:/ncs/toolchains/31f4403e35/opt/zephyr-sdk)
    -- Found BOARD.dts: C:/ncs/v2.4.1/zephyr/boards/arm/thingy53_nrf5340/thingy53_nrf5340_cpunet.dts
    -- Generated zephyr.dts: C:/Users/he/Documents/nRF/hello_world_thing/build/empty_net_core/b0n/zephyr/zephyr.dts
    -- Generated devicetree_generated.h: C:/Users/he/Documents/nRF/hello_world_thing/build/empty_net_core/b0n/zephyr/include/generated/devicetree_generated.h
    -- Including generated dts.cmake file: C:/Users/he/Documents/nRF/hello_world_thing/build/empty_net_core/b0n/zephyr/dts.cmake
    Parsing C:/ncs/v2.4.1/nrf/samples/nrf5340/netboot/Kconfig
    Loaded configuration 'C:/Users/he/Documents/nRF/hello_world_thing/build/empty_net_core/b0n/zephyr/.config'
    No change to configuration in 'C:/Users/he/Documents/nRF/hello_world_thing/build/empty_net_core/b0n/zephyr/.config'
    No change to Kconfig header in 'C:/Users/he/Documents/nRF/hello_world_thing/build/empty_net_core/b0n/zephyr/include/generated/autoconf.h'
    CMake Warning at C:/ncs/v2.4.1/zephyr/CMakeLists.txt:839 (message):
    No SOURCES given to Zephyr library: lib__libc__common

    Excluding target from build.


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


    -- Configuring done
    -- Generating done
    -- Build files have been written to: C:/Users/he/Documents/nRF/hello_world_thing/build/empty_net_core/b0n
    === child image b0n - CPUNET (inherited) end ===

    CMake Warning at ../../../subsys/bootloader/cmake/debug_keys.cmake:36 (message):


    --------------------------------------------------------------
    --- WARNING: Using generated NSIB public/private key-pair. ---
    --- It should not be used for production. ---
    --- See CONFIG_SB_SIGNING_KEY_FILE ---
    --------------------------------------------------------------


    Call Stack (most recent call first):
    ../../../subsys/bootloader/cmake/provision_hex.cmake:37 (include)
    ../../../subsys/CMakeLists.txt:17 (include)


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

    Excluding target from build.


    -- Configuring done
    -- Generating done
    -- Build files have been written to: C:/Users/he/Documents/nRF/hello_world_thing/build/empty_net_core
    === child image empty_net_core - CPUNET end ===

    -- Found Python3: C:/ncs/toolchains/31f4403e35/opt/bin/python.exe (found version "3.8.2") found components: Interpreter
    Changed board to secure thingy53_nrf5340_cpuapp (NOT NS)

    === child image mcuboot - begin ===
    loading initial cache file C:/Users/he/Documents/nRF/hello_world_thing/build/mcuboot/child_image_preload.cmake
    Loading Zephyr default modules (Zephyr base (cached)).
    -- Application: C:/ncs/v2.4.1/bootloader/mcuboot/boot/zephyr
    -- CMake version: 3.20.5
    -- Cache files will be written to: C:/ncs/v2.4.1/zephyr/.cache
    -- Zephyr version: 3.3.99 (C:/ncs/v2.4.1/zephyr)
    -- Found west (found suitable version "1.0.0", minimum required is "0.7.1")
    -- Board: thingy53_nrf5340_cpuapp
    -- Found host-tools: zephyr 0.16.0 (C:/ncs/toolchains/31f4403e35/opt/zephyr-sdk)
    -- Found toolchain: zephyr 0.16.0 (C:/ncs/toolchains/31f4403e35/opt/zephyr-sdk)
    -- Found BOARD.dts: C:/ncs/v2.4.1/zephyr/boards/arm/thingy53_nrf5340/thingy53_nrf5340_cpuapp.dts
    -- Found devicetree overlay: C:/ncs/v2.4.1/nrf/modules/mcuboot/flash_sim.overlay
    -- Generated zephyr.dts: C:/Users/he/Documents/nRF/hello_world_thing/build/mcuboot/zephyr/zephyr.dts
    -- Generated devicetree_generated.h: C:/Users/he/Documents/nRF/hello_world_thing/build/mcuboot/zephyr/include/generated/devicetree_generated.h
    -- Including generated dts.cmake file: C:/Users/he/Documents/nRF/hello_world_thing/build/mcuboot/zephyr/dts.cmake
    Parsing C:/ncs/v2.4.1/bootloader/mcuboot/boot/zephyr/Kconfig
    Loaded configuration 'C:/Users/he/Documents/nRF/hello_world_thing/build/mcuboot/zephyr/.config'
    No change to configuration in 'C:/Users/he/Documents/nRF/hello_world_thing/build/mcuboot/zephyr/.config'
    No change to Kconfig header in 'C:/Users/he/Documents/nRF/hello_world_thing/build/mcuboot/zephyr/include/generated/autoconf.h'
    CMake Warning at C:/ncs/v2.4.1/zephyr/CMakeLists.txt:839 (message):
    No SOURCES given to Zephyr library: lib__libc__common

    Excluding target from build.


    -- Found partition manager static configuration: C:/ncs/v2.4.1/zephyr/boards/arm/thingy53_nrf5340/pm_static_thingy53_nrf5340_cpuapp.yml
    MCUBoot bootloader key file: C:/ncs/v2.4.1/bootloader/mcuboot/root-rsa-2048.pem
    -- Configuring done
    -- Generating done
    -- Build files have been written to: C:/Users/he/Documents/nRF/hello_world_thing/build/mcuboot
    === child image mcuboot - end ===

    CMake Warning at C:/ncs/v2.4.1/nrf/modules/mcuboot/CMakeLists.txt:310 (message):


    ---------------------------------------------------------
    --- WARNING: Using default MCUBoot key, it should not ---
    --- be used for production. ---
    ---------------------------------------------------------


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

    Excluding target from build.


    -- Found partition manager static configuration: C:/ncs/v2.4.1/zephyr/boards/arm/thingy53_nrf5340/pm_static_thingy53_nrf5340_cpuapp_ns.yml
    Partition 'mcuboot' is not included in the dynamic resolving since it is statically defined.
    Partition 'mcuboot_pad' is not included in the dynamic resolving since it is statically defined.
    Partition 'tfm_secure' is not included in the dynamic resolving since it is statically defined.
    Partition 'tfm_nonsecure' is not included in the dynamic resolving since it is statically defined.
    Partition 'tfm' is not included in the dynamic resolving since it is statically defined.
    Partition 'mcuboot_primary' is not included in the dynamic resolving since it is statically defined.
    Partition 'mcuboot_primary_app' is not included in the dynamic resolving since it is statically defined.
    Partition 'nonsecure_storage' is not included in the dynamic resolving since it is statically defined.
    Partition 'mcuboot_primary_1' is not included in the dynamic resolving since it is statically defined.
    Partition 'mcuboot_secondary' is not included in the dynamic resolving since it is statically defined.
    Partition 'mcuboot_secondary_1' is not included in the dynamic resolving since it is statically defined.
    Partition 'pcd_sram' is not included in the dynamic resolving since it is statically defined.
    -- Configuring done
    -- Generating done
    -- Build files have been written to: C:/Users/he/Documents/nRF/hello_world_thing/build
    ←[92m-- west build: building application
    [5/297] Generating include/generated/version.h
    -- Zephyr version: 3.3.99 (C:/ncs/v2.4.1/zephyr), build: v3.3.99-ncs1-1
    [10/297] Performing build step for 'empty_net_core_subimage'
    [0/26] Performing build step for 'b0n_subimage'
    [21/29] Linking C executable zephyr\zephyr_pre0.elf

    [24/29] Linking C executable zephyr\zephyr_pre1.elf

    [29/29] Linking C executable zephyr\zephyr.elf
    Memory region Used Size Region Size %age Used
    FLASH: 21588 B 34176 B 63.17%
    RAM: 3416 B 64 KB 5.21%
    SRAM1: 0 GB 64 KB 0.00%
    IDT_LIST: 0 GB 2 KB 0.00%
    [10/26] Linking C executable zephyr\zephyr_pre0.elf

    [13/26] Linking C executable zephyr\zephyr_pre1.elf

    [18/26] Linking C executable zephyr\zephyr.elf
    Memory region Used Size Region Size %age Used
    FLASH: 17682 B 222 KB 7.78%
    RAM: 4040 B 64 KB 6.16%
    SRAM1: 0 GB 64 KB 0.00%
    IDT_LIST: 0 GB 2 KB 0.00%
    [20/24] Creating signature of application
    [22/24] Creating validation for zephyr.hex, storing to
    [24/24] Generating zephyr/merged_CPUNET.hex
    [12/297] Generating ../../tfm/CMakeCache.txt
    -- Found Git: C:/ncs/toolchains/31f4403e35/mingw64/bin/git.exe (found version "2.37.3.windows.1")
    -- The C compiler identification is GNU 12.2.0
    -- The ASM compiler identification is GNU
    -- Found assembler: C:/ncs/toolchains/31f4403e35/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc.exe
    -- Found Python3: C:/ncs/toolchains/31f4403e35/opt/bin/python.exe (found version "3.8.2") found components: Interpreter
    -- Found Python3: C:/ncs/toolchains/31f4403e35/opt/bin/python.exe (found suitable exact version "3.8.2") found components: Interpreter
    -- Cache files will be written to: C:/ncs/v2.4.1/zephyr/.cache
    -- Configuring done
    -- Generating done
    -- Build files have been written to: C:/Users/he/Documents/nRF/hello_world_thing/build/tfm
    [22/297] Performing build step for 'mcuboot_subimage'
    [28/36] Linking C executable zephyr\zephyr_pre0.elf

    [31/36] Linking C executable zephyr\zephyr_pre1.elf

    [36/36] Linking C executable zephyr\zephyr.elf
    Memory region Used Size Region Size %age Used
    FLASH: 63908 B 64 KB 97.52%
    RAM: 364632 B 504 KB 70.65%
    IDT_LIST: 0 GB 2 KB 0.00%
    [25/297] Generating ../../zephyr/net_core_app_update.bin
    image.py: sign the payload
    [26/297] Generating ../../zephyr/net_core_app_signed.hex
    image.py: sign the payload
    [27/297] Generating ../../zephyr/net_core_app_test_update.hex
    image.py: sign the payload
    [29/297] Performing build step for 'tfm'
    [159/159] Linking C static library secure_fw\libtfm_s_veneers.a
    [34/297] Performing install step for 'tfm'
    -- Install configuration: "MinSizeRel"
    [277/297] Linking C executable zephyr\zephyr_pre0.elf

    [281/297] Linking C executable zephyr\zephyr_pre1.elf

    [287/297] Linking C executable zephyr\zephyr.elf
    Memory region Used Size Region Size %age Used
    FLASH: 44840 B 848 KB 5.16%
    RAM: 14832 B 472 KB 3.07%
    IDT_LIST: 0 GB 2 KB 0.00%
    [291/297] Generating ../../zephyr/app_signed.hex
    image.py: sign the payload
    [292/297] Generating ../../zephyr/app_update.bin
    image.py: sign the payload
    [294/297] Generating ../../zephyr/app_test_update.hex
    image.py: sign the payload
    [297/297] Generating zephyr/merged_domains.hex

    he@D MINGW64 ~/Documents/nRF/hello_world_thing (master)
    $

  • Hello,

    Ok now I have from inside the nRF connect for desktop v4.1.2/ toolchain manager (TCM) v1.2.5 removed sdk 2.4.0, v2.4.1.

    Reinstalled from inside TCM sdk 2.4.0.

    Checked the voltage on the board (VOUTB=3.0V)

    Inside VS Code Build a hello_world app with target thingy53_nrf5340_cpuapp_ns with debug enabled.

    Added a breakpoint in the main.c code.

    Started debug: It downloads and verifies apparently correct.

    Then same as before never enters the main code but loops in fih_panic_loop()

    with this call stack and DEBUG CONSOLE listed below.

    I really hope you have an idea what can be wrong.

    In theory it can be a broken board and I can get hold of another. But I am not optimistic on that.

    Br henning

    And this DEBUG CONSOLE:

    JLinkGDBServerCL: SEGGER J-Link GDB Server V7.90 Command Line Version
    JLinkGDBServerCL:
    JLinkGDBServerCL: JLinkARM.dll V7.90 (DLL compiled Aug 2 2023 15:24:12)
    JLinkGDBServerCL:
    JLinkGDBServerCL: -----GDB Server start settings-----
    JLinkGDBServerCL: GDBInit file: none
    JLinkGDBServerCL: GDB Server Listening port: 63307
    JLinkGDBServerCL: SWO raw output listening port: 2332
    JLinkGDBServerCL: Terminal I/O port: 2333
    JLinkGDBServerCL: Accept remote connection: localhost only
    JLinkGDBServerCL: Generate logfile: off
    JLinkGDBServerCL: Verify download: off
    JLinkGDBServerCL: Init regs on start: off
    JLinkGDBServerCL: Silent mode: on
    JLinkGDBServerCL: Single run mode: on
    JLinkGDBServerCL: Target connection timeout: 0 ms
    JLinkGDBServerCL: ------J-Link related settings------
    JLinkGDBServerCL: J-Link Host interface: USB
    JLinkGDBServerCL: J-Link script: none
    JLinkGDBServerCL: J-Link settings file: none
    JLinkGDBServerCL: ------Target related settings------
    JLinkGDBServerCL: Target device: nRF5340_xxAA_APP
    JLinkGDBServerCL: Target device parameters: none
    JLinkGDBServerCL: Target interface: SWD
    JLinkGDBServerCL: Target interface speed: 12000kHz
    JLinkGDBServerCL: Target endian: little
    JLinkGDBServerCL:
    =thread-group-added,id="i1"
    =cmd-param-changed,param="pagination",value="off"
    fih_panic_loop () at C:/ncs/v2.4.0/bootloader/mcuboot/boot/bootutil/src/fault_injection_hardening.c:68
    68 __asm volatile ("b fih_panic_loop");
    [New Remote target]

    Thread 2 received signal SIGTRAP, Trace/breakpoint trap.
    fih_panic_loop () at C:/ncs/v2.4.0/bootloader/mcuboot/boot/bootutil/src/fault_injection_hardening.c:68
    68 __asm volatile ("b fih_panic_loop");
    Execute debugger commands using "-exec <command>", for example "-exec info registers" will list registers in use (when GDB is the debugger)

  • Hello,

    I have still not been able to launch a succesful debug session with the Thingy53_NRF5340_cpuapp_ns as target for app hello_world. It builds but it fails to debug or run!

    You wrote that it builds for you but can you also debug the code - set a breakpoint in main and it stops execution there? This does not work here. Here it enters the panic loop.

    What _does work_ is build hello_world with target set to nrf5340dk_nrf5340_cpuapp_ns. But using the thingy53 board as actual target - = the same board as the failing case.

    This means that the hardware is working and at least some part of the procedure I take is right.

    Below are images of the VS code window when nrf5340dk_nrf5340_cpuapp_ns is the target followed by the similar window when switched to the other target Thingy53_NRF5340_cpuapp_ns. I.e. the hello_world application is set to have two targets but in this case same physical hardware.

    I notice one peculiar thing - the layout of the build_XX folder display (see below images) is different in the two different target builds - is this to expect?

    Why is is different and what causes this?

    Do you see the same difference? At least the debugging works different here.

    Any idea why the hello_world/Thingy53_NRF5340_cpuapp_ns  does not run here?

    henning

    Summary:

    a) hello_world with build target=Thingy53_NRF5340_cpuapp_ns  on Thingy53 HW --- Does build but not debug/run

    b) hello_world with build target=nrf5340dk_nrf5340_cpuapp_ns on Thingy53 HW --- Does build and run.

    VS code window when nrf5340dk_nrf5340_cpuapp_ns is the target:

    And here is the similar window when switched to the other target Thingy53_NRF5340_cpuapp_ns 

  • I really would appreciate to know at least this:

    Does the hello_world demo application built for the Thingy53_NRF5340_cpuapp_ns as target run and debug out of the box?

    I can't get it to work.

Related