I am having difficulties getting gdbserver running to debug a design. I get the following error message:
An internal error occurred during: "Start GDB Server Job".
RequestMonitor: Sequence "", result for executing step #0 = Status ERROR: org.eclipse.cdt.dsf code=10005 Request for monitor: 'RequestMonitor (com.pemicro.debug.gdbjtag.pne.Backend$GdbServerStep$1@2f4b6b7b): Status OK: unknown code=0 OK null' resulted in a rejected execution exception. null, done() method called more than once
Code is basic Hello World using Semhosting and compiled/linked without error. My Freedom-KL46L board is properly connected and shows up in the Debug Configurations -> Debugger tab using the OpenSDA Embedded Debug - USB Port. I am using GDB PEMicro Interface Hardware Debugging (DSF) Launcher. [Image of Debug Configurations setup available on my Dropbox at this link <Dropbox - MCUxpresso-10.3.1-OSX-10.14.4-DebugConfigurations.png - Simplify your life >.]
I am having a similar issue with MCUXpresso 10.2.0 and OS X 10.14.6 (Mojave) with a KE06Z board, getting error message when trying to debug, "Error in services launch sequence". PEMicro does not probe at all in the MCUXpresso configuration. I am not sure which bootloader version is installed because the board does not mount in bootloader mode on OS X. I'm not sure if this could be a dead OpenSDA subsystem?
I will update MCUXpresso to latest and try again, and I will also try to locate a Windows 7 machine to test the OpenSDA and update it, but to save dead ends, I am wondering if OS X 10.14.x is known to work _at all_ with the Freedom/OpenSDA boards.
I had this same KE06Z board working fine with El Capitan.
(Post updated because I had typo'd the exact OS X version.)
Hi @qu1j0t3
Can I ask does your version of OSX (which became available in 2005) work with any other contemporary hardware devices? I'm guessing you have a PowerPC Mac and want to get the most out of it but I think therein lies your problem - the peripheral drivers are written for Intel processors and I think they're going tilt when trying to run under the PowerPC processor. Actually I'm surprised that MCUXpresso 10.2 boots at all under OSX 10.4.6.
Regardless of the processor, it is my understanding that anything earlier than OSX 10.7.8 is going to be "problematic" at best with peripheral devices.
If you're running with El Capitan (OSX 10.11.x) then that reinfoces my understanding that you should be running with a Mac that has an Intel processor and that you should be running OSX 10.7.8 or later.
Sorry.
I am running OS X Mojave which is 10.14.6, but I accidentally typo'd 10.4.x.
Where did you say you were running OSX 10.14.6? In the post you put in "OS X 10.4.6 " and "OS X 10.4.x "? You might want to go back and edit the original post so that other people don't make the same assumption that I did.
Regardless, I suggest that you update to the latest version of MCUXpresso (11.4.1) and try again. You're not going to get any help with MCUXpresso 10.2.0 other than to be told to upgrade.
Sorry about the confusion. It was written late at night and in frustration. I think a draft had "Mojave". I'll update the post.
I have installed the latest MCUXpresso and will see if that changes things, but this thread seems to indicate the problem is not in MCUXpresso. Noting also that the OpenSDA subsystem does not mount as USB mass storage when in bootloader mode.
I just tried a Freedom board on one of my Macs and when it's in Bootloader mode it comes up as "MAINTENANCE" and as an Mass Storage device.
My board has the latest firmware - have you updated the board's firmware from when you first got it?
Myke, I think I did but can't remember for certain, so I am going to try and do that update on a Win7 PC.
I've just tested with latest MCUXpresso 11.4.1 and with a quick smoke test it seems to be running correctly in Debug launch configuration (after recreating that config for the new version).
Thanks very much for your responses/encouragement & sorry again about the confusion.
Hi David,
Looking at the versions of OpenSDA firmware components, it looks like you are not running the latest Bootloader v111. I know a change was made to it, which prevented unexpected writes to OpenSDA firmware from the operating system, that were occasionally crashing the firmware, hence preventing it from standard debug and MSD operation.
Please follow steps outlined in the following blog post to update the Bootloader from v109 to v111:
https://mcuoneclipse.com/2018/04/10/recovering-opensda-boards-with-windows-10/
You would need to do this update on a Windows 7 PC. Once the firmware is updated by copying BOOTUPDATEAPP_Pemicro_v111.SDA into the board while it is started in Bootloader mode, you will have to re-start the board in Bootloader mode and re-drop MSD-DEBUG-FRDM-KL46Z48M_Pemicro_v118.SDA into the board.
A zip file with the latest versions of OpenSDA firmware including BOOTUPDATEAPP can be downloaded from the following location: http://www.pemicro.com/opensda/
Please let me know if this helps. Please let me know if after doing a Bootloader update you can see the OpenSDA enumerated under Debug Configuration for PEmicro interfaces.
Can you also please confirm that you are running your MCUXpresso as an administrator. One of the ways to confirm, is going to MCUXpresso installation directory and starting up MCUXpresso from command line as sudo.
Best Regards,
Zahar
P&E
So the error you are seeing is this :
I will ping P&E to confirm details of exactly what this means. However it does rather sound like the debug probe portion of your board is failing to physically make a connection to the KL46 MCU at all. That might mean the MCU is broken, or maybe your KL46 is "locked"
Can you maybe post the contents from the pegdbserver_console (ie copy and paste the text from the console, not a screenshot). Its possible that might give us more info:
Can you also post the actual .launch file that the IDE has created?
With regards to your question about the Mac I am personally using, it is a Macbook Pro 2016 (new style with all USBC) i7 running MacOS 10.14.4. I've been able to successfully debug using MCUXpresso IDE v10.3.1 with my FRDM-KL46 with P&E firmware in the OpenSDA, both plugged in via a USB2 hub connected to a USB3 socket on my Thunderbolt3 dock, and also with the FRDM-KL46 plugged directly in a USB-C port of my Macbook via an Apple USB-C to USB-A convertor.
Regards,
MCUXpresso IDE Support
Sorry - the IDE team is not based in Austin. And quite a few of us in the IDE team actually have Macs as our primary machines, so we do a lot of our development and testing work on MacOS (mine is running OSX 10.14.4).
Anyway, I've managed to find a completely unopened FRDM-KL46 board. Plugging this into my Mac via the OpenSDA USB connector, it shows up as a P&E CDC only device, as can be seen in Apple's USB Prober application :
Note: If you don't have USB prober, you can look at:
Anyway, this basically means that the IDE will never be able to discover it as a debug probe. This issue is mentioned in the MCUXpresso IDE v10.3.x User Guide, section 4.8, "P&E Debug Connections". But it means that before you can make a debug connection you will have to update the firmware in the OpenSDA probe circuit. To do this, you will need to visit the https://www.nxp.com/opensda site I previously referenced. Then select your board to see the firmware options:
Aside: Note that in my experience doing the FRDM board OpenSDA firmware update from a Mac is problematic, so you probably want to do this on a Windows 7 box. You might also want to be careful about doing it on Windows 10 :Recovering OpenSDA Boards with Windows 10 | MCU on Eclipse
Anyway, having updated the OpenSDA probe firmware to the latest P&E version (though you might equally want to use the SEGGER or CMSIS-DAP/DAP-Link firmware), when I plug my board back into my Mac, I see the following in USB prober :
Then within the IDE, if I install the KL46 SDK and import one of the demo apps, then click on the QuickStart Panel's Debug button, probe discovery takes place and finds my probe:
and I can OK this, and the project will then build and then successfully make the debug connection down to my board.
Hopefully following the above process will get you up and running with your board on your Mac.
Regards,
MCUXpresso IDE Support
Please check out this 3:15 screen recording <Dropbox - Mac_vs_KL46Z.mp4 - Simplify your life >. [You may have to download it to view -- 103MB mp4] I will be quite busy next week but will check email and follow up. If we can figure out a convenient time, I could also set up a GoToMeeting or Skype chat if that might help.
I don't know where your explicit instructions came from, but MCUXpresso IDE is not KDS. The method I previously outlined is how to debug with MCUXpresso IDE. Please delete any launch configurations you have tried to manually create, and use the MCUXpresso IDE debug. As long as the OpenSDA circuit on your board has debug probe firmware programmed into it, the IDE will find it and connect to it. For more details, please read the supplied MCUXpresso IDE User Guide.
OpenSDA probe firmware, if needed, can be obtained from https://www.nxp.com/opensda
Regards,
MCUXpresso IDE Support.
To further confirm that I am doing it correctly, I repeated all of the steps on a Windows 7 installation and have no problems. It is only on the Mac OS X 10.14.4 where I have issues. We are trying to set up training for several clients that include a mixture of Windows and Mac machines. That is why I would like to continue to debug this situation. I am pretty certain there has been a change in OS X that will affect Mac users. Similar to Microsoft, Apple continues to tighten sandboxing requirements for applications, which may be the cause of this issue. In any event, we need to get to the root of the problem.
The instructions I refer to came from a training course that successfully uses MCUXpresso on Windows to debug the same target.
I did as you suggested, but get a dialog [see <Dropbox - Missing_probes.png - Simplify your life > for a screen snapshot] that indicates "No compatible probles available. They may be disabled, disconnected, not powered, already in use or not compatible with this target." I will remind you this is a FRDM-KL46Z development board.
The board's thumb drive's SDA_INFO.HTM indicates:
Board Name is: FRDM-KL46Z48M
MicroBoot Kernel Version is: 1.05
Bootloader Version is: 1.09
Installed Application: PEMicro FRDM-KL46Z48M Mass Storage/Debug App
Application Version is: 1.18
DUID is: B3B33938-FC5B81CB-3750180E-C45DE678
EUID is: AB31A239-73018741-18513A19-A66668D6
TUID is: 74823938-473281BE-377FF80C-CA48E678
TOA is: 86B6E505-416C5B76-FEB041DB-18EFE76C
TOA2 is: 86B6E505-2B04D67C-6F23F598-6AF3F28A
SUID is: 86B6E505-8D48971F-37239804-8003EC65
I found/killed a rogue pegdbserver process, which allowed the software to find the OpenSDA I indicated earlier. Unfortunately the Debug recreates the same debug configuration that I had deleted and fails the same way.
QUESTION: Have you done this yourself on Mac OS X version 10.14.4 (Mojave) with this specific board?
Note: I am physically located 1 mile from NXP in Austin, TX.
How did you create your launch configuration? The normal way in MCUXpresso IDE is to use the Debug button in the QuickStart Panel, which will do a probe discovery and then automatically create a launch config (if necessary) and start the debug session. Is this what you did?
Regards,
MCUXpresso IDE Support
Per explicit directions I did the following:
Error in services launch sequence
Timed out trying to launch GDB Server.
From Terminal window I observe the following process running:
/Applications/MCUXpressoIDE_10.3.1_2233/ide/plugins/com.pemicro.debug.gdbjtag.pne_4.1.2.201904292214/osx/pegdbserver_console -device=NXP_KL4x_KL46Z256M4 -startserver -singlesession -serverport=7224 -gdbmiport=6224 -interface=OPENSDA -speed=5000 -port=USB1 -streamingport=10224 -configfile=/Users/dcblack/Documents/MCUXpressoIDE_10.3.1/workspace/.metadata/.plugins/com.pemicro.debug.gdbjtag.pne/config.ini
---
Note 1: I tried the method you suggested, but it less helpful as it wants me to have some specific probes rather than use the builtin USB OpenSDA port.
Note 2: I've done this with two boards that are previously shown to work fine under KDS on Windows.
Suspicion: Recent updates to OS X have much higher sandboxing requirements and could be blocking gdbserver from starting up. Almost all apps I have installed in the last four months have requested various permissions. I don't believe MCUXpresso requested much at all (I approved requests that were issued (Internet access)).