Sysprogs forums › Forums › VisualGDB › Problem debugging MBED LPC1768
- This topic has 8 replies, 2 voices, and was last updated 6 years, 8 months ago by cvrtky.
-
AuthorPosts
-
March 17, 2018 at 15:19 #20449cvrtkyParticipant
Hello Sysprogs
I’m working on the above board.
When I set up a project, I test the connection in the project properties -> debugger settings and it checks out OK, as shown in the attachment.
Initialising a debug session is a bit slow. It finally locks up trying to erase the flash as shown in the other attachment.Please advice. For the record debugging the board using CrossWorks 4.1.1 by Rowley works flawlessly.
Sincerely
Tim BørresenAttachments:
You must be logged in to view attached files.March 17, 2018 at 17:29 #20452supportKeymasterHi,
Thanks, this looks like an OpenOCD bug. Unfortunately OpenOCD’s support for NXP LPC FLASH programming is a bit flaky. As a workaround please try using Segger J-Link with the Segger GDB stub – it’s much more reliable and faster.
March 18, 2018 at 00:38 #20455cvrtkyParticipantSWDIO and SWCLK aren’t broken out to a connector on the original LPC1768 based MBED board. Those pins (pins 3 & 5) are connected to an onboard debugger IC.
Are you suggesting I solder wires directly onto the MuC?
/Tim
March 18, 2018 at 01:05 #20456supportKeymasterHi,
Actually Segger provides their firmware for some of the LPC boards that turns the on-board LPC-Link into a limited version of a J-Link that works with their software. We would advise trying that first before doing any changes to the board.
March 18, 2018 at 10:08 #20458cvrtkyParticipantHello again.
Just in case this is the board in question: https://os.mbed.com/platforms/mbed-LPC1768/.
On the SEGGER site, I find J-link firmware for the LPC-Link2/3 and OpenSDA. Neither are suited for the above board. At least not directly. The board has a chip only labeled “MBED interface” which I presume is the MBED DAP-LINK debugger. The only other chips on the board are the LPC1768 itself, an Atmel EEPROM and the Ethernet PHY.
Please advice.
Cheers
TimMarch 19, 2018 at 02:00 #20464supportKeymasterHi,
Thanks for checking this. Soldering the wires to the board could be risky and might end up breaking the board (or even your PC), so we cannot advise doing it unless you are OK with the risk.
Another option would be to try using PyOCD instead of OpenOCD. PyOCD is a part of mbed and should be well-integrated with mbed boards and debug interfaces. We have published a detailed tutorial showing how to setup PyOCD with VisualGDB: https://visualgdb.com/tutorials/arm/pyocd/
March 19, 2018 at 19:25 #20474cvrtkyParticipantHello again
I tried following your tutorial. I wasn’t success full. I might have found a new bug.
I can flash the lpc1768 and pyocd-gdbserver connects w.o. complaining to much. See below.C:\VisualGDB\lpc1678\lpc1678\Debug
(PyOCD) λ C:\VirtualEnvs\PyOCD\Scripts\pyocd-gdbserver.exe -t lpc1768
INFO:root:DAP SWD MODE initialised
INFO:root:ROM table #0 @ 0xe00ff000 cidr=b105100d pidr=0
INFO:root:[0]<e000e000: cidr=b105e00d, pidr=4002bb000, class=14>
WARNING:root:Invalid coresight component, cidr=0x0
INFO:root:[1]<e0001000: cidr=0, pidr=0, component invalid>
INFO:root:[2]<e0002000:FPB cidr=b105e00d, pidr=4002bb003, class=14>
WARNING:root:Invalid coresight component, cidr=0x0
INFO:root:[3]<e0000000: cidr=0, pidr=0, component invalid>
WARNING:root:Invalid coresight component, cidr=0x0
INFO:root:[4]<e0040000: cidr=0, pidr=0, component invalid>
INFO:root:[5]<e0041000: cidr=b105900d, pidr=4002bb924, class=9, devtype=13, devid=0>
INFO:root:CPU core is Cortex-M3
INFO:root:6 hardware breakpoints, 4 literal comparators
INFO:root:4 hardware watchpoints
INFO:root:Telnet: server started on port 4444
INFO:root:GDB server started at port:3333
INFO:root:Telnet: server stoppedWhen I try to connect from VisualGDB the error as shown in the attachment. As shown in the other attachment the path to pyocd-gdbserver.exe is correct.
It looks to me as if the macro holding the port number isn’t expanded correctly.Please advice.
Sincerely
Tim BørresenAttachments:
You must be logged in to view attached files.March 19, 2018 at 20:12 #20477supportKeymasterHi,
No problem, please try this build: http://sysprogs.com/files/tmp/VisualGDB-5.4.1.2095.msi. You will need to change any setting (e.g. port number) on the Settings page in order to save the settings with all variables present (newly created projects won’t need this as long as you are using the new build).
March 19, 2018 at 22:42 #20478cvrtkyParticipantIt’s working now. Excellent 🙂 !!!
Thank you.Cheers
Tim -
AuthorPosts
- You must be logged in to reply to this topic.