Hard to use LabTool to debug LPCLink2!

277 views
Skip to first unread message

Nathan McCorkle

unread,
May 5, 2014, 11:17:01 PM5/5/14
to lab...@googlegroups.com
Any way to make the LabTool code saved to the on-board flash so it
doesn't show up as a potential RedLink debugger? I'm using LPCxpresso
to program and debug an LPCLink2 and getting errors from both the
LabTool GUI and LPCXpresso, debug sessions failing or if I do finally
get them both running together, the LabTool GUI will lose its
connection, or the opposite, LPCXpresso will get confused and stay
confused even after I unplug LabTool.

I read and followed the debugging section here:
https://github.com/embeddedartists/labtool/blob/master/fw/COMPILE.md

but I got memory errors with that startup script :(

--
-Nathan

Anders Lindvall

unread,
May 6, 2014, 2:15:14 AM5/6/14
to lab...@googlegroups.com
Hi Nathan,

I understand the frustration of trying to debug using LPCXpresso, Link-2 and LabTool. The LPCXpresso IDE used to support more than one LPCLink-2 and it let you choose which one to use for debugging. That made it a lot easier but apparently it caused other problems because that feature has since been removed.

One thing that you might try is to convert (fully reversible if it fails) your LPCLink-2 (the one you use for debugging) into a CMSIS-DAP dongle by following the instructions here: http://www.lpcware.com/lpclink2-config-tool . When that is done it will be a CMSIS-DAP dongle if you have jumper JP1 inserted and when the jumper isn't inserted it will behave as it did before. You then remove both .launch files in LPCXpresso, connect the CMSIS-DAP dongle but not LabTool to the PC and press debug in the IDE. It should pop up a dialog allow you to select (or search for) the debug dongle. Make sure to select the CMSIS-DAP one (see attached image).

Inline images 1

Insert the cable to LabTool and then press OK to start the debugging. In future runs the LPCXpresso IDE should always look for the CMSIS-DAP dongle instead of LabTool and hopefully that will allow you to debug.

Regarding moving LabTool firmware into FLASH. The problem is that there is no onchip FLASH for the LPC4370. The only FLASH is an external SPI FLASH (which is what is being used by the CMSIS-DAP firmware above). You could possibly modify the LPCXpresso project to store the code in SPI flash and then use the DFU Sec tool (http://www.lpcware.com/content/project/dfu-download-programming-utility-and-security-lpcdfusec-tool/dfusec-dfu-production-p) to write your compiled program into SPI FLASH (remeber to remove the JP1 jumper while writing and insert it again afterwards). However - I'm not sure if the LPCXpresso IDE can debug when booting from SPI FLASH or if the debugger will fail to connect.

I have been using the Keil uVision IDE when developing and debugging the LabTool firmware as it has no problem at all keeping LabTool and LPCLink-2 apart.

Kind Regards,
Anders



--
-Nathan

--
You received this message because you are subscribed to the Google Groups "LabTool" group.
To unsubscribe from this group and stop receiving emails from it, send an email to labtool+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Reply all
Reply to author
Forward
0 new messages