Basic sample execution

Hi

I have a clean sample problem

1) Installed a clean install or nRF connect v1.9.0 at c:\nRF

2) Installed the VSCode as recommended

3) Pressed Create a new application from sample

4) Added a new board configuration NRF5340 DK NRF5340 CPU App ns

5) Plugged in a brand new nRF5340 dev kit from an unopened box

6) Build all
....
[265/269] Building C object zephyr/CMakeFiles/zephyr_final.dir/isr_tables.c.obj
[266/269] Building C object zephyr/CMakeFiles/zephyr_final.dir/dev_handles.c.obj
[267/269] Linking C executable zephyr\zephyr.elf
Memory region         Used Size  Region Size  %age Used
           FLASH:      111132 B       952 KB     11.40%
            SRAM:       24892 B       416 KB      5.84%
        IDT_LIST:          0 GB         2 KB      0.00%
[268/269] Generating zephyr/merged.hex
[269/269] Generating zephyr/merged_domains.hex

7) Press erase and flash - all seems ok

Flashing build to undefined
west flash -d c:\Projects\Lismore\BTFirmwares\CP100GW\build --skip-rebuild -r nrfjprog --snr 960141058 --erase

-- west flash: using runner nrfjprog
WARNING: runners: Argument --snr is deprecated, use -i/--dev-id instead.
-- runners.nrfjprog: mass erase requested
-- runners.nrfjprog: Flashing file: C:\Projects\Lismore\BTFirmwares\CP100GW\build\zephyr\merged_domains.hex
-- runners.nrfjprog: C:\Projects\Lismore\BTFirmwares\CP100GW\build\zephyr\merged_domains.hex targets both nRF53 coprocessors; splitting it into: C:\Projects\Lismore\BTFirmwares\CP100GW\build\zephyr\GENERATED_CP_NETWORK_merged_domains.hex and C:\Projects\Lismore\BTFirmwares\CP100GW\build\zephyr\GENERATED_CP_APPLICATION_merged_domains.hex
Parsing hex file.
Erasing user available code and UICR flash areas.
Applying system reset.
Checking that the area to write is not protected.
Programming device.
Parsing hex file.
Erasing user available code and UICR flash areas.
Applying system reset.
Checking that the area to write is not protected.
Programming device.
Applying pin reset.
-- runners.nrfjprog: Board with serial number 960141058 flashed successfully.

Terminal will be reused by tasks, press any key to close it.

> Executing task: nRF Connect: Build CP100GW/build (active) <

Building CP100GW
west build --build-dir c:\Projects\Lismore\BTFirmwares\CP100GW\build c:\Projects\Lismore\BTFirmwares\CP100GW

[0/17] Performing build step for 'spm_subimage'
ninja: no work to do.
[1/5] Performing build step for 'hci_rpmsg_subimage'
ninja: no work to do.

Terminal will be reused by tasks, press any key to close it.

> Executing task: nRF Connect: Flash CP100GW/build (active) <

8) Press start debugging:

DEBUG CONSOLE

Launching GDB: "c:\\nRF\\v1.9.0\\toolchain\\opt\\bin\\arm-none-eabi-gdb.exe" -q --interpreter=mi2 "c:\\Projects\\Lismore\\BTFirmwares\\CP100GW\\build\\zephyr\\merged_domains.hex"
Set "showDevDebugOutput": true in your "launch.json" to see verbose GDB transactions here. Helpful to debug issues or report problems
Reading symbols from c:\Projects\Lismore\BTFirmwares\CP100GW\build\zephyr\merged_domains.hex...
(No debugging symbols found in c:\Projects\Lismore\BTFirmwares\CP100GW\build\zephyr\merged_domains.hex)
WARNING: Cortex-Debug will deprecate use of GDB version 8. Please upgrade to version 9+
Launching gdb-server: "C:\\Program Files (x86)\\SEGGER\\JLink\\JLinkGDBServerCL.exe" -singlerun -nogui -if swd -port 50000 -swoport 50001 -telnetport 50002 -device nRF5340_xxAA_APP -select usb=960141058 -rtos "C:\\Program Files (x86)\\SEGGER\\JLink\\GDBServer\\RTOSPlugin_Zephyr.dll"
Please check TERMINAL tab (gdb-server) for output from C:\Program Files (x86)\SEGGER\JLink\JLinkGDBServerCL.exe
0x00000928 in ?? ()
Program stopped, probably due to a reset and/or halt issued by debugger
add symbol table from file "c:/Projects/Lismore/BTFirmwares/CP100GW/build/zephyr/zephyr.elf"
(y or n) [answered Y; input not from terminal]
Reading symbols from c:/Projects/Lismore/BTFirmwares/CP100GW/build/zephyr/zephyr.elf...
add symbol table from file "c:/Projects/Lismore/BTFirmwares/CP100GW/build/spm/zephyr/zephyr.elf"
(y or n) [answered Y; input not from terminal]
Reading symbols from c:/Projects/Lismore/BTFirmwares/CP100GW/build/spm/zephyr/zephyr.elf...
Resetting target
Resetting target
Run to 'main' timed out. Trying to pause program

Program
 received signal SIGTRAP, Trace/breakpoint trap.
cbvprintf (out=0x565 <char_out>, ctx=0x20002edc <z_interrupt_stacks+1972>, fp=0x9411 "%c: Faulting instruction address (r15/pc): 0x%08x\n", ap=...) at C:/nRF/v1.9.0/zephyr/lib/os/cbprintf_complete.c:1371
1371        while (*fp != 0) {

I must have missed something simple?

Run without debugging also does not produce a running app

DEBUG CONSOLE

Resetting target
Run to 'main' timed out. Trying to pause program

Program
 received signal SIGTRAP, Trace/breakpoint trap.
0x0000029c in ?? ()
TERMINAL

Waiting for gdb server to start...[2022-02-19T16:24:37.866Z] SERVER CONSOLE DEBUG: onBackendConnect: gdb-server session connected. You can switch to "DEBUG CONSOLE" to see GDB interactions.
"C:\\Program Files (x86)\\SEGGER\\JLink\\JLinkGDBServerCL.exe" -singlerun -nogui -if swd -port 50003 -swoport 50004 -telnetport 50005 -device nRF5340_xxAA_APP -select usb=960141058 -rtos "C:\\Program Files (x86)\\SEGGER\\JLink\\GDBServer\\RTOSPlugin_Zephyr.dll"
SEGGER J-Link GDB Server V7.58b Command Line Version

JLinkARM.dll V7.58b (DLL compiled Nov 16 2021 15:00:10)

Command line: -singlerun -nogui -if swd -port 50003 -swoport 50004 -telnetport 50005 -device nRF5340_xxAA_APP -select usb=960141058 -rtos C:\Program Files (x86)\SEGGER\JLink\GDBServer\RTOSPlugin_Zephyr.dll
-----GDB Server start settings-----
GDBInit file:                  none
GDB Server Listening port:     50003
SWO raw output listening port: 50004
Terminal I/O port:             50005
Accept remote connection:      localhost only
Generate logfile:              off
Verify download:               off
Init regs on start:            off
Silent mode:                   off
Single run mode:               on
Target connection timeout:     0 ms
------J-Link related settings------
J-Link Host interface:         USB
J-Link script:                 none
J-Link settings file:          none
------Target related settings------
Target device:                 nRF5340_xxAA_APP
Target interface:              SWD
Target interface speed:        4000kHz
Target endian:                 little

Connecting to J-Link...
J-Link is connected.
Firmware: J-Link OB-K22-NordicSemi compiled Jul  2 2021 10:44:28
Hardware: V1.00
S/N: 960141058
Feature(s): RDI, FlashBP, FlashDL, JFlash, GDB
Checking target voltage...
Target voltage: 3.30 V
Listening on TCP/IP port 50003
Connecting to target...
Connected to target
Waiting for GDB connection...Connected to 127.0.0.1
Reading all registers
Read 4 bytes @ address 0x00008318 (Data = 0xD1004293)
Read 2 bytes @ address 0x00008318 (Data = 0x4293)
Loading RTOS plugin: C:\Program Files (x86)\SEGGER\JLink\GDBServer\RTOSPlugin_Zephyr.dll...
RTOS plugin (API v1.1) loaded successfully
RTOS plugin: Loaded
Received symbol: _kernel (0x2000977C)
Received symbol: _kernel_openocd_offsets (0x00000000)
ERROR: Mandatory symbol _kernel_openocd_offsets not found.
Read 4 bytes @ address 0x00008318 (Data = 0xD1004293)
Received monitor command: halt
Halting target CPU...
...Target halted (PC = 0x00008318)
Received monitor command: reset
Resetting target
Downloading 16096 bytes @ address 0x00000000
Downloading 16112 bytes @ address 0x00003EE0
Downloading 16256 bytes @ address 0x00007DD0
Downloading 688 bytes @ address 0x0000BD50
Downloading 16112 bytes @ address 0x00010000
Downloading 16128 bytes @ address 0x00013EF0
Downloading 16112 bytes @ address 0x00017DF0
Downloading 16096 bytes @ address 0x0001BCE0
Downloading 1088 bytes @ address 0x0001FBC0
Downloading 16144 bytes @ address 0x00020000
Downloading 16192 bytes @ address 0x00023F10
Downloading 13260 bytes @ address 0x00027E50
Downloading 16096 bytes @ address 0x01000000
ERROR: Timeout while checking target RAM, RAMCode did not respond in time. (PC = 0xFFFFFFFF, CPSR = 0x00000008, LR = 0x01000003)!
Failed to prepare for programming.
Failed to execute RAMCode for RAM check!
Downloading 16064 bytes @ address 0x01003EE0
Downloading 16064 bytes @ address 0x01007DA0
Downloading 16064 bytes @ address 0x0100BC60
Downloading 1248 bytes @ address 0x0100FB20
Downloading 16000 bytes @ address 0x01010000
Downloading 15984 bytes @ address 0x01013E80
Downloading 16048 bytes @ address 0x01017CF0
Downloading 15968 bytes @ address 0x0101BBA0
Downloading 1536 bytes @ address 0x0101FA00
Downloading 15984 bytes @ address 0x01020000
Downloading 16064 bytes @ address 0x01023E70
Downloading 7132 bytes @ address 0x01027D30
Writing register (PC = 0x       0)
Received monitor command: reset
Resetting target
Starting target CPU...
Parents Reply Children
No Data
Related