Can't detect target device on the MCUXpresso IDE v24.9.25

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Can't detect target device on the MCUXpresso IDE v24.9.25

1,717 Views
chaehee
Contributor I

Environment: 

  • Windows 11,
  • MCUXpresso IDE v24.9.25, 
  • MIMXRT1060-EVKB

I created project from SDK examples. I built project successfully. I tried to debug using debug port on board (CMSIS-DAP), but IDE can't detect target device.  How can I solve this problem?

 

I tested same MCUXpresso IDE version on Windows 10 and everything worked -- it detected target device, and I can debug project.

 

 

 

0 Kudos
Reply
22 Replies

951 Views
chaehee
Contributor I

All of sudden, same issue happens again after rebooting my PC.

I tried all previous comments, but it is not fixing issue.

So, I uninstall all MCUXpresso IDE, I remove firewall setting too. I reboot my PC.

After rebooting my PC, I install MCUXpresso IDE. I got below error in the middle of installation.

 

chaehee_0-1731514479349.png

 

I clicked OK and installation was finished. It's not asking reboot the PC.

After installation complete, it runs MCUXpresso IDE. It is asking firewall settings, and I allowed it.

I built project and started debugger. It is asking firewall settings again, and I allowed it too.

The IDE still not finding target device. 

I run "redlinkserv.exe --commandline" but it prints prompt and terminates. 

I checked errorlevel and it returns 9009.

C:\nxp\MCUXpressoIDE_24.9.25\ide\LinkServer\binaries>redlinkserv.exe --commandline
redlink>
C:\nxp\MCUXpressoIDE_24.9.25\ide\LinkServer\binaries>
C:\nxp\MCUXpressoIDE_24.9.25\ide\LinkServer\binaries>


C:\nxp\MCUXpressoIDE_24.9.25\ide\LinkServer\binaries>echo %errorlevel%
9009

C:\nxp\MCUXpressoIDE_24.9.25\ide\LinkServer\binaries>

 

Let me know if you need more information.

 

0 Kudos
Reply

950 Views
chaehee
Contributor I

It looks like "errorlevel == 9009" was wrong because there was typo in previous command run.

C:\nxp\MCUXpressoIDE_24.9.25\ide\LinkServer\binaries>redlinkserv.exe --commandline
redlink>
C:\nxp\MCUXpressoIDE_24.9.25\ide\LinkServer\binaries>ehco %errorlevel%
'ehco' is not recognized as an internal or external command,
operable program or batch file.

C:\nxp\MCUXpressoIDE_24.9.25\ide\LinkServer\binaries>echo %errorlevel%
9009

C:\nxp\MCUXpressoIDE_24.9.25\ide\LinkServer\binaries>

As you see above, there was typo and errorlevel==9009 is error level for the typo command.

Below is correct information and errorlevel==0.

C:\nxp\MCUXpressoIDE_24.9.25\ide\LinkServer\binaries>redlinkserv.exe --commandline
redlink>
C:\nxp\MCUXpressoIDE_24.9.25\ide\LinkServer\binaries>echo %errorlevel%
0

C:\nxp\MCUXpressoIDE_24.9.25\ide\LinkServer\binaries>

 

Sorry for wrong information.

0 Kudos
Reply

898 Views
chaehee
Contributor I

I would like to fix this issue ASAP.

Can we have debugging session for this issue via screen sharing meeting?

 

0 Kudos
Reply

833 Views
radu_lazarescu
NXP Employee
NXP Employee

At the time when the exit happens, redlinkserv is not doing any active work that might trigger a crash (and there is no crash report), it just sits waiting for connections or user input.

Based on this, I suspect that redlinksev.exe is being terminated by another process (Internet security software, firewall, etc).

One way to find out would be to use a Windows facility to monitor Silent Process Exits.

The Debugging Tools for Windows includes a GUI utility called GFLAGS.EXE

https://learn.microsoft.com/en-us/windows-hardware/drivers/debugger/gflags

This may be used to monitor Silent Process Exits

To enable this functionality:

  1. Run GFLAGS.EXE (as Administrator)
  2. Go to Silent Process Exit tab
  3. Type redlinkserv.exe and hit TAB
  4. Tick (at least) the following checkboxes: Enable Silent Exit Process Monitoring, Enable Notification, Ignore Self Exits (optionally fill the other options as below)
  5. Click OK to save and exit.

gflags_silent_exits.png

(A detailed description for all the available configuration options can be found here: https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/registry-entries-for-silent-proce...)

 

The changes are applied immediately for any new processes (reboot is NOT required).

Then try executing redlinkserv.exe --commandline from a command prompt.

If another process forces termination redlinkserv.exe, the offending process name is listed in a notification popup and in the application event log. (Optionally crash dumps are saved if enabled).

This might give us a good idea of what’s happening on your system.

 

To undo the effects of silent exit monitoring, run GFLAGS.EXE again, type redlinkserv.exe then hit TAB and uncheck all the boxes previously configured.

0 Kudos
Reply

822 Views
chaehee
Contributor I

I installed gflags.exe, ran gflags.exe, and set up silent process exit as your description.

First, I run "redlinkserv.exe --commandline" but no event log generated.

C:\nxp\LinkServer_24.9.75\binaries>dir %LOCALAPPDATA%\CrashDumps
Volume in drive C is Windows
Volume Serial Number is 602D-1572

Directory of C:\Users\chwon\AppData\Local\CrashDumps

11/14/2024 10:38 AM <DIR> .
10/11/2024 09:33 AM 415,521 hp-data-retriever.exe.16996.dmp
10/10/2024 08:47 AM 414,881 hp-data-retriever.exe.21200.dmp
10/10/2024 08:24 AM 428,029 hp-data-retriever.exe.22508.dmp
10/18/2024 08:41 AM 435,125 hp-data-retriever.exe.9260.dmp
11/13/2024 03:20 PM 22,487,628 TrueImage.exe.18060.dmp
11/14/2024 10:08 AM 22,511,620 TrueImage.exe.19728.dmp
11/13/2024 03:24 PM 22,487,859 TrueImage.exe.20004.dmp
11/14/2024 10:23 AM 22,468,424 TrueImage.exe.20236.dmp
11/14/2024 10:38 AM 22,473,454 TrueImage.exe.24412.dmp
11/14/2024 10:02 AM 22,495,977 TrueImage.exe.26980.dmp
10 File(s) 136,618,518 bytes
1 Dir(s) 1,531,248,992,256 bytes free

C:\nxp\LinkServer_24.9.75\binaries>redlinkserv.exe --commandline
redlink>
C:\nxp\LinkServer_24.9.75\binaries>dir %LOCALAPPDATA%\CrashDumps
Volume in drive C is Windows
Volume Serial Number is 602D-1572

Directory of C:\Users\chwon\AppData\Local\CrashDumps

11/14/2024 10:38 AM <DIR> .
10/11/2024 09:33 AM 415,521 hp-data-retriever.exe.16996.dmp
10/10/2024 08:47 AM 414,881 hp-data-retriever.exe.21200.dmp
10/10/2024 08:24 AM 428,029 hp-data-retriever.exe.22508.dmp
10/18/2024 08:41 AM 435,125 hp-data-retriever.exe.9260.dmp
11/13/2024 03:20 PM 22,487,628 TrueImage.exe.18060.dmp
11/14/2024 10:08 AM 22,511,620 TrueImage.exe.19728.dmp
11/13/2024 03:24 PM 22,487,859 TrueImage.exe.20004.dmp
11/14/2024 10:23 AM 22,468,424 TrueImage.exe.20236.dmp
11/14/2024 10:38 AM 22,473,454 TrueImage.exe.24412.dmp
11/14/2024 10:02 AM 22,495,977 TrueImage.exe.26980.dmp
10 File(s) 136,618,518 bytes
1 Dir(s) 1,531,365,687,296 bytes free

C:\nxp\LinkServer_24.9.75\binaries>
C:\nxp\LinkServer_24.9.75\binaries>

 

Second, I set up gflags.exe without "Ignore Self Exits" and save it.

I run "redlinkserv.exe --commandline" and event log generated. It means redlinkserv.exe was not crashed.

C:\nxp\LinkServer_24.9.75\binaries>redlinkserv.exe --commandline
redlink>
C:\nxp\LinkServer_24.9.75\binaries>
C:\nxp\LinkServer_24.9.75\binaries>dir %LOCALAPPDATA%\CrashDumps
Volume in drive C is Windows
Volume Serial Number is 602D-1572

Directory of C:\Users\chwon\AppData\Local\CrashDumps

11/15/2024 10:14 AM <DIR> .
10/11/2024 09:33 AM 415,521 hp-data-retriever.exe.16996.dmp
10/10/2024 08:47 AM 414,881 hp-data-retriever.exe.21200.dmp
10/10/2024 08:24 AM 428,029 hp-data-retriever.exe.22508.dmp
10/18/2024 08:41 AM 435,125 hp-data-retriever.exe.9260.dmp
11/15/2024 10:14 AM <DIR> redlinkserv.exe-(PID-3780)-73688359
11/13/2024 03:20 PM 22,487,628 TrueImage.exe.18060.dmp
11/14/2024 10:08 AM 22,511,620 TrueImage.exe.19728.dmp
11/13/2024 03:24 PM 22,487,859 TrueImage.exe.20004.dmp
11/14/2024 10:23 AM 22,468,424 TrueImage.exe.20236.dmp
11/14/2024 10:38 AM 22,473,454 TrueImage.exe.24412.dmp
11/14/2024 10:02 AM 22,495,977 TrueImage.exe.26980.dmp
10 File(s) 136,618,518 bytes
2 Dir(s) 1,531,353,182,208 bytes free

C:\nxp\LinkServer_24.9.75\binaries>

 

I attached event log file.

Let me know if you need more information.

 

 

0 Kudos
Reply

382 Views
mayliu1
NXP Employee
NXP Employee

Hi @chaehee ,

 

Thanks chaehee for the help in chasing down this problem. Thanks radu professional support about this issue. 

The next MCUXpresso IDE version will be available in the future, Please wait.

 

BR

mayliu

0 Kudos
Reply

552 Views
radu_lazarescu
NXP Employee
NXP Employee

Thank you @chaehee for the valuable help in chasing down this elusive problem manifesting in your environment.

We have identified the problem and a fix will be available in the next MCUXpresso IDE version.

0 Kudos
Reply

1,598 Views
mayliu1
NXP Employee
NXP Employee

Hi @chaehee ,

 

Thank you for your interest in the NXP MIMXRT product, I would  like to provide service for you.

I update my MCUXPresso IDE to MCUXpresso IDE v24.9.25 ,and I can debug using debug port on board (CMSIS-DAP).

I would like suggest you to to verify from the following points: 

1:I suggest you always create a new workspace when update the MCUXPresso IDE, then import your projects, please do not continue using the older workspace.

2: I suggest you try to Clean the project, and rebuild it. 

mayliu1_0-1730110056920.png

 

mayliu1_1-1730110057552.png

 

3:  Please try to delete launch file, and debug again.

Wish it helps you.
If you still have question about it, please kindly let me know.

 

Best Regards

mayliu

0 Kudos
Reply

1,592 Views
chaehee
Contributor I

Hi Mayliu,

 

For your information, I don't have old version of MCUXpresso on my machine.  

As you suggested, I deleted my workspace directory, and I created new project by importing SDK example. So, there is no .launch file. I built project successfully. I tried to debug but I got below error first.

chaehee_0-1730122004256.png

Later I got below error. 

chaehee_1-1730122352597.png

I clicked OK button, and I got below -- it could not detect target device.

chaehee_2-1730122489981.png

I checked the device manager, and I found target device is enumerated correctly.

chaehee_3-1730122646720.png

 

Let me know if you need more information.

Best regards,

Chaehee

 

 

 

0 Kudos
Reply

1,563 Views
radu_lazarescu
NXP Employee
NXP Employee
 
As shipped, the onboard debug probe on MIMXRT1060-EVKB board runs DAPLink/CMSIS-DAP firmware in internal flash. However, in this mode there may be problems on recent versions of Windows due to mass storage device restrictions; additionally, the debug performance is limited and SWO trace features are not available. Therefore, it is recommended to run the LPC-Link2 firmware instead. Fitting a jumper to JP12 and power cycling the board (and probe) will allow the MCUXpresso IDE to automatically softload the LPC-Link2 firmware at the start of the next debug session.
To permanently replace the DAPLink firmware with LPC-Link2 firmware, use LPCSCrypt (https://www.nxp.com/LPCSCRYPT) utility, whose most recent version is automatically installed at: <MCUXpressoIDE_InstallDir>/ide/LinkServer/lpcscrypt/
If this is done, LPC-Link2 firmware can run from the probe internal flash, without needing to fit JP12.
0 Kudos
Reply

1,556 Views
chaehee
Contributor I

Hi Radu,

 

I put jumper in J12. I got below in device manger after power cycle.

chaehee_0-1730148034112.png

I run Debug on the IDE. It looks like IDE switch mode, and I got below in the device manager.

chaehee_1-1730148212608.png

But IDE still could not detect (or connect) target device. Error message is almost same as previous. It looks like same problem still exist with LPC-Link2 firmware. Any comments?

Do I need to replace the DAPLink firmware with LPC-Link2 firmware using LPCSCrypt (https://www.nxp.com/LPCSCRYPT)?

 

Thanks,

Chaehee

0 Kudos
Reply

1,538 Views
radu_lazarescu
NXP Employee
NXP Employee

First let’s exclude the possibility of having a stray/zombie redlinkserv.exe instance left running on the machine. You can use the ‘Clean Up Debug’ button in the MCUXpresso IDE toolbar.

 clean-up.png

Alternatively, use Task Manager to verify there are no other redlinkserv.exe processes (kill them if they are). Then re-plug your board and try again to debug from MCUXpresso IDE.

If the problem persists, can you please try the following to help narrow down the problem?

Please open a Command Prompt terminal and execute the commands below and report back the results. 

ver

(Displays the Windows version)

cd C:\nxp\MCUXpressoIDE_24.9.25\ide\LinkServer\binaries
boot_link2.cmd

(Softloads LPC-Link2 firmware)

listusb.exe

(Lists connected USB devices)

redlinkserv.exe --commandline

(Connects to probe server CLI. It should give you a redlink> prompt, where you can type the following commands)

redlink>probelist

(Lists probes. Does it print anything, does the execution returns to redlink> prompt?)

redlink>exit

 

0 Kudos
Reply

1,521 Views
chaehee
Contributor I

I used ‘Clean Up Debug’ button and I checked redlinkserv.exe instance is not running on the task manager. After this, IDE still not detect target device.

 

Here is what you are asking. The redlinkserv.exe command line is not working. So, I can't run probelist.

C:\nxp\MCUXpressoIDE_24.9.25\ide\LinkServer\binaries>ver

Microsoft Windows [Version 10.0.26100.2161]

C:\nxp\MCUXpressoIDE_24.9.25\ide\LinkServer\binaries>boot_link2.cmd
Booting LPC-Link2 with LPC432x_CMSIS_DAP_V5_460.bin.hdr
LPC-Link2 booted

C:\nxp\MCUXpressoIDE_24.9.25\ide\LinkServer\binaries>listusb.exe
VID_062A&PID_4101, True
VID_8086&PID_461E, True
VID_1FC9&PID_0090, True
VID_06CB&PID_00FF, True
VID_04E8&PID_6860, True
VID_8087&PID_0033, True
VID_8086&PID_51ED, True

C:\nxp\MCUXpressoIDE_24.9.25\ide\LinkServer\binaries>redlinkserv.exe --commandline
redlink>
C:\nxp\MCUXpressoIDE_24.9.25\ide\LinkServer\binaries>

 

0 Kudos
Reply

1,515 Views
radu_lazarescu
NXP Employee
NXP Employee

Thanks for providing the info.

It looks like redlinkserv.exe is crashing on your system for some reason.

Do you get a crash dump file created in %LOCALAPPDATA%\CrashDumps?

If you don’t, please enable crash dump collection (https://learn.microsoft.com/en-us/windows/win32/wer/collecting-user-mode-dumps)

(add a key HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Windows Error Reporting\LocalDumps\redlinkserv.exe)

Please send the generated dump file after a crash: redlinkserv.exe.*.dmp

0 Kudos
Reply

1,509 Views
chaehee
Contributor I

I added registry key as below, but it is not generating crash dump.

chaehee_0-1730214428052.png

 

C:\nxp\MCUXpressoIDE_24.9.25\ide\LinkServer\binaries>redlinkserv.exe --commandline
redlink>
C:\nxp\MCUXpressoIDE_24.9.25\ide\LinkServer\binaries>dir C:\Users\chwon\AppData\Local\CrashDumps
Volume in drive C is Windows
Volume Serial Number is 602D-1572

Directory of C:\Users\chwon\AppData\Local\CrashDumps

10/18/2024 09:41 AM <DIR> .
10/01/2024 04:00 PM 2,214,802 AdobeCollabSync.exe.22876.dmp
09/10/2024 09:46 PM 3,915,562 backgroundTaskHost.exe.27552.dmp
10/11/2024 10:33 AM 415,521 hp-data-retriever.exe.16996.dmp
10/10/2024 09:47 AM 414,881 hp-data-retriever.exe.21200.dmp
10/10/2024 09:24 AM 428,029 hp-data-retriever.exe.22508.dmp
10/18/2024 09:41 AM 435,125 hp-data-retriever.exe.9260.dmp
08/27/2024 10:09 PM 662,063 MaEPSBroker.exe.1924.dmp
09/11/2024 12:27 AM 9,224,709 ShellExperienceHost.exe.18784.dmp
09/09/2024 11:03 PM 52,456,377 Ui.exe.24348.dmp
08/15/2024 11:45 AM 10,848,465 vmware-vmx.exe.32984.dmp
10 File(s) 81,015,534 bytes
1 Dir(s) 1,493,356,380,160 bytes free

C:\nxp\MCUXpressoIDE_24.9.25\ide\LinkServer\binaries>

 

0 Kudos
Reply

1,496 Views
radu_lazarescu
NXP Employee
NXP Employee

Then I may have misinterpreted your previous reply.

When you say "The redlinkserv.exe command line is not working." - can you please detail exactly what you are observing?

After typing the command (mind the double hyphen): 

redlinkserv.exe --commandline

a. Does it reach the point where a newline containing redlink> prompt is displayed and redlinkserv.exe process continues to execute?

b. Are you able to type at the redlink> prompt?

c. Assuming you can type, what happens when entering probelist command? Does it print anything? Do you get back a redlink> prompt?

d. Does the redlinkserv.exe process terminates at any point (you can check Task Manager) and you get back to the Windows Command Prompt? If you do, what does echo %errorlevel% command prints?

For reference, below is a typical interaction with the redlinkserv:

cmd.gif

1,492 Views
chaehee
Contributor I

When I run "redlinkserv.exe --commandline", it just prints "redlink>" prompt and exit. So, I could not type any command.

chaehee_0-1730232148859.png

 

 

0 Kudos
Reply

1,491 Views
chaehee
Contributor I

I checked errorlevel after run redlinkserv.

chaehee_0-1730232315531.png

 

0 Kudos
Reply

1,484 Views
radu_lazarescu
NXP Employee
NXP Employee

Could it be that the process is being blocked by the firewall (or other Internet Security solution that you may have active on the system)? 

Usually the first time you run MCUXpresso IDE you get a few prompts by the firewall to allow incoming network connections for various processes used in the debug stack (including redlinkserv.exe). Accepting it should add exceptions in the firewall for the specified processes. For example this is how it looks on Windows Defender Firewall

fw.png

Is there anything logged in Event Viewer in Windows related to redlinkserv.exe process?

0 Kudos
Reply

1,304 Views
chaehee
Contributor I

I just realized that below message was not posted due to error. Anyway, I am adding message again.

 

I allowed all network connections when I run IDE first time. 

chaehee_0-1730295027331.png

I also disabled all firewalls, but result is same. 

 

I think next step is reboot my PC and check it again.

I can run "redlinkserv.exe --commandline" successfully. 

C:\nxp\MCUXpressoIDE_24.9.25\ide\LinkServer\binaries>boot_link2.cmd
Booting LPC-Link2 with LPC432x_CMSIS_DAP_V5_460.bin.hdr
LPC-Link2 booted

C:\nxp\MCUXpressoIDE_24.9.25\ide\LinkServer\binaries>redlinkserv.exe --commandline
redlink>
redlink>probelist
Index = 1
Manufacturer = NXP Semiconductors
Description = LPC-LINK2 CMSIS-DAP V5.460
Serial Number = BSATCQNQ
VID:PID = 1FC9:0090
Path = \\?\hid#vid_1fc9&pid_0090&mi_00#7&4c9c9ac&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}


redlink>exit

C:\nxp\MCUXpressoIDE_24.9.25\ide\LinkServer\binaries>

 

It looks like it is working. So, I run IDE, start debugger, and IDE detects target device. Finally, I can debug my code.

I don't know exactly what problem was there. Let me know if you need more information to investigate this issue.

Anyway, thank you for your help.

 

 

0 Kudos
Reply