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
  • Hello,

    Have you installed the SDK properly? Can you once try building from the command line using West? Please share the logs while building from the west. You can follow the steps mentioned here for building using West. Make sure your target board is thingy53_nrf5340_cpuapp_ns when building. I tested the hello_world sample inside NCSv2.4.0 for thingy53, and it's working fine on my side.

     Kind Regards,

    Abhijith

  • 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)

Reply
  • 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)

Children
No Data
Related