MCUXpresso not killing redlinkserv.exe after terminating debug session on LPC4078

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

MCUXpresso not killing redlinkserv.exe after terminating debug session on LPC4078

3,423 次查看
leo_r
Contributor II

I've recently upgraded from LPCXpresso to MCUXpresso. LPCXpresso is still installed on the machine that I'm havnig problems with.

I'm trying to run/debug a project targeting a custom LPC4078 board. I can debug the project fine, but when I right click on the debug session and choose either "Terminate" or "Terminate and Relaunch", MCUXpresso doesn't kill redlinkserv.exe and so when I next go to debug the software (or it launches a new debug session automatically when I choose "Terminate and Relaunch", I get the error:

No debug targets available

All SWD targets are currently connected to other debug sessions.

However, by this point the debug session listed in the debug window is shown as terminated.

The solution is to kill redlinkserv.exe in the task manager. Obviously if you're debugging things frequently this is quite tedious.

I don't have this problem with an old version of LPCXpresso running on the same machine. I can repeatedly terminate and relaunch debug sessions without issue. LPCxpresso did have this issue rarely, but rarely enough that it didn't significantly impact debugging.

Is this a bug or a configuration issue on my machine? Does anyone else have this problem debugging LPC targets using MCUXpresso 10.1.0?

I'm running Windows 10

5 回复数

2,748 次查看
fjrg76
Contributor IV

Quick and dirty workaround:

In order not to abandon the IDE I found a way to close the redlinkserver from inside it: 

1.- If the debug session is running look and click the icon "Terminate all debug sessions" (it's a two red squares at the right side of "pause" icon in the tool bar). Don't click on the "Terminate" icon.

2.- In the same tool bar look and click the icon "Clean up debug" (it's a red square with a cross in front of it, located at the right of something that remains a red boot). If the debug session wasn't running, then click twice this icon.

This secuence works for me in Linux Mint.

0 项奖励
回复

2,748 次查看
fjrg76
Contributor IV

Any useful answer after two years? I do have the same problem, but in a Linux box, running MCUXpresso IDE v11.0.0, Build 2516, debugging a LPCXpresso LPC11U68 board.

Instead of killing the server by hand, I need to launch the debug session twice, and then it works. It's kind of annoying.

0 项奖励
回复

2,748 次查看
lpcxpresso_supp
NXP Employee
NXP Employee

Although there are some slight differences between redlink in LPCXpresso IDE and MCUXpresso IDE, I would not expect you to see different behaviour of the type you describe. Basically in both toolchains RedlinkServer should normally terminate once all debug sessions connecting through it terminate.

Please can you:

1) Ensure that all debug sessions have been terminated within the IDE.

2) Make sure that there are no debug related services still running, so check in Task Manager (or similar) and kill anything of the form:

  • redlinkserv
  • arm-none-eabi_gdb*
  • crt_emu_*

3) Check in the "IDE Preferences -> MCUXpresso IDE -> LinkServer Options" and make sure that these two options are ticked:

  • Shutdown redlink server
  • Kill redlink server on exit

Now start a debug session. Does it connect?

Assuming it does, now click on Terminate.

Wait a few seconds then check in Task Manager - have all debug related services now terminated?

If not, please provide to us the Contents of both the Debug log (Debug Messages) and the Redlink Server log from the Console view (as per section 16.8, "The Console View", of the MCUXpresso IDE v10.1 User Guide).

Can you also confirm what debug probe you are using?

PS : One thing to watch would be to make sure you don't try and have the version from LPCXpresso and MCUXpresso running at the same time. ie make sure that you are allowing MCUXpresso IDE to run the version it ships with, not having the old LPCXpresso IDE one left running.

Regards,

MCUXpresso IDE Support

0 项奖励
回复

2,748 次查看
leo_r
Contributor II

If I debug by terminating 

When I terminate via right click -> terminate on the session, the Console shows the following:

Debug message log:

MCUXpresso RedlinkMulti Driver v10.1 (Nov 9 2017 16:45:39 - crt_emu_cm_redlink build 360)
Reconnected to existing redlink server (PID 4294967295)
Connecting to probe 1 core 0 (server PID unknown) gave 'OK'
Probe Firmware: LPC-LINK2 CMSIS-DAP V5.183 (NXP Semiconductors)
Serial Number: JQD5JYIU
VID:PID: 1FC9:0090
USB Path: \\?\hid#vid_1fc9&pid_0090&mi_00#7&8b75cb&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
debug interface type = Cortex-M3/4 (DAP DP ID 2BA01477) over SWD
processor type = Cortex-M4 (CPU ID 410FC240)
number of h/w breakpoints = 6
number of flash patches = 2
number of h/w watchpoints = 4
Probe(0): Connected&Reset. DpID: 2BA01477. CpuID: 410FC240. Info: <None>
Debug protocol: SWD. RTCK: Disabled. Vector catch: Disabled.
Content of CoreSight Debug ROM(s):
RBASE E00FF000: CID B105100D PID 04000BB4C4 ROM dev (type 0x1)
ROM 1 E000E000: CID B105E00D PID 04000BB00C ChipIP dev SCS (type 0x0)
ROM 1 E0001000: CID B105E00D PID 04003BB002 ChipIP dev DWT (type 0x0)
ROM 1 E0002000: CID B105E00D PID 04002BB003 ChipIP dev FPB (type 0x0)
ROM 1 E0000000: CID B105E00D PID 04003BB001 ChipIP dev ITM (type 0x0)
ROM 1 E0040000: CID B105900D PID 04000BB9A1 CoreSight dev TPIU type 0x11 Trace Sink - TPIU
ROM 1 E0041000: CID B105900D PID 04000BB925 CoreSight dev ETM type 0x13 Trace Source - core
Inspected v.2 On-chip Flash Memory LPC177x_8x_407x_8x_512.cfx
Image 'LPC177x_8x_407x_8x (512K) Nov 14 2017 14:59:37'
NXP: LPC4078
Connected: was_reset=true. was_stopped=false
MCUXpresso Free License - Downloads unlimited
Awaiting telnet connection to port 3330 ...
GDB nonstop mode enabled
Opening flash driver LPC177x_8x_407x_8x_512.cfx
Sending VECTRESET to run flash driver
Writing 102192 bytes to address 0x00006000 in Flash
Erased/Wrote page 6-17 with 102192 bytes in 930msec
Closing flash driver LPC177x_8x_407x_8x_512.cfx
Flash Write Done
Opening flash driver LPC177x_8x_407x_8x_512.cfx (already resident)
Sending VECTRESET to run flash driver
Writing 4 bytes to address 0x0007FFFC in Flash
Erased/Wrote page 29-29 with 4 bytes in 583msec
Closing flash driver LPC177x_8x_407x_8x_512.cfx
Flash Write Done
Flash Program Summary: 102196 bytes in 1.51 seconds (65.92 KB/sec)
Starting execution using core reset and halt target
Stopped: Breakpoint #1

Redlink Server Log:

[Closed]
[Started server]
[Connected on port 3025]
redlink>ProbeList
Index = 1
Manufacturer = NXP Semiconductors
Description = LPC-LINK2 CMSIS-DAP V5.183
Serial Number = JQD5JYIU
VID:PID = 1FC9:0090
Path = \\?\hid#vid_1fc9&pid_0090&mi_00#7&8b75cb&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
redlink>ProbeStatus
Index = 1
Manufacturer = NXP Semiconductors
Description = LPC-LINK2 CMSIS-DAP V5.183
Serial Number = JQD5JYIU
VID:PID = 1FC9:0090
Path = \\?\hid#vid_1fc9&pid_0090&mi_00#7&8b75cb&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
IsOpen = FALSE
WireInitialized = FALSE
WireProtocol = JTAG
CoresConfigured = FALSE
PacketSize = 1024
Reference Count = 0
HasSWV = FALSE
HasETM = FALSE
HasJTAG = TRUE
HasSWD = TRUE
Probe Type = CMSIS-DAP
Probe Reference Count = 0
redlink>ProbeIsOpen 1
FALSE
redlink>ProbeOpenByIndex 1
Probe Handle 1 Open
redlink>WireIspReset 1
redlink>WireIsConnected 1
FALSE
redlink>WireSwdConnect 1
DpID = 2BA01477
redlink>CoresConfigured 1
FALSE
redlink>CoreConfig 1
Number of CORES/TAPs = 1, Fully recognized: True
[Closed]
[Started server]
[Connected on port 3025]
redlink>ProbeStatus
redlink>quit
[Closed]
[Started server]
[Connected on port 3025]
redlink>ProbeList
Index = 1
Manufacturer = NXP Semiconductors
Description = LPC-LINK2 CMSIS-DAP V5.183
Serial Number = JQD5JYIU
VID:PID = 1FC9:0090
Path = \\?\hid#vid_1fc9&pid_0090&mi_00#7&8b75cb&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
redlink>ProbeStatus
Index = 1
Manufacturer = NXP Semiconductors
Description = LPC-LINK2 CMSIS-DAP V5.183
Serial Number = JQD5JYIU
VID:PID = 1FC9:0090
Path = \\?\hid#vid_1fc9&pid_0090&mi_00#7&8b75cb&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
IsOpen = FALSE
WireInitialized = FALSE
WireProtocol = JTAG
CoresConfigured = FALSE
PacketSize = 1024
Reference Count = 0
HasSWV = FALSE
HasETM = FALSE
HasJTAG = TRUE
HasSWD = TRUE
Probe Type = CMSIS-DAP
Probe Reference Count = 0
redlink>ProbeIsOpen 1
FALSE
redlink>ProbeOpenByIndex 1
Probe Handle 1 Open
redlink>WireIspReset 1
redlink>WireIsConnected 1
FALSE
redlink>WireSwdConnect 1
DpID = 2BA01477
redlink>CoresConfigured 1
FALSE
redlink>CoreConfig 1
Number of CORES/TAPs = 1, Fully recognized: True
redlink>ProbeStatus
Index = 1
Manufacturer = NXP Semiconductors
Description = LPC-LINK2 CMSIS-DAP V5.183
Serial Number = JQD5JYIU
VID:PID = 1FC9:0090
Path = \\?\hid#vid_1fc9&pid_0090&mi_00#7&8b75cb&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
IsOpen = TRUE
WireInitialized = TRUE
WireProtocol = SWD
CoresConfigured = TRUE
PacketSize = 1024
Reference Count = 1
HasSWV = FALSE
HasETM = FALSE
HasJTAG = TRUE
HasSWD = TRUE
Probe Type = CMSIS-DAP
TAP = 0
Core = 0
CoreReferenceCount = 1
HighestPriority = 0
APID = 00000000
APIndex = 00
DPID = 2ba01477
CorePartNo = Unknown
AddrInc = 0
Probe Reference Count = 1
redlink>ProbeStatus
Index = 1
Manufacturer = NXP Semiconductors
Description = LPC-LINK2 CMSIS-DAP V5.183
Serial Number = JQD5JYIU
VID:PID = 1FC9:0090
Path = \\?\hid#vid_1fc9&pid_0090&mi_00#7&8b75cb&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
IsOpen = TRUE
WireInitialized = TRUE
WireProtocol = SWD
CoresConfigured = TRUE
PacketSize = 1024
Reference Count = 1
HasSWV = FALSE
HasETM = FALSE
HasJTAG = TRUE
HasSWD = TRUE
Probe Type = CMSIS-DAP
TAP = 0
Core = 0
CoreReferenceCount = 1
HighestPriority = 0
APID = 00000000
APIndex = 00
DPID = 2ba01477
CorePartNo = Unknown
AddrInc = 0
Probe Reference Count = 1
redlink>ProbeStatus
Index = 1
Manufacturer = NXP Semiconductors
Description = LPC-LINK2 CMSIS-DAP V5.183
Serial Number = JQD5JYIU
VID:PID = 1FC9:0090
Path = \\?\hid#vid_1fc9&pid_0090&mi_00#7&8b75cb&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
IsOpen = TRUE
WireInitialized = TRUE
WireProtocol = SWD
CoresConfigured = TRUE
PacketSize = 1024
Reference Count = 1
HasSWV = FALSE
HasETM = FALSE
HasJTAG = TRUE
HasSWD = TRUE
Probe Type = CMSIS-DAP
TAP = 0
Core = 0
CoreReferenceCount = 1
HighestPriority = 0
APID = 00000000
APIndex = 00
DPID = 2ba01477
CorePartNo = Unknown
AddrInc = 0
Probe Reference Count = 1

After terminating the session through this method, redlinkserv.exe is still runnning. (Only redlinkserv is)

If I kill redlinkserv.exe through the task manager and then re-launch the debug session, and then kill it again by clicking the "Terminate All" button, I get the following:

Debug log:

MCUXpresso RedlinkMulti Driver v10.1 (Nov 9 2017 16:45:39 - crt_emu_cm_redlink build 360)
Reconnected to existing redlink server (PID 4294967295)
Connecting to probe 1 core 0 (server PID unknown) gave 'OK'
Probe Firmware: LPC-LINK2 CMSIS-DAP V5.183 (NXP Semiconductors)
Serial Number: JQD5JYIU
VID:PID: 1FC9:0090
USB Path: \\?\hid#vid_1fc9&pid_0090&mi_00#7&8b75cb&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
debug interface type = Cortex-M3/4 (DAP DP ID 2BA01477) over SWD
processor type = Cortex-M4 (CPU ID 410FC240)
number of h/w breakpoints = 6
number of flash patches = 2
number of h/w watchpoints = 4
Probe(0): Connected&Reset. DpID: 2BA01477. CpuID: 410FC240. Info: <None>
Debug protocol: SWD. RTCK: Disabled. Vector catch: Disabled.
Content of CoreSight Debug ROM(s):
RBASE E00FF000: CID B105100D PID 04000BB4C4 ROM dev (type 0x1)
ROM 1 E000E000: CID B105E00D PID 04000BB00C ChipIP dev SCS (type 0x0)
ROM 1 E0001000: CID B105E00D PID 04003BB002 ChipIP dev DWT (type 0x0)
ROM 1 E0002000: CID B105E00D PID 04002BB003 ChipIP dev FPB (type 0x0)
ROM 1 E0000000: CID B105E00D PID 04003BB001 ChipIP dev ITM (type 0x0)
ROM 1 E0040000: CID B105900D PID 04000BB9A1 CoreSight dev TPIU type 0x11 Trace Sink - TPIU
ROM 1 E0041000: CID B105900D PID 04000BB925 CoreSight dev ETM type 0x13 Trace Source - core
Inspected v.2 On-chip Flash Memory LPC177x_8x_407x_8x_512.cfx
Image 'LPC177x_8x_407x_8x (512K) Nov 14 2017 14:59:37'
NXP: LPC4078
Connected: was_reset=true. was_stopped=true
MCUXpresso Free License - Downloads unlimited
Awaiting telnet connection to port 3330 ...
GDB nonstop mode enabled
Opening flash driver LPC177x_8x_407x_8x_512.cfx
Sending VECTRESET to run flash driver
Writing 102192 bytes to address 0x00006000 in Flash
Erased/Wrote page 6-17 with 102192 bytes in 958msec
Closing flash driver LPC177x_8x_407x_8x_512.cfx
Flash Write Done
Opening flash driver LPC177x_8x_407x_8x_512.cfx (already resident)
Sending VECTRESET to run flash driver
Writing 4 bytes to address 0x0007FFFC in Flash
Erased/Wrote page 29-29 with 4 bytes in 580msec
Closing flash driver LPC177x_8x_407x_8x_512.cfx
Flash Write Done
Flash Program Summary: 102196 bytes in 1.54 seconds (64.85 KB/sec)
Starting execution using core reset and halt target
Stopped: Breakpoint #1
Stopped: Halt
GDB stub (crt_emu_cm_redlink) terminating - GDB protocol problem: Pipe has been closed by GDB.

And redlink server log:

[Closed]
[Started server]
[Connected on port 3025]
redlink>ProbeList
Index = 1
Manufacturer = NXP Semiconductors
Description = LPC-LINK2 CMSIS-DAP V5.183
Serial Number = JQD5JYIU
VID:PID = 1FC9:0090
Path = \\?\hid#vid_1fc9&pid_0090&mi_00#7&8b75cb&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
redlink>ProbeStatus
Index = 1
Manufacturer = NXP Semiconductors
Description = LPC-LINK2 CMSIS-DAP V5.183
Serial Number = JQD5JYIU
VID:PID = 1FC9:0090
Path = \\?\hid#vid_1fc9&pid_0090&mi_00#7&8b75cb&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
IsOpen = FALSE
WireInitialized = FALSE
WireProtocol = JTAG
CoresConfigured = FALSE
PacketSize = 1024
Reference Count = 0
HasSWV = FALSE
HasETM = FALSE
HasJTAG = TRUE
HasSWD = TRUE
Probe Type = CMSIS-DAP
Probe Reference Count = 0
redlink>ProbeIsOpen 1
FALSE
redlink>ProbeOpenByIndex 1
Probe Handle 1 Open
redlink>WireIspReset 1
redlink>WireIsConnected 1
FALSE
redlink>WireSwdConnect 1
DpID = 2BA01477
redlink>CoresConfigured 1
FALSE
redlink>CoreConfig 1
Number of CORES/TAPs = 1, Fully recognized: True
[Closed]
[Started server]
[Connected on port 3025]
redlink>ProbeStatus
redlink>quit
[Closed]

0 项奖励
回复

2,748 次查看
leo_r
Contributor II

The debugger is LPC-Link 2. I've tried with 2 different debuggers and a number of boards (all of the same design) with the same result.

I've followed the steps you suggested. The 2 linkserver options were selected already.

I'm having the same problem - right clicking on the debug session and choosing "Terminate" or "Terminate and Relaunch" fails to kill redlinkserv

However, I did discover that clicking the "Terminate All" button at the top of the window after starting a debug session does kill redlinkserv. It seems that the problem is specifically in terminating a specific debug session rather than terminating all of them.

0 项奖励
回复