Hi.
I'm trying to get Linux debugging and developement environment working for said Nordic chip. I can flash it with nordic tools and also with eclipse by makefile flash target (uses also said tools).
However I cannot get any uart traces out of the system nor I can get the debugger to attach to HW. When I press the debug I can see the user thread for a second, before both nordic board SW apparently crashes and debugger reports terminated state (-1 returns for JLinkGDBServer and gdb & 0 for SWV). Also the disassembly window just says "no source available for 0x0". I've got only breakpoint in the start of the main-function.
Just running the SW works just fine. SW in question is the BLE proximity example delivered in the SDK.
So far I've done all the setup nordic recommends for jlink. I've also updated the Jlink firmware with jlinkexe.
I've also tried getting the trace out of the situation. Occasionally I can see parts of the trace in the terminal, but most of the time nothing. Even in the cases I see short trace parts I cannot see them via Jlink SW (JLinkExe->connect->TStart says no trace clock). Uart clock is 38400 both in terminal and in SW.
Help here would be appreciated.
From debugger:
" SEGGER J-Link GDB Server V5.10u Command Line Version
JLinkARM.dll V5.10u (DLL compiled Mar 17 2016 19:06:19)
-----GDB Server start settings-----
GDBInit file: none
GDB Server Listening port: 2331
SWO raw output listening port: 2332
Terminal I/O port: 2333
Accept remote connection: localhost only
Generate logfile: off
Verify download: on
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: nRF52832_xxAA
Target interface: SWD
Target interface speed: 1000kHz
Target endian: little
Connecting to J-Link...
J-Link is connected.
Firmware: J-Link OB-SAM3U128-V2-NordicSemi compiled Mar 15 2016 18:03:17
Hardware: V1.00
S/N: 682343799
Checking target voltage...
Target voltage: 3.30 V
Listening on TCP/IP port 2331
Connecting to target...Connected to target
Waiting for GDB connection...Connected to 127.0.0.1
Reading all registers
Read 1 bytes @ address 0x00000000 (Data = 0xC0)
Read 1 bytes @ address 0x00000000 (Data = 0xC0)
Reading 64 bytes @ address 0x00000000
Reading 8 bytes @ address 0x00000000
Reading 7 bytes @ address 0x00000000
Target interface speed set to 1000 kHz
Select auto target interface speed (1000 kHz)
Flash breakpoints enabled
Semi-hosting enabled (Handle on BKPT)
Semihosting I/O set to TELNET Client
SWO disabled succesfully.
SWO enabled succesfully.
Read 1 bytes @ address 0x00000000 (Data = 0xC0)
Reading 64 bytes @ address 0x00023F00
Read 1 bytes @ address 0x00023F11 (Data = 0xB5)
Read 1 bytes @ address 0x00023F11 (Data = 0xB5)
R0 = 2000006B, R1 = 000000FC, R2 = E000E000, R3 = 000000FC
R4 = 00000000, R5 = 000F0000, R6 = 00028000, R7 = 00000000
R8 = 00000000, R9 = 00000000, R10= 1FFF8000, R11= 00000000
R12= 00000001, R13= 20007F80, MSP= 20007F80, PSP= 00000000
R14(LR) = 00003217, R15(PC) = 00004FDE
XPSR 61000000, APSR 60000000, EPSR 01000000, IPSR 00000000
CFBP 00000000, CONTROL 00, FAULTMASK 00, BASEPRI 00, PRIMASK 00
Reading all registers
Read 1 bytes @ address 0x00000000 (Data = 0xC0)
Setting breakpoint @ address 0x00023F11, Size = 4, BPHandle = 0x0001
Starting target CPU...
...Breakpoint reached @ address 0x00023F10
Reading all registers
Read 1 bytes @ address 0x00000000 (Data = 0xC0)
Removing breakpoint @ address 0x00023F11, Size = 4
GDB closed TCP/IP connection"
lsusb:
"
Bus 004 Device 002: ID 8087:8000 Intel Corp.
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 002: ID 8087:8008 Intel Corp.
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 138a:0017 Validity Sensors, Inc. Fingerprint Reader
Bus 001 Device 002: ID 058f:9540 Alcor Micro Corp. AU9540 Smartcard Reader
Bus 001 Device 010: ID 046d:c52e Logitech, Inc. MK260 Wireless Combo Receiver
Bus 001 Device 078: ID 1366:1015 SEGGER
Bus 001 Device 006: ID 5986:0268 Acer, Inc
Bus 001 Device 005: ID 8087:07dc Intel Corp.
Bus 001 Device 014: ID 1199:a001 Sierra Wireless, Inc.
Bus 001 Device 009: ID 0557:2221 ATEN International Co., Ltd Winbond Hermon
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
"
dmesg | grep tty
"[5036548.448084] cdc_acm 1-2:1.0: ttyACM1: USB ACM device"
/etc/udev/rules.d/99-jlink.rules:
"
ACTION!="add", SUBSYSTEM!="usb_device", GOTO="jlink_rules_end"ATTR{idProduct}=="1015", ATTR{idVendor}=="1366", MODE="666"
LABEL="jlink_rules_end"
"
I'm trying to get Linux debugging and developement environment working for said Nordic chip. I can flash it with nordic tools and also with eclipse by makefile flash target (uses also said tools).
However I cannot get any uart traces out of the system nor I can get the debugger to attach to HW. When I press the debug I can see the user thread for a second, before both nordic board SW apparently crashes and debugger reports terminated state (-1 returns for JLinkGDBServer and gdb & 0 for SWV). Also the disassembly window just says "no source available for 0x0". I've got only breakpoint in the start of the main-function.
Just running the SW works just fine. SW in question is the BLE proximity example delivered in the SDK.
So far I've done all the setup nordic recommends for jlink. I've also updated the Jlink firmware with jlinkexe.
I've also tried getting the trace out of the situation. Occasionally I can see parts of the trace in the terminal, but most of the time nothing. Even in the cases I see short trace parts I cannot see them via Jlink SW (JLinkExe->connect->TStart says no trace clock). Uart clock is 38400 both in terminal and in SW.
Help here would be appreciated.
From debugger:
" SEGGER J-Link GDB Server V5.10u Command Line Version
JLinkARM.dll V5.10u (DLL compiled Mar 17 2016 19:06:19)
-----GDB Server start settings-----
GDBInit file: none
GDB Server Listening port: 2331
SWO raw output listening port: 2332
Terminal I/O port: 2333
Accept remote connection: localhost only
Generate logfile: off
Verify download: on
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: nRF52832_xxAA
Target interface: SWD
Target interface speed: 1000kHz
Target endian: little
Connecting to J-Link...
J-Link is connected.
Firmware: J-Link OB-SAM3U128-V2-NordicSemi compiled Mar 15 2016 18:03:17
Hardware: V1.00
S/N: 682343799
Checking target voltage...
Target voltage: 3.30 V
Listening on TCP/IP port 2331
Connecting to target...Connected to target
Waiting for GDB connection...Connected to 127.0.0.1
Reading all registers
Read 1 bytes @ address 0x00000000 (Data = 0xC0)
Read 1 bytes @ address 0x00000000 (Data = 0xC0)
Reading 64 bytes @ address 0x00000000
Reading 8 bytes @ address 0x00000000
Reading 7 bytes @ address 0x00000000
Target interface speed set to 1000 kHz
Select auto target interface speed (1000 kHz)
Flash breakpoints enabled
Semi-hosting enabled (Handle on BKPT)
Semihosting I/O set to TELNET Client
SWO disabled succesfully.
SWO enabled succesfully.
Read 1 bytes @ address 0x00000000 (Data = 0xC0)
Reading 64 bytes @ address 0x00023F00
Read 1 bytes @ address 0x00023F11 (Data = 0xB5)
Read 1 bytes @ address 0x00023F11 (Data = 0xB5)
R0 = 2000006B, R1 = 000000FC, R2 = E000E000, R3 = 000000FC
R4 = 00000000, R5 = 000F0000, R6 = 00028000, R7 = 00000000
R8 = 00000000, R9 = 00000000, R10= 1FFF8000, R11= 00000000
R12= 00000001, R13= 20007F80, MSP= 20007F80, PSP= 00000000
R14(LR) = 00003217, R15(PC) = 00004FDE
XPSR 61000000, APSR 60000000, EPSR 01000000, IPSR 00000000
CFBP 00000000, CONTROL 00, FAULTMASK 00, BASEPRI 00, PRIMASK 00
Reading all registers
Read 1 bytes @ address 0x00000000 (Data = 0xC0)
Setting breakpoint @ address 0x00023F11, Size = 4, BPHandle = 0x0001
Starting target CPU...
...Breakpoint reached @ address 0x00023F10
Reading all registers
Read 1 bytes @ address 0x00000000 (Data = 0xC0)
Removing breakpoint @ address 0x00023F11, Size = 4
GDB closed TCP/IP connection"
lsusb:
"
Bus 004 Device 002: ID 8087:8000 Intel Corp.
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 002: ID 8087:8008 Intel Corp.
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 138a:0017 Validity Sensors, Inc. Fingerprint Reader
Bus 001 Device 002: ID 058f:9540 Alcor Micro Corp. AU9540 Smartcard Reader
Bus 001 Device 010: ID 046d:c52e Logitech, Inc. MK260 Wireless Combo Receiver
Bus 001 Device 078: ID 1366:1015 SEGGER
Bus 001 Device 006: ID 5986:0268 Acer, Inc
Bus 001 Device 005: ID 8087:07dc Intel Corp.
Bus 001 Device 014: ID 1199:a001 Sierra Wireless, Inc.
Bus 001 Device 009: ID 0557:2221 ATEN International Co., Ltd Winbond Hermon
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
"
dmesg | grep tty
"[5036548.448084] cdc_acm 1-2:1.0: ttyACM1: USB ACM device"
/etc/udev/rules.d/99-jlink.rules:
"
ACTION!="add", SUBSYSTEM!="usb_device", GOTO="jlink_rules_end"ATTR{idProduct}=="1015", ATTR{idVendor}=="1366", MODE="666"
LABEL="jlink_rules_end"
"