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,

    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 

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

Children
No Data
Related