OpenOCD and LPC1549 issues

Sysprogs forums Forums VisualGDB OpenOCD and LPC1549 issues

This topic contains 27 replies, has 2 voices, and was last updated by  JB_Lightcon 1 month, 2 weeks ago.

Viewing 13 posts - 16 through 28 (of 28 total)
  • Author
    Posts
  • #11038

    JB_Lightcon
    Participant

    To me it looks very similar (only jump address 0x778 in 3rd line differs):

    x/10i SystemInit
    &”x/10i SystemInit\n”
    0x1f0 <SystemInit>:    push    {r7, lr}
    0x1f2 <SystemInit+2>:    add    r7, sp, #0
    0x1f4 <SystemInit+4>:    bl    0x778 <Chip_SystemInit>
    0x1f8 <SystemInit+8>:    nop
    0x1fa <SystemInit+10>:    pop    {r7, pc}
    0x1fc <SystemCoreClockUpdate>:    push    {r7, lr}
    0x1fe <SystemCoreClockUpdate+2>:    add    r7, sp, #0
    0x200 <SystemCoreClockUpdate+4>:    bl    0x4c8 <Chip_Clock_GetSystemClockRate>
    0x204 <SystemCoreClockUpdate+8>:    mov    r2, r0
    0x206 <SystemCoreClockUpdate+10>:    ldr    r3, [pc, #8]    ; (0x210 <SystemCoreClockUpdate+20>)

    And as I told in my first post – I change LED blinking period and it differs if I launch OCD session manually…

    #11053

    support
    Keymaster

    Hi,

    Sorry, not fully sure we got you correctly. In the previous post you mentioned the following instruction:

    0x000001f0  strb r7, [r0, r2]

    But in your last post the instruction at that address looks different:

    0x1f0 <SystemInit>:    push    {r7, lr}

    Could you please double-check what is the actual instruction programmed at address 0x1f0 in the FLASH (if you run “x/10i” before connecting to the target, gdb will read the code from the ELF file and not from the actual FLASH memory)?

    #11072

    JB_Lightcon
    Participant

    First result was with step by step debug from visual studio disassembly window with target attached.

    Second is no target attached “x/10i SystemInit” command on GDB session window.

    My offer to send you one LPC1549 based board is still valid and I feel it would be much more efficient to do this debug on your PC 😉

    #11074

    support
    Keymaster

    Hi,

    No problem, this should help us diagnose it quickly. Please contact us via the support form on our website to arrange the shipping.

    #11084

    JB_Lightcon
    Participant

    Filled the form – will wait for response.

    #11089

    support
    Keymaster

    Hi,

    Thanks, we have replied with the address.

    #11175

    JB_Lightcon
    Participant

    Have you received test board? Any progress?

    #11176

    support
    Keymaster

    Hi,

    Yes, we have published a detailed tutorial last week: https://visualgdb.com/tutorials/arm/mbed/lpc1549/

    #11186

    JB_Lightcon
    Participant

    Nice. Since you got it up and running, any possibilities to make it work with OpenOCD?

    #11187

    support
    Keymaster

    Hi,

    You can try installing the WinUSB driver for the virtual J-Link device and using OpenOCD to debug it (FLASH programming may be less reliable and may require selecting a script manually), although the debugging experience will be less convenient than with the Segger software.

     

    #11194

    JB_Lightcon
    Participant

    I know this thread became long, but my original intent was to make OpenOCD work, and after failing to do so, I arranged a board for you, so you could check it on your own. So could you please run OpenOCD on the board I sent you, because I have never had issues with Segger adapters and I just want OpenOCD working on this board….

    #11197

    support
    Keymaster

    No problem, we ran a quick test with OpenOCD. It turns out that when OpenOCD accepts an incoming connection from gdb, it tries to detect the FLASH ID of the on-board FLASH memory and the code used to do that hangs, so on OpenOCD side it looks like a gdb timeout and on gdb side it looks like an OpenOCD timeout.

    Looks like there were attempts to add support for LPC1549 into OpenOCD (e.g. see this patch), but they seem to be abandoned, most likely due to low interest. As the J-Link solution works out-of-the-box and does not require any extra hardware (the on-board LPC-Link can is turned into a J-Link), we would recommend using it instead and will not do any more investigation into the OpenOCD bug. Let us know if you would like us the send you the board back.

    #11198

    JB_Lightcon
    Participant

    Keep the board – maybe we will need something from you in the future 😉

Viewing 13 posts - 16 through 28 (of 28 total)

You must be logged in to reply to this topic.