This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

The connected emulator does not support serial wire output (SWO)

I am using Eclipse Kelpler SD2 and GNU ARM 4.7 tool chain, plus GNU ARM Eclipse Plugin

and after download code into CM0 I got the warning

"The connected emulator does not support serial wire output (SWO)

My setup environment

  1. Eclipse IDE for C/C++ Developers Version: Kepler Service Release 2

  2. GNU ARM tool chain 4.7

  3. GNU ARM Eclipse plug-in

  4. J-link V4.90d

=============== J-Link GDB Server Log ========================

SEGGER J-Link GDB Server V4.90d GUI Version

JLinkARM.dll V4.90d (DLL compiled Aug 29 2014 14:49:16)

-----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:               off
Init regs on start:            on
Silent mode:                   off
Single run mode:               off
Target connection timeout:     5 sec.
------J-Link related settings------
J-Link Host interface:         USB
J-Link script:                 none
J-Link settings file:          none
------Target related settings------
Target device:                 nRF51822_xxAA
Target interface:              SWD
Target interface speed:        1000kHz
Target endian:                 little

Connecting to J-Link...
J-Link is connected.
Firmware: J-Link OB-SAM3U128 V1 compiled Aug 22 2014 17:25:44
Hardware: V1.00
S/N: 480209778
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 4 bytes @ address 0x00000000 (Data = 0x00000708)
Target interface speed set to 1000 kHz
Resetting target
Halting target CPU...
...Target halted (PC = 0x00000630)
R0 = FFFFFFFF, R1 = FFFFFFFF, R2 = FFFFFFFF, R3 = FFFFFFFF
R4 = FFFFFFFF, R5 = FFFFFFFF, R6 = FFFFFFFF, R7 = FFFFFFFF
R8 = FFFFFFFF, R9 = FFFFFFFF, R10= FFFFFFFF, R11= FFFFFFFF
R12= FFFFFFFF, R13= 00000708, MSP= 00000708, PSP= FFFFFFFC
R14(LR) = FFFFFFFF, R15(PC) = 00000630
XPSR C1000000, APSR C0000000, EPSR 01000000, IPSR 00000000
CFBP 00000000, CONTROL 00, FAULTMASK 00, BASEPRI 00, PRIMASK 00
Reading all registers
Select auto target interface speed (2000 kHz)
Flash breakpoints enabled
Semi-hosting enabled (VectorAddr = 0x08)
Semihosting I/O set to TELNET Client
SWO disabled succesfully.
GDB closed TCP/IP connection

====================================

If I ignore the warning and dismiss the dialog, program can run but could not stop at any breakpoint

J-Link Error.PNG

  • There is no SWO in nRF51822, see this.

    Don't know about breakpoint problem, but if you're using softdevice then see this.

  • your program most likely crashes before reaching main. Find your ResetEntry function and put a breakpoint there. It should stop there if your Eclipse setup works correctly.

  • The program does run withou crash, since I could use an iOS App to discover and connect with the BLE evaluation boards.

    It seems a bug of Eclipse or GNU ARM Plug-in. For example, if I set breakpoint at line 1239 rtc1_init();

    At assembly window, it shows the breakpoint is at 1239 rtc1_init(), which is just source code inserted into assembly window, instead of at the real true instruction address 0x1c810: bl 0x1d314 rtc1_init

    If I set breakpoint at assembly window address 0x1c810, Eclipse & GDB can stop at the address without problem

    Source Window

    image description

    Assembly Window

    image description

    My debug configuration for Source Tab image description

    My Console Output during debug image description

    I switched my GNU ARM tool chain from 4.7 2013q1 to 4.8 2014q2, and the problem got solved (hopefully )

    Per the discussion here,

    answers.launchpad.net/.../240419

    it seems when gcc uses relative path to compile and link the source codes, the build output contains the relative path, somehow, some GDB version can only resolve absolute path and will not be able to add breakpoint since it could not find the source file.

  • I saw this happened when the code was not compiled with Debug info or source is out of sync. Other than that, don't what else it could be. Try to do a clean and build.

  • Hi,

    I tried rebuild the project and make no difference.

    After searching developerZone, it seems my problem is actually the same as this one(Not be able to stop at breakpoint):

    devzone.nordicsemi.com/.../

    But I tried Hung Bui's approach and but not working for me.

Related