Sysprogs forums › Forums › VisualGDB › OpenOCD and LPC1549 issues
- This topic has 27 replies, 2 voices, and was last updated 7 years, 11 months ago by
JB_Lightcon.
-
AuthorPosts
-
April 20, 2017 at 09:01 #11038
JB_Lightcon
ParticipantTo 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…
April 22, 2017 at 04:44 #11053support
KeymasterHi,
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)?
April 25, 2017 at 08:53 #11072JB_Lightcon
ParticipantFirst 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 😉
April 26, 2017 at 04:45 #11074support
KeymasterHi,
No problem, this should help us diagnose it quickly. Please contact us via the support form on our website to arrange the shipping.
April 27, 2017 at 15:37 #11084JB_Lightcon
ParticipantFilled the form – will wait for response.
April 27, 2017 at 17:35 #11089support
KeymasterHi,
Thanks, we have replied with the address.
May 8, 2017 at 13:21 #11175JB_Lightcon
ParticipantHave you received test board? Any progress?
May 8, 2017 at 17:00 #11176support
KeymasterHi,
Yes, we have published a detailed tutorial last week: https://visualgdb.com/tutorials/arm/mbed/lpc1549/
May 9, 2017 at 15:15 #11186JB_Lightcon
ParticipantNice. Since you got it up and running, any possibilities to make it work with OpenOCD?
May 9, 2017 at 19:19 #11187support
KeymasterHi,
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.
May 10, 2017 at 07:18 #11194JB_Lightcon
ParticipantI 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….
May 10, 2017 at 19:23 #11197support
KeymasterNo 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.
May 11, 2017 at 07:44 #11198JB_Lightcon
ParticipantKeep the board – maybe we will need something from you in the future 😉
-
AuthorPosts
- You must be logged in to reply to this topic.