JLink and GDB Server with Arm-ELF-GDB for LPC2366

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • JLink and GDB Server with Arm-ELF-GDB for LPC2366

    Hello,

    I using Segger JLink V6 with GDB Server V3.80a. I have install the Yagarto from 08.04.2008. I use the controller LPC2366.

    Sometimes, I can debug, most comes errors like this:

    Performing single step...
    ...Target halted (PC = 0x00005A80)
    Reading all registers
    Setting breakpoint @ address 0x00005A7C, Size = 4, BPHandle = 0x0006
    Starting target CPU...
    Debugger requested to halt target...
    ERROR: Unable to halt ARM core
    Connection to debugger closed !

    WARNING: PC of target system has unexpected value of 0xEFFFFFD8 after reset. Resetting target

    Writing register (PC = 0x00000000)
    Resetting target
    Read 4 bytes @ address 0x00000AE0 (Data = 0xE1A03000)
    Read 4 bytes @ address 0x4000453C (Data = 0x3AEF5CDE)
    WARNING: Failed to read memory @ address 0x3AEF5CDE
    Read 4 bytes @ address 0x3AEF5CDE (Data = 0xAAAAAAAA)

    My Debug Settings for ARM-ELF-GDB:
    target remote localhost:2331
    monitor endian little
    monitor speed auto
    monitor reset
    monitor flash download = 1
    monitor flash device = LPC2366
    monitor long 0xE01FC040 = 1
    load
    monitor reset

    I have set with Eclipse a Breakpoint, then the Debugger or GDB Server generate an Error and the GDB leaves.
    Or why is the PC after Reset not at 0x00000000? What is in the address 0x4000453C?

    Have I set a wrong parameters for GDB connection?

    Thank you very much for any Idea.

    Regards Markus.
  • Apply... I have download and install V3.80c, It working better, but always, when I set a breakpoint at a specific code line, the debugger breaks, then comes this messages from GDB Server:

    vvvvvvvvvvvvvvvvvvvvvv
    Starting target CPU...
    ...Breakpoint reached @ address 0x00005AFC
    Reading all registers
    Removing breakpoint @ address 0x00005AFC, Size = 4
    Read 4 bytes @ address 0x00005AFC (Data = 0xE3A03102)
    Read 4 bytes @ address 0x400042E8 (Data = 0x00000444)
    Read 4 bytes @ address 0x00000444 (Data = 0xEB0011C4)
    Setting breakpoint @ address 0x00005B0C, Size = 4, BPHandle = 0x0003
    Starting target CPU...
    Debugger requested to halt target...
    ERROR: Unable to halt ARM core
    Connection to debugger closed !


    All pending breakpoints removed

    J-Link connected
    Firmware: J-Link ARM V6
    Feature(s): FlashBP, FlashDL, GDB

    J-Link found 1 JTAG device, Total IRLen = 4
    JTAG ID: 0x4F1F0F0F (ARM7)
    ERROR: Unable to halt ARM core
    ERROR: Could not connect to target.

    J-Link connected
    Firmware: J-Link ARM V6
    Feature(s): FlashBP, FlashDL, GDB

    Resetting target and trying again to connect...

    J-Link found 1 JTAG device, Total IRLen = 4
    JTAG ID: 0x4F1F0F0F (ARM7)
    ^

    The J-Link make a reconnect ?

    After this code line, it hang:
    // >>> #define MAC_BASE_ADDR 0xFFE00000 /* AHB Peripheral # 0 */
    // >>> #define MAC_MAC1 (*(volatile unsigned int *)(MAC_BASE_ADDR + 0x000)) /* MAC config reg 1 */
    // >>> #define MAC1_PASS_ALL 0x00000002 /* Pass All Receive Frames */
    /* Initialize MAC control registers. */
    MAC_MAC1 = MAC1_PASS_ALL;

    If I make a double Klick in the Eclipse Editor for set a breakpoint, then comes the error.

    I have no idea, what is wrong at this code line.

    Regards, Markus.