debuggingcortex-mkeil

How to debug LPC1768 using Keil + H-JTAG over LPT


I have a LPC1768 based board. And a H-Jtag Debugger(LPT based). I am able to Detect/Erase/Flash HEX files to the LPC1768 using H-JTAG software.

I want to debug my board inside keil uVision. As I go into debug mode keil gives 'USB connection Error' and subsequently no code updation/debug happens. I think It shouldn't be looking for a usb connection, but it should be connecting to the H-Jtag server running in background which it doesn't.I couldn't find a setting which I can configure to tell keil to look/connect to H-JTAG server.

Anybody who has done this please point me in right direction ?


Solution

  • I got the debugging Working by following this.

    Here is the list of steps for reference.

    1. Install the latest H-JTAG software from H-Jtag site.

    2. Open Toolconf.exe(Part of H-Jtag software installation). And pass the TOOLS.INI(Located inside the directory where you installed uVision/Keil MDK. Mine is at "C:\Embedded\keil\")

    3. Open Flasher.exe, Select proper Target(mine was NXP --> LPC1768) in Flash Selection menu, and in Programming Menu set the TYPE to Auto Flash Download

    4. Open the H-jtag.exe. Go to the Setting tab USB/LPT Selection Option select LPT and set proper values in LPT Jtag settings and LPT Port settings options (usually default settings will work). Finally, go to Flasher tab and Check on the AUTO DOWNLOAD option. That's it !

    Now you are ready to debug the device( LPC1768 ) inside uVision. Open the uVision and do select the H-JTAG CORTEX M3 for *Debug* and *Utilities* TABs inside Project Property window.

    Write, compile, Build and Start Debugging !