Cannot debug blinky targeted to nrf5340_audio_dk_nrf5340_cpuapp_ns

I am getting my feet wet with the nrf5340 Audio DK and am starting right from the beginning with a blinky example.

When I target the board "nrf5340_audio_dk_nrf5340_cpuapp" debugging from within VSCode works fine. I can single step, inspect variables etc.

When I target the board "nrf5340_audio_dk_nrf5340_cpuapp_ns" debugging doesn't work.

VS Code enters the debug perspective, the app is running (I see the LED blinking) but the Debug console just outputs:

LinkGDBServerCL: SEGGER J-Link GDB Server V7.94 Command Line Version
JLinkGDBServerCL: 
JLinkGDBServerCL: JLinkARM.dll V7.94 (DLL compiled Nov 29 2023 13:41:24)
JLinkGDBServerCL: 
JLinkGDBServerCL: -----GDB Server start settings-----
JLinkGDBServerCL: GDBInit file:                  none
JLinkGDBServerCL: GDB Server Listening port:     52579
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"
0x00000a98 in ?? ()

No breakpoints are hit and I cannot do anything. Switching back to the "cpuapp" variant, everything works again.Shouldn't be "cpuapp_ns" be the "better" variant in general?

As I am using the blinky example - is it maybe possible the code is not allowed to directly interfere with the GPIO due to the "non secure" placement?

Update: When I explicitly add "Optimization level: Optimize for debugging (-Og)" the following "Extra CMake arguments" are added:

-DCONFIG_DEBUG_OPTIMIZATIONS="C:/Users/daubsi/AppData/Local/Programs/Microsoft VS Code/y"

-DCONFIG_DEBUG_THREAD_INFO="C:/Users/daubsi/AppData/Local/Programs/Microsoft VS Code/y"

that seem awkward.

Trying to build the application then fails with the following errors:

Building blinky
west build --build-dir d:/blinky/build d:/blinky --pristine --board nrf5340_audio_dk_nrf5340_cpuapp_ns --no-sysbuild -- -DNCS_TOOLCHAIN_VERSION=NONE -DCONFIG_DEBUG_OPTIMIZATIONS=y -DCONFIG_DEBUG_THREAD_INFO=y -DCONFIG_DEBUG_OPTIMIZATIONS=C:/Users/daubsi/AppData/Local/Programs/Microsoft VS Code/y -DCONFIG_DEBUG_THREAD_INFO=C:/Users/daubsi/AppData/Local/Programs/Microsoft VS Code/y

-- west build: generating a build system
Loading Zephyr default modules (Zephyr base).
-- Application: D:/blinky
-- CMake version: 3.20.5
-- Found Python3: D:/ncs/toolchains/c57af46cb7/opt/bin/python.exe (found suitable version "3.8.2", minimum required is "3.8") found components: Interpreter 
-- Cache files will be written to: D:/ncs/v2.5.0/zephyr/.cache
-- Zephyr version: 3.4.99 (D:/ncs/v2.5.0/zephyr)
-- Found west (found suitable version "1.1.0", minimum required is "0.14.0")
-- Board: nrf5340_audio_dk_nrf5340_cpuapp_ns
-- Found host-tools: zephyr 0.16.1 (D:/ncs/toolchains/c57af46cb7/opt/zephyr-sdk)
-- Found toolchain: zephyr 0.16.1 (D:/ncs/toolchains/c57af46cb7/opt/zephyr-sdk)
-- Found Dtc: D:/ncs/toolchains/c57af46cb7/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6") 
-- Found BOARD.dts: D:/ncs/v2.5.0/zephyr/boards/arm/nrf5340_audio_dk_nrf5340/nrf5340_audio_dk_nrf5340_cpuapp_ns.dts
-- Generated zephyr.dts: D:/blinky/build/zephyr/zephyr.dts
-- Generated devicetree_generated.h: D:/blinky/build/zephyr/include/generated/devicetree_generated.h
-- Including generated dts.cmake file: D:/blinky/build/zephyr/dts.cmake

D:/blinky/build/zephyr/misc/generated/extra_kconfig_options.conf:2: warning: 'C:/Users/daubsi/AppData/Local/Programs/Microsoft VS Code/y' is not a valid value for the bool symbol DEBUG_OPTIMIZATIONS (defined at Kconfig.zephyr:374). Assignment ignored.

D:/blinky/build/zephyr/misc/generated/extra_kconfig_options.conf:3: warning: 'C:/Users/daubsi/AppData/Local/Programs/Microsoft VS Code/y' is not a valid value for the bool symbol DEBUG_THREAD_INFO (defined at subsys/debug/Kconfig:385). Assignment ignored.
Parsing D:/ncs/v2.5.0/zephyr/Kconfig
Loaded configuration 'D:/ncs/v2.5.0/zephyr/boards/arm/nrf5340_audio_dk_nrf5340/nrf5340_audio_dk_nrf5340_cpuapp_ns_defconfig'
Merged configuration 'D:/blinky/prj.conf'
Merged configuration 'D:/blinky/build/zephyr/misc/generated/extra_kconfig_options.conf'

error: Aborting due to Kconfig warnings

CMake Error at D:/ncs/v2.5.0/zephyr/cmake/modules/kconfig.cmake:348 (message):
  command failed with return code: 1
Call Stack (most recent call first):
  D:/ncs/v2.5.0/nrf/cmake/modules/kconfig.cmake:29 (include)
  D:/ncs/v2.5.0/zephyr/cmake/modules/zephyr_default.cmake:129 (include)
  D:/ncs/v2.5.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
  D:/ncs/v2.5.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
  CMakeLists.txt:4 (find_package)


-- Configuring incomplete, errors occurred!
FATAL ERROR: command exited with status 1: 'D:\ncs\toolchains\c57af46cb7\opt\bin\cmake.EXE' -DWEST_PYTHON=D:/ncs/toolchains/c57af46cb7/opt/bin/python.exe '-Bd:\blinky\build' -GNinja -DBOARD=nrf5340_audio_dk_nrf5340_cpuapp_ns -DNCS_TOOLCHAIN_VERSION=NONE -DCONFIG_DEBUG_OPTIMIZATIONS=y -DCONFIG_DEBUG_THREAD_INFO=y '-DCONFIG_DEBUG_OPTIMIZATIONS=C:/Users/daubsi/AppData/Local/Programs/Microsoft VS Code/y' '-DCONFIG_DEBUG_THREAD_INFO=C:/Users/daubsi/AppData/Local/Programs/Microsoft VS Code/y' '-Sd:\blinky'

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

I cannot rebuild anymore unless I manually remove those defines.

Then I tried to choose "Debug with Ozone" instead and once I "Download and Reset program" there I am receiving a bus fault:

What am I doing wrong?

{
  "platform": {
    "os": "win32",
    "osVersion": "Windows 10 Pro",
    "osKernel": "10.0.19045",
    "vscode": "1.85.1",
    "electron": "25.9.7",
    "node": "v18.15.0"
  },
  "system": {
    "date": "2024-01-06T09:58:20.081Z",
    "vscodeRoot": "c:\\Users\\daubsi\\AppData\\Local\\Programs\\Microsoft VS Code\\resources\\app",
    "nrfConnectForDesktopInstalled": true,
    "vscodeUptime": "01:40:13",
    "osUptime": "999:41:03",
    "cpu": "Intel(R) Core(TM) i5-3470 CPU @ 3.20GHz"
  },
  "workspace": {
    "name": "blinky",
    "workspaceFile": null,
    "folders": [
      "d:\\blinky"
    ]
  },
  "sdks": [
    {
      "version": "v2.5.0",
      "path": "d:\\ncs\\v2.5.0"
    },
    {
      "version": "v2.2.0",
      "path": "d:\\ncs\\v2.2.0"
    }
  ],
  "activeBuild": "d:\\blinky\\build",
  "apps": [
    {
      "workspace": "d:\\blinky",
      "uri": "d:\\blinky",
      "buildConfigurations": [
        {
          "id": "d:\\blinky\\build",
          "name": "build",
          "boardId": "nrf5340_audio_dk_nrf5340_cpuapp",
          "type": "Zephyr",
          "isChild": false,
          "isStale": false,
          "taskBindings": {
            "build": [],
            "pristineBuild": [],
            "flash": [],
            "eraseAndFlash": []
          }
        }
      ]
    }
  ],
  "topdir": "d:\\ncs\\v2.5.0",
  "workspaceState": "freestanding-ready",
  "toolchains": [
    {
      "version": "2.5.0",
      "path": "d:\\ncs\\toolchains\\c57af46cb7"
    },
    {
      "version": "2.2.0",
      "path": "d:\\ncs\\toolchains\\v2.2.0"
    }
  ],
  "connectedDevices": [
    {
      "serialNumber": "001050149424"
    }
  ],
  "deviceProvider": "nrfutil",
  "tools": {
    "D:\\ncs\\toolchains\\c57af46cb7\\opt\\zephyr-sdk\\arm-zephyr-eabi\\bin\\arm-zephyr-eabi-gcc.exe": "0.16.1",
    "C:\\Program Files\\SEGGER\\JLink_V794\\JLink.exe": "7.94",
    "C:\\Program Files\\Nordic Semiconductor\\nrf-command-line-tools\\bin\\nrfjprog.exe": "10.23.2",
    "C:\\Python310\\Scripts\\nrfutil.exe": null,
    "D:\\ncs\\toolchains\\c57af46cb7\\opt\\bin\\cmake.exe": "3.20.5",
    "D:\\ncs\\toolchains\\c57af46cb7\\opt\\bin\\Scripts\\west.exe": "1.1.0",
    "D:\\ncs\\toolchains\\c57af46cb7\\opt\\bin\\python.exe": "3.8.2",
    "D:\\ncs\\toolchains\\c57af46cb7\\opt\\bin\\ninja.exe": "1.9.0",
    "D:\\ncs\\toolchains\\c57af46cb7\\opt\\bin\\gperf.exe": "3.1",
    "D:\\ncs\\toolchains\\c57af46cb7\\opt\\bin\\dtc.exe": "1.4.7",
    "D:\\ncs\\toolchains\\c57af46cb7\\opt\\bin\\gn.exe": "2122",
    "D:\\ncs\\toolchains\\c57af46cb7\\mingw64\\bin\\git.exe": "2.37.3.windows.1",
    "gdbPath": "d:\\ncs\\toolchains\\c57af46cb7\\opt\\zephyr-sdk\\arm-zephyr-eabi\\bin\\arm-zephyr-eabi-gdb.exe"
  },
  "nrfutil": {
    "nrfutil-device": {
      "version": "2.0.0",
      "binPath": "c:\\Users\\daubsi\\.vscode\\extensions\\nordic-semiconductor.nrf-connect-2023.11.301-win32-x64\\platform\\nrfutil\\bin\\nrfutil-device"
    },
    "nrfutil-toolchain-manager": {
      "version": "0.14.1",
      "binPath": "c:\\Users\\daubsi\\.vscode\\extensions\\nordic-semiconductor.nrf-connect-2023.11.301-win32-x64\\platform\\nrfutil\\bin\\nrfutil-toolchain-manager"
    }
  },
  "environment": {
    "westEnv": {
      "ELECTRON_RUN_AS_NODE": "1",
      "HOME": "C:\\Users\\daubsi",
      "HOMEDRIVE": "C:",
      "HOMEPATH": "\\Users\\daubsi",
      "PATH": "D:\\ncs\\toolchains\\c57af46cb7;D:\\ncs\\toolchains\\c57af46cb7\\mingw64\\bin;D:\\ncs\\toolchains\\c57af46cb7\\bin;D:\\ncs\\toolchains\\c57af46cb7\\opt\\bin;D:\\ncs\\toolchains\\c57af46cb7\\opt\\bin\\Scripts;D:\\ncs\\toolchains\\c57af46cb7\\opt\\nanopb\\generator-bin;D:\\ncs\\toolchains\\c57af46cb7\\opt\\zephyr-sdk\\aarch64-zephyr-elf\\bin;D:\\ncs\\toolchains\\c57af46cb7\\opt\\zephyr-sdk\\x86_64-zephyr-elf\\bin;D:\\ncs\\toolchains\\c57af46cb7\\opt\\zephyr-sdk\\arm-zephyr-eabi\\bin;c:\\Users\\daubsi\\.vscode\\extensions\\nordic-semiconductor.nrf-connect-2023.11.301-win32-x64\\platform\\nrfutil\\lib\\nrfutil-toolchain-manager;C:\\Program Files (x86)\\VMware\\VMware Workstation\\bin\\;C:\\Program Files\\Common Files\\Oracle\\Java\\javapath;C:\\Program Files (x86)\\Microsoft SDKs\\Azure\\CLI2\\wbin;C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\javapath;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Program Files (x86)\\Windows Kits\\10\\bin;C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v10.1\\bin;C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v10.1\\libnvvp;C:\\Python310\\;C:\\Python310\\Scripts\\;C:\\Program Files (x86)\\Microsoft SQL Server\\140\\Tools\\Binn\\;C:\\Program Files (x86)\\Microsoft SQL Server\\140\\DTS\\Binn\\;C:\\Program Files (x86)\\Microsoft SQL Server\\140\\Tools\\Binn\\ManagementStudio\\;C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v10.1\\extras\\CUPTI\\libx64;C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v10.1\\cuda\\bin;C:\\Program Files\\PowerShell\\6\\;C:\\Program Files\\NVIDIA Corporation\\NVIDIA NvDLISR;C:\\Program Files\\dotnet\\;C:\\Program Files\\ojdkbuild\\java-12-openjdk-12.0.1-1\\missioncontrol\\;C:\\Program Files\\ojdkbuild\\java-12-openjdk-12.0.1-1\\bin;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;D:\\Go\\bin;C:\\Program Files (x86)\\STMicroelectronics\\STM32 ST-LINK Utility\\ST-LINK Utility;d:\\MATLAB\\R2021a\\bin;C:\\Program Files\\PowerShell\\7\\;C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common;d:\\Program Files\\010 Editor;C:\\ProgramData\\chocolatey\\bin;C:\\Strawberry\\c\\bin;C:\\Strawberry\\perl\\site\\bin;C:\\Strawberry\\perl\\bin;D:\\Program Files\\nodejs\\;C:\\Program Files\\PuTTY\\;C:\\Program Files (x86)\\GitExtensions\\;C:\\Program Files (x86)\\Windows Kits\\10\\Windows Performance Toolkit\\;C:\\Program Files\\Nordic Semiconductor\\nrf-command-line-tools\\bin\\;C:\\Program Files\\Git\\cmd;C:\\Users\\daubsi\\.cargo\\bin;C:\\Users\\daubsi\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Program Files (x86)\\Nmap;C:\\Program Files\\smartmontools\\bin;C:\\Program Files\\CMake\\bin;C:\\Program Files (x86)\\Atmel\\Flip 3.4.7\\bin;c:\\Program Files\\Git\\cmd;c:\\Program Files\\Git\\bin;C:\\Users\\daubsi\\AppData\\Local\\Programs\\Microsoft VS Code\\bin;C:\\Users\\daubsi\\.dotnet\\tools;C:\\Users\\daubsi\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\daubsi\\go\\bin;d:\\radare2\\bin;D:\\MinGW\\bin;c:\\python38\\Scripts;D:\\Program Files\\JetBrains\\PyCharm Community Edition 2021.2.3\\bin;;C:\\Users\\daubsi\\AppData\\Roaming\\npm;D:\\Program Files\\nodejs;C:\\Users\\daubsi\\.dotnet\\tools",
      "ZEPHYR_BASE": "d:\\ncs\\v2.5.0\\zephyr",
      "ZEPHYR_TOOLCHAIN_VARIANT": "zephyr",
      "ZEPHYR_SDK_INSTALL_DIR": "D:\\ncs\\toolchains\\c57af46cb7\\opt\\zephyr-sdk",
      "PYTHONPATH": "D:\\ncs\\toolchains\\c57af46cb7\\opt\\bin;D:\\ncs\\toolchains\\c57af46cb7\\opt\\bin\\Lib;D:\\ncs\\toolchains\\c57af46cb7\\opt\\bin\\Lib\\site-packages"
    },
    "inherited": {
      "ELECTRON_RUN_AS_NODE": "1",
      "HOME": "C:\\Users\\daubsi",
      "HOMEDRIVE": "C:",
      "HOMEPATH": "\\Users\\daubsi",
      "Path": "C:\\Program Files (x86)\\VMware\\VMware Workstation\\bin\\;C:\\Program Files\\Common Files\\Oracle\\Java\\javapath;C:\\Program Files (x86)\\Microsoft SDKs\\Azure\\CLI2\\wbin;C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\javapath;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Program Files (x86)\\Windows Kits\\10\\bin;C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v10.1\\bin;C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v10.1\\libnvvp;C:\\Python310\\;C:\\Python310\\Scripts\\;C:\\Program Files (x86)\\Microsoft SQL Server\\140\\Tools\\Binn\\;C:\\Program Files (x86)\\Microsoft SQL Server\\140\\DTS\\Binn\\;C:\\Program Files (x86)\\Microsoft SQL Server\\140\\Tools\\Binn\\ManagementStudio\\;C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v10.1\\extras\\CUPTI\\libx64;C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v10.1\\cuda\\bin;C:\\Program Files\\PowerShell\\6\\;C:\\Program Files\\NVIDIA Corporation\\NVIDIA NvDLISR;C:\\Program Files\\dotnet\\;C:\\Program Files\\ojdkbuild\\java-12-openjdk-12.0.1-1\\missioncontrol\\;C:\\Program Files\\ojdkbuild\\java-12-openjdk-12.0.1-1\\bin;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;D:\\Go\\bin;C:\\Program Files (x86)\\STMicroelectronics\\STM32 ST-LINK Utility\\ST-LINK Utility;d:\\MATLAB\\R2021a\\bin;C:\\Program Files\\PowerShell\\7\\;C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common;d:\\Program Files\\010 Editor;C:\\ProgramData\\chocolatey\\bin;C:\\Strawberry\\c\\bin;C:\\Strawberry\\perl\\site\\bin;C:\\Strawberry\\perl\\bin;D:\\Program Files\\nodejs\\;C:\\Program Files\\PuTTY\\;C:\\Program Files (x86)\\GitExtensions\\;C:\\Program Files (x86)\\Windows Kits\\10\\Windows Performance Toolkit\\;C:\\Program Files\\Nordic Semiconductor\\nrf-command-line-tools\\bin\\;C:\\Program Files\\Git\\cmd;C:\\Users\\daubsi\\.cargo\\bin;C:\\Users\\daubsi\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Program Files (x86)\\Nmap;C:\\Program Files\\smartmontools\\bin;C:\\Program Files\\CMake\\bin;C:\\Program Files (x86)\\Atmel\\Flip 3.4.7\\bin;c:\\Program Files\\Git\\cmd;c:\\Program Files\\Git\\bin;C:\\Users\\daubsi\\AppData\\Local\\Programs\\Microsoft VS Code\\bin;C:\\Users\\daubsi\\.dotnet\\tools;C:\\Users\\daubsi\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\daubsi\\go\\bin;d:\\radare2\\bin;D:\\MinGW\\bin;c:\\python38\\Scripts;D:\\Program Files\\JetBrains\\PyCharm Community Edition 2021.2.3\\bin;;C:\\Users\\daubsi\\AppData\\Roaming\\npm;D:\\Program Files\\nodejs;C:\\Users\\daubsi\\.dotnet\\tools",
      "PATH": "C:\\Program Files (x86)\\VMware\\VMware Workstation\\bin\\;C:\\Program Files\\Common Files\\Oracle\\Java\\javapath;C:\\Program Files (x86)\\Microsoft SDKs\\Azure\\CLI2\\wbin;C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\javapath;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Program Files (x86)\\Windows Kits\\10\\bin;C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v10.1\\bin;C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v10.1\\libnvvp;C:\\Python310\\;C:\\Python310\\Scripts\\;C:\\Program Files (x86)\\Microsoft SQL Server\\140\\Tools\\Binn\\;C:\\Program Files (x86)\\Microsoft SQL Server\\140\\DTS\\Binn\\;C:\\Program Files (x86)\\Microsoft SQL Server\\140\\Tools\\Binn\\ManagementStudio\\;C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v10.1\\extras\\CUPTI\\libx64;C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v10.1\\cuda\\bin;C:\\Program Files\\PowerShell\\6\\;C:\\Program Files\\NVIDIA Corporation\\NVIDIA NvDLISR;C:\\Program Files\\dotnet\\;C:\\Program Files\\ojdkbuild\\java-12-openjdk-12.0.1-1\\missioncontrol\\;C:\\Program Files\\ojdkbuild\\java-12-openjdk-12.0.1-1\\bin;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;D:\\Go\\bin;C:\\Program Files (x86)\\STMicroelectronics\\STM32 ST-LINK Utility\\ST-LINK Utility;d:\\MATLAB\\R2021a\\bin;C:\\Program Files\\PowerShell\\7\\;C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common;d:\\Program Files\\010 Editor;C:\\ProgramData\\chocolatey\\bin;C:\\Strawberry\\c\\bin;C:\\Strawberry\\perl\\site\\bin;C:\\Strawberry\\perl\\bin;D:\\Program Files\\nodejs\\;C:\\Program Files\\PuTTY\\;C:\\Program Files (x86)\\GitExtensions\\;C:\\Program Files (x86)\\Windows Kits\\10\\Windows Performance Toolkit\\;C:\\Program Files\\Nordic Semiconductor\\nrf-command-line-tools\\bin\\;C:\\Program Files\\Git\\cmd;C:\\Users\\daubsi\\.cargo\\bin;C:\\Users\\daubsi\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Program Files (x86)\\Nmap;C:\\Program Files\\smartmontools\\bin;C:\\Program Files\\CMake\\bin;C:\\Program Files (x86)\\Atmel\\Flip 3.4.7\\bin;c:\\Program Files\\Git\\cmd;c:\\Program Files\\Git\\bin;C:\\Users\\daubsi\\AppData\\Local\\Programs\\Microsoft VS Code\\bin;C:\\Users\\daubsi\\.dotnet\\tools;C:\\Users\\daubsi\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\daubsi\\go\\bin;d:\\radare2\\bin;D:\\MinGW\\bin;c:\\python38\\Scripts;D:\\Program Files\\JetBrains\\PyCharm Community Edition 2021.2.3\\bin;;C:\\Users\\daubsi\\AppData\\Roaming\\npm;D:\\Program Files\\nodejs;C:\\Users\\daubsi\\.dotnet\\tools",
      "PYTHONPATH": "D:\\Tensorflow\\models\\research\\object_detection;D:\\Tensorflow\\models\\research;D:\\Tensorflow\\models\\research\\slim;D:\\PYTHONPATH\\flare-ida;"
    },
    "toolchainPath": "d:\\ncs\\toolchains\\c57af46cb7",
    "toolchainBinPath": "d:\\ncs\\toolchains\\c57af46cb7\\opt\\zephyr-sdk\\arm-zephyr-eabi\\bin",
    "toolchainVersion": "2.5.0"
  },
  "terminal": {
    "defaultProfile": null
  },
  "config": {
    "nordic-semiconductor.nrf-connect": {
      "topdir": "",
      "toolchain": {
        "path": ""
      },
      "ozonePath": "",
      "applications": [],
      "applicationOptions": {},
      "kconfig": {
        "interface": "kconfig",
        "executeInDefaultShell": true
      },
      "west": {
        "env": {
          "$base": "terminal"
        }
      },
      "boardRoots": [],
      "taskBindings": {},
      "debugging": {
        "flash": true,
        "bindings": {},
        "justMyCode": true
      },
      "activeAppFollowActiveEditor": true,
      "deviceProvider": "",
      "flash": {
        "softreset": false,
        "erase": false,
        "recover": false
      },
      "enableTelemetry": false,
      "thirdpartyIntegration": {},
      "toolchainManager": {
        "indexURL": null,
        "installDirectory": null
      },
      "nrfutil": {
        "home": null
      },
      "defaultOpenAction": "ask",
      "welcome": {
        "showOnStartup": false
      }
    },
    "nordic-semiconductor.nrf-terminal": {
      "terminalMode": "character"
    }
  },
  "extensions": {
    "internal": {
      "nordic-semiconductor.nrf-connect": {
        "version": "2023.11.301",
        "path": "c:\\Users\\daubsi\\.vscode\\extensions\\nordic-semiconductor.nrf-connect-2023.11.301-win32-x64",
        "isActive": true
      },
      "nordic-semiconductor.nrf-terminal": {
        "version": "2023.10.17",
        "path": "c:\\Users\\daubsi\\.vscode\\extensions\\nordic-semiconductor.nrf-terminal-2023.10.17",
        "isActive": true
      },
      "nordic-semiconductor.nrf-devicetree": {
        "version": "2023.11.120",
        "path": "c:\\Users\\daubsi\\.vscode\\extensions\\nordic-semiconductor.nrf-devicetree-2023.11.120",
        "isActive": true
      },
      "nordic-semiconductor.nrf-kconfig": {
        "version": "2023.11.64",
        "path": "c:\\Users\\daubsi\\.vscode\\extensions\\nordic-semiconductor.nrf-kconfig-2023.11.64",
        "isActive": true
      }
    },
    "external": {
      "marus25.cortex-debug": null,
      "ms-vscode.cpptools": "1.18.5",
      "ms-vscode.js-debug": "1.85.0",
      "ms-vscode.js-debug-companion": "1.1.2",
      "ms-vscode.vscode-js-profile-table": "1.0.8",
      "13xforever.language-x86-64-assembly": "3.1.4",
      "AykutSarac.jsoncrack-vscode": "2.0.2",
      "bat67.markdown-extension-pack": "0.7.0",
      "bierner.emojisense": "0.10.0",
      "bierner.markdown-checkbox": "0.4.0",
      "bierner.markdown-emoji": "0.3.0",
      "bierner.markdown-preview-github-styles": "2.0.3",
      "cschlosser.doxdocgen": "1.4.0",
      "csholmq.excel-to-markdown-table": "1.3.0",
      "darkriszty.markdown-table-prettify": "3.6.0",
      "DavidAnson.vscode-markdownlint": "0.53.0",
      "goessner.mdmath": "2.7.4",
      "golang.go": "0.40.1",
      "ionutvmi.path-autocomplete": "1.25.0",
      "jeff-hykin.better-cpp-syntax": "1.17.2",
      "jmrog.vscode-nuget-package-manager": "1.1.6",
      "kaih2o.python-resource-monitor": "0.2.2",
      "Layle.idacode": "0.3.0",
      "lextudio.restructuredtext": "189.3.0",
      "mcu-debug.debug-tracker-vscode": "0.0.15",
      "mcu-debug.peripheral-viewer": "1.4.6",
      "mdickin.markdown-shortcuts": "0.12.0",
      "ms-dotnettools.csharp": "2.14.8",
      "ms-dotnettools.vscode-dotnet-runtime": "2.0.0",
      "ms-python.python": "2023.22.1",
      "ms-python.vscode-pylance": "2023.12.1",
      "ms-toolsai.jupyter-keymap": "1.1.2",
      "ms-toolsai.jupyter-renderers": "1.0.17",
      "ms-toolsai.vscode-jupyter-cell-tags": "0.1.8",
      "ms-toolsai.vscode-jupyter-slideshow": "0.1.5",
      "ms-vscode-remote.remote-containers": "0.327.0",
      "ms-vscode-remote.remote-ssh": "0.107.1",
      "ms-vscode-remote.remote-ssh-edit": "0.86.0",
      "ms-vscode-remote.remote-wsl": "0.81.8",
      "ms-vscode-remote.vscode-remote-extensionpack": "0.25.0",
      "ms-vscode.cpptools-extension-pack": "1.3.0",
      "ms-vscode.cpptools-themes": "2.0.0",
      "ms-vscode.remote-explorer": "0.4.1",
      "ms-vscode.remote-server": "1.5.0",
      "ms-vscode.vscode-serial-monitor": "0.11.0",
      "msazurermtools.azurerm-vscode-tools": "0.15.11",
      "shd101wyy.markdown-preview-enhanced": "0.8.11",
      "telesoho.vscode-markdown-paste-image": "1.0.2",
      "trond-snekvik.gnu-mapfiles": "1.1.0",
      "trond-snekvik.simple-rst": "1.5.4",
      "wayou.vscode-todo-highlight": "1.0.5",
      "yzane.markdown-pdf": "1.5.0",
      "yzhang.markdown-all-in-one": "3.5.1"
    }
  }
}

Parents Reply
  • Hi,

    no I havent't added those. They appeared once I chose the option in the build config to create extra debug info. I agree these don't look right. 

    When I explicitly add "Optimization level: Optimize for debugging (-Og)" the following "Extra CMake arguments" are added:

    -DCONFIG_DEBUG_OPTIMIZATIONS="C:/Users/daubsi/AppData/Local/Programs/Microsoft VS Code/y"

    -DCONFIG_DEBUG_THREAD_INFO="C:/Users/daubsi/AppData/Local/Programs/Microsoft VS Code/y"

    that seem awkward.

Children
  • Hmm yeah that's not supposed to be like that.

    No breakpoints are hit and I cannot do anything. Switching back to the "cpuapp" variant, everything works again.Shouldn't be "cpuapp_ns" be the "better" variant in general?

    There should be no problem running the Blinky sample using non-secure. You are right in that taking advantage of TFM and separating the application into a non secure and secure part is good, given that you do this separation well (and take advantage of the relevant APIs etc., which you typically want to do in a real product). Though simply using an ns version of the board isn't preferable by itself per se, especially for testing purposes. Though TFM is a tricky topic. 

    The secure vs non-secure partition wouldn't have control over certain pins by default. Though that is interestingly the case for the nRF5340, that the network core have control over certain pins, and you would need to make some changes in the dts in order to change that.

    Though back to the problem. Do those paths to /Users/daubsi/AppData/Local/Programs/Microsoft VS Code/ still pop-up in your build log when you build it for the default board? And that does still fail right?

    If you just build the regular Blinky sample, and add the "Extra cmake argument" -DCONF_FILE=prj.conf, does the path to /Users/daubsi/AppData/Local/Programs/Microsoft VS Code/ still pop-up in your build log? Does it build?

    Regards,

    Elfving

Related