#63 J-Link Breakpoints

Version 1.x
closed
None
5
2014-08-28
2014-07-07
WGR7
No

[ilg: the problem was related to an old CDT version; the user upgraded to the latest CDT and the problem was solved]

I'm trying to set a brakpoint in some lines in my code , but after loading the code to Microcontroller the GDB remove my breakpoints. The only one that realy work is the main breakpoint. I've looked for something in the google and I've found that emIDE(http://emide.org - Added command at start of debug session to not temporarily remove breakpoints.) had the same problem. I already added the command (monitor flash breakpoints = 1) in the GDB Client->Command, but don't solve the problem. Can you help me?

This is the console log.

SEGGER J-Link GDB Server V4.86b Command Line Version

JLinkARM.dll V4.86b (DLL compiled Jun 27 2014 20:11:00)

-----GDB Server start settings-----
GDBInit file: none
GDB Server Listening port: 2331
SWO raw output listening port: 2332
Terminal I/O port: 2333
Accept remote connection: localhost only
Generate logfile: off
Verify download: on
Init regs on start: on
Silent mode: off
Single run mode: on
Target connection timeout: 5 sec.
------J-Link related settings------
J-Link Host interface: USB
J-Link script: none
J-Link settings file: none
------Target related settings------
Target device: LPC1768
Target interface: JTAG
Target interface speed: 100000kHz
Target endian: little

Connecting to J-Link...
J-Link is connected.
Firmware: J-Link ARM V8 compiled Nov 25 2013 19:20:08
Hardware: V8.00
S/N: xxxxxxxxx
Feature(s): RDI,FlashDL,FlashBP,JFlash,GDBFULL
Checking target voltage...
Target voltage: 3.25 V
Listening on TCP/IP port 2331
Connecting to target...
J-Link found 1 JTAG device, Total IRLen = 4
JTAG ID: 0x4BA00477 (Cortex-M3)
Connected to target
Waiting for GDB connection...Connected to 127.0.0.1
Reading all registers
Read 4 bytes @ address 0x00000000 (Data = 0x10001C58)
Target interface speed set to 1000 kHz
Resets core & peripherals via SYSRESETREQ & VECTRESET bit.
Halting target CPU...
...Target halted (PC = 0x00000098)
R0 = 00000000, R1 = 00000099, R2 = 00000000, R3 = 00000000
R4 = 3456ABCD, R5 = 3456ABCD, R6 = 12345678, R7 = 10001C40
R8 = BFFC821E, R9 = 3E2C3AC1, R10= 7A6FC35D, R11= FEF7B949
R12= 00000107, R13= 10001C58, MSP= 10001C58, PSP= 384C854C
R14(LR) = 1FFF0D5F, R15(PC) = 00000098
XPSR 61000000, APSR 60000000, EPSR 01000000, IPSR 00000000
CFBP 00000000, CONTROL 00, FAULTMASK 00, BASEPRI 00, PRIMASK 00
Reading all registers
Select auto target interface speed (4000 kHz)
Flash breakpoints enabled
Semi-hosting enabled (VectorAddr = 0x08)
Semihosting I/O set to TELNET Client
Read 1 bytes @ address 0x2009C063 (Data = 0x00)
Read 4 bytes @ address 0x00000098 (Data = 0xF381490C)
Downloading 520 bytes @ address 0x00000000 - Verified OK
Downloading 568 bytes @ address 0x00000208 - Verified OK
Downloading 20 bytes @ address 0x00000440 - Verified OK
Writing register (PC = 0x000000cc)
Read 4 bytes @ address 0x000000CC (Data = 0xB083B500)
Read 1 bytes @ address 0x2009C073 (Data = 0x00)
Read 2 bytes @ address 0x00000406 (Data = 0xF7FF)
Read 2 bytes @ address 0x00000406 (Data = 0xF7FF)
Read 2 bytes @ address 0x00000404 (Data = 0xB570)
Resetting target
Halting target CPU...
...Target halted (PC = 0x000001D8)
R0 = 00000000, R1 = 000001D9, R2 = 00000000, R3 = 00000000
R4 = 3456ABCD, R5 = 3456ABCD, R6 = 12345678, R7 = 10001C40
R8 = BFFC821E, R9 = 3E2C3AC1, R10= 7A6FC35D, R11= FEF7B949
R12= 00000107, R13= 10008000, MSP= 10008000, PSP= 384C854C
R14(LR) = 1FFF0D5F, R15(PC) = 000001D8
XPSR 61000000, APSR 60000000, EPSR 01000000, IPSR 00000000
CFBP 00000000, CONTROL 00, FAULTMASK 00, BASEPRI 00, PRIMASK 00
Reading all registers
Read 4 bytes @ address 0x000001D8 (Data = 0xF7FFB508)
Setting breakpoint @ address 0x00000404, Size = 2, BPHandle = 0x0002
Starting target CPU...
...Breakpoint reached @ address 0x00000404
Reading all registers
Removing breakpoint @ address 0x00000404, Size = 2
Read 4 bytes @ address 0x00000404 (Data = 0xF7FFB570)
Read 2 bytes @ address 0x2009C070 (Data = 0x0000)
Read 2 bytes @ address 0x2009C072 (Data = 0x0000)
Read 1 bytes @ address 0x2009C063 (Data = 0x00)
Read 1 bytes @ address 0x2009C073 (Data = 0x00)
Read 2 bytes @ address 0x2009C070 (Data = 0x0000)
Read 2 bytes @ address 0x2009C072 (Data = 0x0000)

Discussion

  • from what I see in the log, the flash breakpoints are enabled, so this shouldn't be a problem.

    unfortunately I do not have a LPC1768 board available, so I cannot test, but I guess you missed something. if execution stops in main(), can you set a new breakpoint at this moment?

    the log file reveals some accesses to ram (0x2009C070), are you sure the memory map in the linker scripts matches the processor?

     
  • WGR7
    WGR7
    2014-07-08

    Hi Liviu,

    My processor have two internal RAM regions, as you can see bellow in my mem.ld file:

    MEMORY
    {
    FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 512K
    RAM (rwx) : ORIGIN = 0x10000000, LENGTH = 32k
    RAM1 (rwx) : ORIGIN = 0x2007C000, LENGTH = 32k
    }

    I've made a test removing the second internal SRAM memory region, but the problem stays. In the disassembly windows I've seen that address at 0x00000404 is the main() function address, then I believe that after reach tha main() the debugger remove it because it is a temporary breakpoint. As I can see now, any breakpoint is working with J-Link except the breakpoint to main().

    Yes, I can set break points but they doesn't work. This is so strange because I've made some tests with emIDE to figure out how your debugger it set and it works perfectly!

    Something is wrong because one guy posted a support ticket about debugging problem and in your picture I seen that the breakpoint was sent to GDB server.

    Thanks.

    ===========================================================================================

    This is the gdb log

    monitor clrbp
    monitor reset 0
    monitor semihosting enable
    The target endianness is set automatically (currently little endian)
    No source file named H:Eclipse WorkspaceMyProjectsrcmain.c.
    No source file named H:Eclipse WorkspaceMyProjectsrcmain.c.
    No source file named H:Eclipse WorkspaceMyProjectsrcmain.c.
    monitor reset
    monitor halt
    monitor regs
    flushreg
    Register cache flushed.
    continue
    Continuing.

    Temporary breakpoint 4, main (argc=1, argv=0x10000004 <argv.4461>) at ../src/main.c:48
    48 {

    ===========================================================================================

    SEGGER J-Link GDB Server V4.86b Command Line Version

    JLinkARM.dll V4.86b (DLL compiled Jun 27 2014 20:11:00)

    -----GDB Server start settings-----
    GDBInit file: none
    GDB Server Listening port: 2331
    SWO raw output listening port: 2332
    Terminal I/O port: 2333
    Accept remote connection: localhost only
    Generate logfile: off
    Verify download: on
    Init regs on start: on
    Silent mode: off
    Single run mode: on
    Target connection timeout: 5 sec.
    ------J-Link related settings------
    J-Link Host interface: USB
    J-Link script: none
    J-Link settings file: none
    ------Target related settings------
    Target device: LPC1768
    Target interface: JTAG
    Target interface speed: 0kHz
    Target endian: little

    Connecting to J-Link...
    J-Link is connected.
    Firmware: J-Link ARM V8 compiled Nov 25 2013 19:20:08
    Hardware: V8.00
    S/N: xxxxxxxxx
    Feature(s): RDI,FlashDL,FlashBP,JFlash,GDBFULL
    Checking target voltage...
    Target voltage: 3.25 V
    Listening on TCP/IP port 2331
    Connecting to target...
    J-Link found 1 JTAG device, Total IRLen = 4
    JTAG ID: 0x4BA00477 (Cortex-M3)
    Connected to target
    Waiting for GDB connection...Connected to 127.0.0.1
    Reading all registers
    Read 4 bytes @ address 0x00000000 (Data = 0x10008000)
    Target interface speed set to 1000 kHz
    Resets core & peripherals via SYSRESETREQ & VECTRESET bit.
    Halting target CPU...
    ...Target halted (PC = 0x000001D8)
    R0 = 00000000, R1 = 000001D9, R2 = 00000000, R3 = 00000000
    R4 = 3456ABCD, R5 = 3456ABCD, R6 = 12345678, R7 = 3ED0518A
    R8 = 3FFC821E, R9 = 3E2CBAC1, R10= 7A6FC35D, R11= FEE7B849
    R12= 00000107, R13= 10008000, MSP= 10008000, PSP= 384C854C
    R14(LR) = 1FFF0D5F, R15(PC) = 000001D8
    XPSR 61000000, APSR 60000000, EPSR 01000000, IPSR 00000000
    CFBP 00000000, CONTROL 00, FAULTMASK 00, BASEPRI 00, PRIMASK 00
    Reading all registers
    Select auto target interface speed (4000 kHz)
    Flash breakpoints enabled
    Semi-hosting enabled (VectorAddr = 0x08)
    Semihosting I/O set to TELNET and GDB Client
    Read 4 bytes @ address 0x000001D8 (Data = 0xF7FFB508)
    Downloading 520 bytes @ address 0x00000000 - Verified OK
    Downloading 568 bytes @ address 0x00000208 - Verified OK
    Downloading 20 bytes @ address 0x00000440 - Verified OK
    Writing register (PC = 0x000000cc)
    Read 4 bytes @ address 0x000000CC (Data = 0xB083B500)
    Read 2 bytes @ address 0x00000406 (Data = 0xF7FF)
    Read 2 bytes @ address 0x00000406 (Data = 0xF7FF)
    Read 2 bytes @ address 0x00000404 (Data = 0xB570)
    Resetting target
    Halting target CPU...
    ...Target halted (PC = 0x000001D8)
    R0 = 00000000, R1 = 000001D9, R2 = 00000000, R3 = 00000000
    R4 = 3456ABCD, R5 = 3456ABCD, R6 = 12345678, R7 = 3ED0518A
    R8 = 3FFC821E, R9 = 3E2CBAC1, R10= 7A6FC35D, R11= FEE7B849
    R12= 00000107, R13= 10008000, MSP= 10008000, PSP= 384C854C
    R14(LR) = 1FFF0D5F, R15(PC) = 000001D8
    XPSR 61000000, APSR 60000000, EPSR 01000000, IPSR 00000000
    CFBP 00000000, CONTROL 00, FAULTMASK 00, BASEPRI 00, PRIMASK 00
    Reading all registers
    Read 4 bytes @ address 0x000001D8 (Data = 0xF7FFB508)
    Setting breakpoint @ address 0x00000404, Size = 2, BPHandle = 0x0002
    Starting target CPU...
    ...Breakpoint reached @ address 0x00000404
    Reading all registers
    Removing breakpoint @ address 0x00000404, Size = 2
    Read 4 bytes @ address 0x00000404 (Data = 0xF7FFB570)
    Read 2 bytes @ address 0x00000000 (Data = 0x8000)
    Read 2 bytes @ address 0x00000002 (Data = 0x1000)
    Read 2 bytes @ address 0x00000004 (Data = 0x01D9)
    Read 2 bytes @ address 0x00000006 (Data = 0x0000)
    Read 2 bytes @ address 0x00000008 (Data = 0x01E1)
    Read 2 bytes @ address 0x0000000A (Data = 0x0000)
    Read 2 bytes @ address 0x0000000C (Data = 0x01E5)
    Read 2 bytes @ address 0x0000000E (Data = 0x0000)
    Read 2 bytes @ address 0x00000010 (Data = 0x01E9)
    Read 2 bytes @ address 0x00000012 (Data = 0x0000)
    Read 2 bytes @ address 0x00000014 (Data = 0x01ED)
    Read 2 bytes @ address 0x00000016 (Data = 0x0000)
    Read 2 bytes @ address 0x00000018 (Data = 0x01F1)
    Read 2 bytes @ address 0x0000001A (Data = 0x0000)
    Read 2 bytes @ address 0x0000001C (Data = 0x749A)
    Read 2 bytes @ address 0x0000001E (Data = 0xEFFF)
    Read 2 bytes @ address 0x00000020 (Data = 0x0000)
    Read 2 bytes @ address 0x00000022 (Data = 0x0000)
    Read 2 bytes @ address 0x00000024 (Data = 0x0000)
    Read 2 bytes @ address 0x00000026 (Data = 0x0000)
    Read 2 bytes @ address 0x00000028 (Data = 0x0000)
    Read 2 bytes @ address 0x0000002A (Data = 0x0000)
    Read 2 bytes @ address 0x0000002C (Data = 0x01F5)
    Read 2 bytes @ address 0x0000002E (Data = 0x0000)
    Read 2 bytes @ address 0x00000030 (Data = 0x01F9)
    Read 2 bytes @ address 0x00000032 (Data = 0x0000)
    Read 2 bytes @ address 0x00000034 (Data = 0x0000)
    Read 2 bytes @ address 0x00000036 (Data = 0x0000)
    Read 2 bytes @ address 0x00000038 (Data = 0x01FD)
    Read 2 bytes @ address 0x0000003A (Data = 0x0000)
    Read 2 bytes @ address 0x0000003C (Data = 0x03FD)
    Read 2 bytes @ address 0x0000003E (Data = 0x0000)
    Read 2 bytes @ address 0x00000040 (Data = 0x0205)
    Read 2 bytes @ address 0x00000042 (Data = 0x0000)
    Read 2 bytes @ address 0x00000044 (Data = 0x0205)
    Read 2 bytes @ address 0x00000046 (Data = 0x0000)
    Read 2 bytes @ address 0x00000048 (Data = 0x0205)
    Read 2 bytes @ address 0x0000004A (Data = 0x0000)
    Read 2 bytes @ address 0x0000004C (Data = 0x0205)
    Read 2 bytes @ address 0x0000004E (Data = 0x0000)
    Read 2 bytes @ address 0x00000050 (Data = 0x0205)
    Read 2 bytes @ address 0x00000052 (Data = 0x0000)
    Read 2 bytes @ address 0x00000054 (Data = 0x0205)
    Read 2 bytes @ address 0x00000056 (Data = 0x0000)
    Read 2 bytes @ address 0x00000000 (Data = 0x8000)
    Read 2 bytes @ address 0x00000002 (Data = 0x1000)
    Read 2 bytes @ address 0x00000004 (Data = 0x01D9)
    Read 2 bytes @ address 0x00000006 (Data = 0x0000)
    Read 2 bytes @ address 0x00000008 (Data = 0x01E1)
    Read 2 bytes @ address 0x0000000A (Data = 0x0000)
    Read 2 bytes @ address 0x0000000C (Data = 0x01E5)
    Read 2 bytes @ address 0x0000000E (Data = 0x0000)
    Read 2 bytes @ address 0x00000010 (Data = 0x01E9)
    Read 2 bytes @ address 0x00000012 (Data = 0x0000)
    Read 2 bytes @ address 0x00000014 (Data = 0x01ED)
    Read 2 bytes @ address 0x00000016 (Data = 0x0000)
    Read 2 bytes @ address 0x00000018 (Data = 0x01F1)
    Read 2 bytes @ address 0x0000001A (Data = 0x0000)
    Read 2 bytes @ address 0x0000001C (Data = 0x749A)
    Read 2 bytes @ address 0x0000001E (Data = 0xEFFF)
    Read 2 bytes @ address 0x00000020 (Data = 0x0000)
    Read 2 bytes @ address 0x00000022 (Data = 0x0000)
    Read 2 bytes @ address 0x00000024 (Data = 0x0000)
    Read 2 bytes @ address 0x00000026 (Data = 0x0000)
    Read 2 bytes @ address 0x00000028 (Data = 0x0000)
    Read 2 bytes @ address 0x0000002A (Data = 0x0000)
    Read 2 bytes @ address 0x0000002C (Data = 0x01F5)
    Read 2 bytes @ address 0x0000002E (Data = 0x0000)
    Read 2 bytes @ address 0x00000030 (Data = 0x01F9)
    Read 2 bytes @ address 0x00000032 (Data = 0x0000)
    Read 2 bytes @ address 0x00000034 (Data = 0x0000)
    Read 2 bytes @ address 0x00000036 (Data = 0x0000)
    Read 2 bytes @ address 0x00000038 (Data = 0x01FD)
    Read 2 bytes @ address 0x0000003A (Data = 0x0000)
    Read 2 bytes @ address 0x0000003C (Data = 0x03FD)
    Read 2 bytes @ address 0x0000003E (Data = 0x0000)
    Read 2 bytes @ address 0x00000040 (Data = 0x0205)
    Read 2 bytes @ address 0x00000042 (Data = 0x0000)
    Read 2 bytes @ address 0x00000044 (Data = 0x0205)
    Read 2 bytes @ address 0x00000046 (Data = 0x0000)
    Read 2 bytes @ address 0x00000048 (Data = 0x0205)
    Read 2 bytes @ address 0x0000004A (Data = 0x0000)
    Read 2 bytes @ address 0x0000004C (Data = 0x0205)
    Read 2 bytes @ address 0x0000004E (Data = 0x0000)
    Read 2 bytes @ address 0x00000050 (Data = 0x0205)
    Read 2 bytes @ address 0x00000052 (Data = 0x0000)
    Read 2 bytes @ address 0x00000054 (Data = 0x0205)
    Read 2 bytes @ address 0x00000056 (Data = 0x0000)
    Read 2 bytes @ address 0x00000404 (Data = 0xB570)
    Read 2 bytes @ address 0x00000406 (Data = 0xF7FF)
    Read 2 bytes @ address 0x00000408 (Data = 0xFFC7)
    Read 2 bytes @ address 0x0000040A (Data = 0x2003)
    Read 2 bytes @ address 0x0000040C (Data = 0xF04F)
    Read 2 bytes @ address 0x0000040E (Data = 0x6180)
    Read 2 bytes @ address 0x00000410 (Data = 0x2201)
    Read 2 bytes @ address 0x00000412 (Data = 0xF7FF)
    Read 2 bytes @ address 0x00000414 (Data = 0xFF25)
    Read 2 bytes @ address 0x00000416 (Data = 0x2603)
    Read 2 bytes @ address 0x00000418 (Data = 0xF04F)
    Read 2 bytes @ address 0x0000041A (Data = 0x6580)
    Read 2 bytes @ address 0x00000420 (Data = 0x4630)
    Read 2 bytes @ address 0x00000422 (Data = 0x4629)
    Read 2 bytes @ address 0x00000424 (Data = 0xF7FF)
    Read 2 bytes @ address 0x00000426 (Data = 0xFF2C)
    Read 2 bytes @ address 0x0000041C (Data = 0xF44F)
    Read 2 bytes @ address 0x0000041E (Data = 0x747A)
    Read 2 bytes @ address 0x00000428 (Data = 0x4620)
    Read 2 bytes @ address 0x0000042A (Data = 0xF7FF)
    Read 2 bytes @ address 0x0000042C (Data = 0xFFD3)
    Read 2 bytes @ address 0x0000042E (Data = 0x4630)
    Read 2 bytes @ address 0x00000430 (Data = 0x4629)
    Read 2 bytes @ address 0x00000432 (Data = 0xF7FF)
    Read 2 bytes @ address 0x00000434 (Data = 0xFF2D)
    Read 2 bytes @ address 0x00000420 (Data = 0x4630)
    Read 2 bytes @ address 0x00000422 (Data = 0x4629)
    Read 2 bytes @ address 0x00000424 (Data = 0xF7FF)
    Read 2 bytes @ address 0x00000426 (Data = 0xFF2C)
    Read 2 bytes @ address 0x0000041C (Data = 0xF44F)
    Read 2 bytes @ address 0x0000041E (Data = 0x747A)
    Read 2 bytes @ address 0x00000428 (Data = 0x4620)
    Read 2 bytes @ address 0x0000042A (Data = 0xF7FF)
    Read 2 bytes @ address 0x0000042C (Data = 0xFFD3)
    Read 2 bytes @ address 0x0000042E (Data = 0x4630)
    Read 2 bytes @ address 0x00000430 (Data = 0x4629)
    Read 2 bytes @ address 0x00000432 (Data = 0xF7FF)
    Read 2 bytes @ address 0x00000434 (Data = 0xFF2D)
    Read 2 bytes @ address 0x00000436 (Data = 0x4620)
    Read 2 bytes @ address 0x00000438 (Data = 0xF7FF)
    Read 2 bytes @ address 0x0000043A (Data = 0xFFCC)
    Read 2 bytes @ address 0x0000043C (Data = 0xE7F0)
    Read 2 bytes @ address 0x00000420 (Data = 0x4630)
    Read 2 bytes @ address 0x00000422 (Data = 0x4629)
    Read 2 bytes @ address 0x00000424 (Data = 0xF7FF)
    Read 2 bytes @ address 0x00000426 (Data = 0xFF2C)
    Read 2 bytes @ address 0x0000041C (Data = 0xF44F)
    Read 2 bytes @ address 0x0000041E (Data = 0x747A)
    Read 2 bytes @ address 0x00000428 (Data = 0x4620)
    Read 2 bytes @ address 0x0000042A (Data = 0xF7FF)
    Read 2 bytes @ address 0x0000042C (Data = 0xFFD3)
    Read 2 bytes @ address 0x0000042E (Data = 0x4630)
    Read 2 bytes @ address 0x00000430 (Data = 0x4629)
    Read 2 bytes @ address 0x00000432 (Data = 0xF7FF)
    Read 2 bytes @ address 0x00000434 (Data = 0xFF2D)
    Read 2 bytes @ address 0x00000436 (Data = 0x4620)
    Read 2 bytes @ address 0x00000438 (Data = 0xF7FF)
    Read 2 bytes @ address 0x0000043A (Data = 0xFFCC)
    Read 2 bytes @ address 0x0000043C (Data = 0xE7F0)
    Read 2 bytes @ address 0x00000418 (Data = 0xF04F)
    Read 2 bytes @ address 0x0000041A (Data = 0x6580)
    Read 2 bytes @ address 0x0000041C (Data = 0xF44F)
    Read 2 bytes @ address 0x0000041E (Data = 0x747A)
    Read 2 bytes @ address 0x00000420 (Data = 0x4630)
    Read 2 bytes @ address 0x00000422 (Data = 0x4629)
    Read 2 bytes @ address 0x00000424 (Data = 0xF7FF)
    Read 2 bytes @ address 0x00000426 (Data = 0xFF2C)
    Read 2 bytes @ address 0x00000428 (Data = 0x4620)
    Read 2 bytes @ address 0x0000042A (Data = 0xF7FF)
    Read 2 bytes @ address 0x0000042C (Data = 0xFFD3)
    Read 2 bytes @ address 0x0000042E (Data = 0x4630)
    Read 2 bytes @ address 0x00000430 (Data = 0x4629)
    Read 2 bytes @ address 0x00000432 (Data = 0xF7FF)
    Read 2 bytes @ address 0x00000434 (Data = 0xFF2D)
    Read 2 bytes @ address 0x00000436 (Data = 0x4620)

     
    Last edit: WGR7 2014-07-08
  • I have difficulties to understand you. My plug-in just starts the J-Link GDB server with the parameters you selected and then initializes the GDB client, but the actual debugging session is performed by Eclipse via the GDB client and the GDB server; if you miss something during inits, it might not work.

    I advise you start the GDB server separately and then use the standard GDB Hardware Debugging plug-in. When you reach a conclusion how to configure both the server and the client, then try to use the same configuration with the J-Link plug-in.

     
  • any progress on this?

     
  • WGR7
    WGR7
    2014-07-26

    Sorry about the long delay. I've tested in a virtual machine running WIN7x32 and by this manner the breakpoints worked fine. Really I don't know why it didn't worked in the real machine rinnung WIN7x64.

     
  • I don't think that it has to do with 32 vs 64, it must be something else wrong with your Eclipse and/or usb drivers, if you install a fresh copy it will probably work

     
  • EdizonTN
    EdizonTN
    2014-08-05

    Hi,
    I have a similiar problem with breakpoints.

    My HW:
    Target: IAR LPC178x-SK with LPC 1788FBD208
    Debugger: Olimex ARM-USB-OCD (15ba:0003) driver by openocd-0.9.0-dev-swd-140623233947 (tested by 0.4.0, 0.5.0, 0.6.1, 0.7.0 and 0.8.0 also)
    In Eclipse I have presetted two ways for debug:
    - GDB Hardware Debugging
    - GDB OpenOCD Debugging

    First One are working perfectly (I Mean breakpoints). But second one, working without any chance to set breakpoint (system set one temporary breakpoint to main - it's working).
    User can't set breakpoint -> debugger don't stop.

    In Log file I see:
    "Note: automatically using hardware breakpoints for read-only addresses.
    No source file named C:Documents and SettingspeterjMy DocumentsgitARM-FNET-LPC-1788-SKARM-FNET-LPC-1788-SKmain.c."

    -- where are '\' characters ?? Path is not correct!

    I think, this is a problem. (for GDB OpenOCD Debugging)

    What do you think?

    Screen shots you can find in attachment.
    One for GDB Hardware Debugging, Second for GDB OpenOCD Debugging and last for external tool (OpenOCD have to start before use GDB Hardware Debugging).

    ed.

     
    • can you activate the openocd log and run the two sessions, the one which works and the one which fails, using exactly the same configurations and executable, and try to spot the differences?

       
  • EdizonTN
    EdizonTN
    2014-08-05

    Yes,
    log files you can find in attachment.

    Situation:
    Start debugger, download .elf file and run till to first breakpoint in main (temporary) and second run till to user breakpoint (fnet_main.c [line: 84], address 0x0000f4f2)
    Result:
    GDB_Hardware_Debugging.log - all breakpoint are working
    GDB_OpenOCD_Debugging.log - first break working, second breakpoint not working

    File compare using fc:
    "Comparing files GDB_OpenOCD_Debugging.log and GDB_HARDWARE_DEBUGGING.LOG
    Resync Failed. Files are too different."

    ed.

     
    Last edit: EdizonTN 2014-08-05
  • I just noticed that for the Hardware Debugging case you used the Legacy GDB Hardware Debugging Launcher. Please select the new DSF and redo the test.

     
  • EdizonTN
    EdizonTN
    2014-08-05

    DSF not working!
    Same situation as in GDB OpenOCD Debugging :-(

    Good solution is GDB Hardware Debugging only (with selected Legacy GDB Debugging hardware).

    log file in attachment.

    edit: I was uploaded file with wrong filename. Reuploaded...

     
    Last edit: EdizonTN 2014-08-05
    • DSF not working!

      my plug-in just starts openocd and then used DSF to launch the debug session.

      openocd is notorious for subtle bugs, probably one of them affects it when running under DSF.

       
  • EdizonTN
    EdizonTN
    2014-08-05

    Problem will be between eclipse and DSF (DSF is part of which plugin?), I think....

    Path to .elf is parsed without slash '/' into DSF.

    ed.

     
    Last edit: EdizonTN 2014-08-05
    • DSF is part of the Eclipse core debug.

      Regarding paths, I do not use Windows, so all my paths use the standard slash separator, and never had problems.

       
  • EdizonTN
    EdizonTN
    2014-08-05

    Ouuuu,
    problem can be in the path to workspace. Must be without space chars!
    https://bugs.eclipse.org/bugs/show_bug.cgi?id=426834
    (Yes, I have Eclipse kepler)

    ed.

     
  • EdizonTN
    EdizonTN
    2014-08-06

    Thank Liviu for your support.

    I was upgrade Eclipse CDT to version 8.4.0.201406111759 (http://download.eclipse.org/tools/cdt/releases/8.4) and problem with breakpoints has been solved!

    Maybe as help for others....

    ed.

     
    Last edit: EdizonTN 2014-08-06
    • ok, good luck with your ARM projects.

       
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,3 +1,5 @@
    +[ilg: the problem was related to an old CDT version; the user upgraded to the latest CDT and the problem was solved]
    +
     I'm trying to set a brakpoint in some lines in my code , but after loading the code to Microcontroller the GDB remove my breakpoints. The only one that realy work is the main breakpoint. I've looked for something in the google and I've found that emIDE(http://emide.org  - Added command at start of debug session to not temporarily remove breakpoints.) had the same problem. I already added the command (monitor flash breakpoints = 1) in the GDB Client->Command, but don't solve the problem. Can you help me?
    
     This is the console log.
    
    • status: open --> closed