Hello,
I am having problems getting the MCUXpresso debugger successfully connected to my microcontroller design and am hoping someone can help. I have been using the demo board OM13094 which has worked, but now when we received our prototype circuit boards of our own design, the debugger locks up before the program starts and I am in a time crunch to get something working.
I start debugging using MCUXpresso. It appears to load the program to the micro successfully, as the launching progress increases to 99% as normal. However at this point I expect the program to be stopped at the first line in main() with the green resume icon now available to be pressed to start program execution. However, instead I get the following: The resume icon is grayed out and the pause/suspend and Terminate icons are available to hit, just as if the program started on its own and was running normally. However, the program does not appear to be running. Pressing the suspend icon will not do anything, and hitting suspend brings up an error message saying “Failed to execute MI command …… The program is not being run”. At this point the only way I can get back is by using task manager to force an end to the “pegdbserver_console.exe *32” process. When I repeat the debugging attempt, I debugger will not connect at all until I power cycle my board. After that I am able to load the program to my micro again but again that is as far as I can get.
The problem appears to be in my hardware somehow, but I’m looking for some help in direction in where to look. I attached the metadata log file in case that is relevant. It appears to report the error as follows:
!ENTRY org.eclipse.cdt.dsf 4 10005 2018-05-09 09:17:38.717
!MESSAGE Request for monitor: 'RequestMonitor (org.eclipse.cdt.dsf.concurrent.RequestMonitor@ce702): Status ERROR: org.eclipse.cdt.dsf.gdb code=10004 Interrupt failed. null' resulted in an error.
!SUBENTRY 1 org.eclipse.cdt.dsf.gdb 4 10004 2018-05-09 09:17:38.717
!MESSAGE Interrupt failed.
For connections to the debugger, our board uses the recommended connections shown in the LPC546xx data sheet, section 13.3 [Connecting power, clocks, and debug functions].
Demo board (which works):
MCUXpresso IDE v10.1.1 [Build 606] [2018-01-02]
SDK_2.x_LPCXpresso54618, SDK Version 2.3.0, Manifest Version 3.2.0
Board: OM13094 CAN-FD kit, lpcxpresso 54618, silkscreen on board is: LPCXpresso546xx Rev C
Micro: LPC54618J512ET180
My current board (with the problem) uses the same as above except the micro is: LPC54606J256ET180.
I updated the MCU settings to make sure the Flash and RAM are within the limits of this micro (256K flash, 160K RAM).
Thank you for any help.
Solved! Go to Solution.
Hi Matt,
We'll correct the document. The Memory Configuration for the LPC54606J256 is:
SRAM1-SRAM2 are not present on the LPC54606J256 part.
You should note the SDK examples are typically created for an off-the-shelf board, like the LPCXpresso54608 (LPC54608J512). You can request an SDK build for the LPC54606J256 part through the MCUXpresso SDK Builder MCUXpresso SDK Builder. The imported project examples are not necessarily guaranteed to build (or operate) for the LPC54606J256 part, but will supply the correct memory configuration.
Thanks and regards,
LPCXpresso Support.
I am using that memory configuration now and all appears to be working well. Thanks for the help.
I believe I discovered the problem. It is related to the memory map of the smaller LPC54606J256 device I am using. My program was trying to access RAM that was not there, and for some reason the debugger would not even start correctly because of that. I have my program now running after I changed the "RAM SRAM_0_1_2_3 RAM location 0x20000000" from size 0x28000 to 0x18000. I thought I was okay with 0x28000 as 160KB is the RAM size of my micro, but it must be partitioned differently.
As a follow up question could you tell me where to locate the memory map partition for the LPC54606J256 device? I have been unable to find it in the LPC546xx data sheets, for which I have only found the partitions for the full size LPC54618J512 part. In "MCU settings" for my project, I would select my part under "SDK MCUs" or "Preinstalled MCUs", but my part is not available in the list. So what I am doing is keeping the LPC54618J512 part selected but editing the memory details. Here is a screen shot, showing my settings (after I reduced the FLASH size, but before I reduced the SRAM size).
Thanks,
Matt
Hi Matt,
We'll correct the document. The Memory Configuration for the LPC54606J256 is:
SRAM1-SRAM2 are not present on the LPC54606J256 part.
You should note the SDK examples are typically created for an off-the-shelf board, like the LPCXpresso54608 (LPC54608J512). You can request an SDK build for the LPC54606J256 part through the MCUXpresso SDK Builder MCUXpresso SDK Builder. The imported project examples are not necessarily guaranteed to build (or operate) for the LPC54606J256 part, but will supply the correct memory configuration.
Thanks and regards,
LPCXpresso Support.
Thanks for the quick reply. For debugging I am using the P&E Micro debug probe for both the LPCXpresso54618 board and my own board. I have used the built-in LPC-Link2 probe in the past for debugging on the demo board, but as of late I have just used the P&E probe. I have not used the onboard LPC-Link2 from my LPCXpresso54618 to debug my own board.
For my board, the debug and reset circuitry follows the recommended connections shown in the LPC546xx data sheet, section 13.3 [Connecting power, clocks, and debug functions]. It has connections for: SWDIO, SWCLK, RESETN, 3.3V, and GND. This uses the same 10-pin SWD connector as on the demo board, but for my board pins 6-8 are left N.C.
ISP connections: I have ISP0 and ISP1 with no connection. I have ISP2 connected to a switch to GND. Holding that switch when power is applied should force the USB1 HS boot loader. By doing this I was able to start the boot process and was able to view the ‘firmware.bin’ file from my circuit board on a window of my PC. Then I delete the file, followed by copying over the new firmware.bin file, which then showed in the PC window as if it had transferred successfully. However, my program does not run. I can do this same process with the demo board and it works.
ISP connections: I see in the “Design considerations for debug” linked below that it says to add pull-ups to these pins. I did not do this, and have no access to the ISP0 and ISP1 pins on the BGA180 package. However, when testing with the ISP2 pin, it appears to pull-up to 3.3V whenever I have my switch released, so I think these must have internal pull-up resistors. The demo board also appears to not use pull-up resistors for these 3 pins.
Thanks,
Matt
I presume that you are debugging your LPCXpresso54618 board using the built-in LPC-Link2 debug probe?
But what debug probe are you using to debug your own board? The reference to "pegdbserver_console.exe" makes it sound like you might be using a P&E Micro debug probe? If this is not the case, then one thing to try would be to disable the use of P&E Micro probes by the IDE - which you can do via the IDE's Preferences.
Or are you using the onboard LPC-Link2 from your LPCXpresso54618 to try to debug your own board? If so, please make sure you have the jumper settings correct for using the onboard LPC-Link2 with an external board. The documentation for the LPCXpresso54618 board should give details for this.
Also, what does you own board look like, with regards to the debug and reset circuitry? One useful reference here for you would be : https://community.nxp.com/message/630601
Regards,
MCUXpresso IDE Support