Launching demo Debug

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by unix1970 on Sat Feb 22 13:15:54 MST 2014
Dear Forum,

I have the following problem and I'd be very pleased if you could help me:
I have a LPC11C24 and programm it with a LPC-Link. I changed the usual crystal to an 25MHz, but I want to drive the whole thing still on 12MHz.

If I try to debug it, it seems to flash but then sticks to 97% with "launching: ConfiguringGDB" and doesn't goes on.

I attached my changes in system_lpc11xx.c with the most important parts mentioned below.
It would help me so much if you could have a look at it. At the moment I don't see any light at the end of the tunnel.

Best wishes

This is the console output:
LPCXpresso Debug Driver v6.0 (Dec 30 2013 11:03:03 - crt_emu_lpc11_13_nxp build 1222)
Looked for chip XML file in C:/nxp/LPCXpresso_6.1.4_194/lpcxpresso/bin/LPC11C24/301.xml
Looked for vendor directory XML file in C:/nxp/LPCXpresso_6.1.4_194/lpcxpresso/bin/nxp_directory.xml
Found generic directory XML file in C:/nxp/LPCXpresso_6.1.4_194/lpcxpresso/bin/crt_directory.xml
(  5) Remote configuration complete
Emu(0): Conn&Reset. DpID:  BB11477. Info: HID64HS12
SWD Frequency: 3000 KHz. RTCK: False. Vector catch: False.
Packet delay: 0  Poll delay: 0.
Loaded LPC11_12_13_32K_8K.cfx: LPC11_12_13 (32K Flash, min 8K RAM) Apr 22 2013 12:14:02  On-chip Flash Memory
NXP: LPC11C24/301  Part ID: 0x00000000
Connected: was_reset=false. was_stopped=false
v LPCXpresso Free License - Download limit is 256K
Writing 9268 bytes to 0000 in Flash (assumed clock: 12.0MHz)
Erased/Wrote page  0-2 with 9268 bytes in 1471msec
Flash write Done

I changed the code in system_LPC11C24.c to the following:

#define CLOCK_SETUP           1
#define SYSCLK_SETUP          1
#define SYSOSC_SETUP          1
#define SYSOSCCTRL_Val        1//0x00000000
#define WDTOSC_SETUP          0
#define WDTOSCCTRL_Val        0x000000A0
#define SYSPLLCLKSEL_Val      0x00000001
#define SYSPLL_SETUP          1
#define SYSPLLCTRL_Val        0x00000023
#define MAINCLKSEL_Val        1//0x00000003
#define SYSAHBCLKDIV_Val      0x00000001
#define AHBCLKCTRL_Val        0x0001005F
#define SSP0CLKDIV_Val        0x00000001
#define UARTCLKDIV_Val        0x00000001
#define SSP1CLKDIV_Val        0x00000001

  Define clocks
#define __XTAL            (25000000UL)    /* Oscillator frequency             */
#define __SYS_OSC_CLK     (    __XTAL)    /* Main oscillator frequency        */
#define __IRC_OSC_CLK     (12000000UL)    /* Internal RC oscillator frequency */

Original Attachment has been moved to: system_LPC11xx_0.c.zip