Problem deebugging LPCOpen project

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Problem deebugging LPCOpen project

865 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by kagestodder on Wed May 13 03:38:05 MST 2015
Hi everyone,

I just received a lpc1769 a few days ago and have been eager do some programming on it. I have only worked on old pic processors in the past, so i am completely new to the lpcxpresso ide. I thought it would be easiest to download the lpcopen projects and get some of them running, in order to learn the basics.

I am able to build all of the projects, but when trying to debug them on my board i do not get any response.

I press build. Press debug. A pop-up asks me what debugger i want to use, i click the only one available, which i assume is my connected board. When its done loading nothing happens. In the console there is no text, and above it is a label "<terminated> project name Debug messages". When clicking the problems tab i have no errors.

I tried several led blinky projects nothing. Even if the projects dont give me a visual output on the board shouldn't there at least be some text in the console telling me the program was debugged successfully?

I hope you are able to help a newbie in distress.

Best Regards
Labels (1)
0 Kudos
17 Replies

793 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by TheFallGuy on Fri Jun 05 13:37:46 MST 2015
Try removing all of your breakpoints before starting the debug session.

If that solves the problem, remove the --Gcc-sections option from the linked options, rebuild, and debug again. See this thread for more info
http://www.lpcware.com/content/forum/gcb-error#comment-1141694
0 Kudos

793 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by kagestodder on Fri Jun 05 12:20:32 MST 2015
Troubleshooting didn't work.

Once after restart i got the periph_blinky debugged and it worked. But it only worked once!

Trying to build and debug the same project or other projects result in exactly the same errors as posted in the first posts. I get the same messages in the OS X terminal as before.

859,706 2-gdb-version
859,706 ~"GNU gdb (GNU Tools for ARM Embedded Processors) 7.8.1.20141128-cvs\n"
859,707 ~"Copyright (C) 2014 Free Software Foundation, Inc.\n"
859,707 ~"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\nThis is fre\
e software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitt\
ed by law.  Type \"show copying\"\nand \"show warranty\" for details.\n"
859,707 ~"This GDB was configured as \"--host=x86_64-apple-darwin10 --target=arm-none-eabi\".\nType \
\"show configuration\" for configuration details."
859,707 ~"\nFor bug reporting instructions, please see:\n"
859,707 ~"<http://www.gnu.org/software/gdb/bugs/>.\n"
859,707 ~"Find the GDB manual and other documentation resources online at:\n<http://www.gnu.org/soft\
ware/gdb/documentation/>.\n"
859,707 ~"For help, type \"help\".\n"
859,708 ~"Type \"apropos word\" to search for commands related to \"word\".\n"
859,708 2^done
859,708 (gdb) 
859,709 3-environment-cd /Users/lukaskragh/Documents/Lpc/test12/periph_blinky
859,709 3^done
859,709 (gdb) 
859,710 4-gdb-set breakpoint pending on
859,710 4^done
859,710 (gdb) 
859,711 5-enable-pretty-printing
859,712 5^done
859,712 (gdb) 
859,712 6-gdb-set python print-stack none
859,713 6^done
859,713 (gdb) 
859,713 7-gdb-set print object on
859,714 7^done
859,714 (gdb) 
859,715 8-gdb-set print sevenbit-strings on
859,715 8^done
859,715 (gdb) 
859,716 9-gdb-set charset ISO-8859-1
859,716 9^done
859,716 (gdb) 
859,717 10-gdb-set auto-solib-add on
859,718 10^done
859,718 (gdb) 
859,735 11-file-exec-and-symbols --thread-group i1 /Users/lukaskragh/Documents/Lpc/test12/periph_bli\
nky/Debug/periph_blinky.axf
859,739 11^done
859,740 (gdb) 
859,749 12-interpreter-exec console "set remotetimeout 60000"
859,749 =cmd-param-changed,param="remotetimeout",value="60000"
859,750 12^done
859,750 (gdb) 
859,752 13-target-select extended-remote | crt_emu_cm3_nxp -msg-port=49442 -g -mi -2 -pLPC1769 -vend\
or=NXP -e0 -wire=winUSB -flash-driver=LPC175x_6x_512.cfx
859,760 13^error,msg="Remote connection closed"
859,760 (gdb) 
859,761 14-gdb-exit
859,762 14^exit


Best Regards
0 Kudos

793 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Mon May 18 03:39:39 MST 2015
OK, so that shows that the debugger can identify your booted debug probe correctly.

I presume at this point, if you try to start a debug connection - you see the same problem that you reported originally?

This all works fine here for me (I'm using Mac OS X 10.10.3 rather than 10.10.2, though I can't see that making any difference).

At this point I would suggest running through the troubleshooting suggestions from:

http://www.lpcware.com/content/faq/lpcxpresso/booting-lpc-link

If that still doesn't get you going, then please enter the following command in your terminal window and post the output (showing what USB devices you have connected). Please also confirm the model details of your Mac.

system_profiler SPUSBDataType

Regards,
LPCXpresso Support

0 Kudos

793 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by kagestodder on Mon May 18 02:10:55 MST 2015
Oh damn, sorry about that.

Here it is:
Ni: LPCXpresso Debug Driver v7.7 (Mar 31 2015 21:07:36 - crt_emu_cm3_nxp build 93)
1 Emulators available:
0. LPCLINKLPC-Link Driver MACOSX32 v2.0 (NXP - LPC-Link)



Best Regards
0 Kudos

793 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Mon May 18 00:26:33 MST 2015

Quote: kagestodder

crt_emu_cm3_nxp -info-emu -wire=winsub
Ni: LPCXpresso Debug Driver v7.7 (Mar 31 2015 21:07:36 - crt_emu_cm3_nxp build 93)
0 Emulators available:


Best regards



Try : crt_emu_cm3_nxp -info-emu -wire=winusb

Regards,
LPCXpresso Support

0 Kudos

793 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by kagestodder on Sat May 16 11:56:22 MST 2015

Quote: lpcxpresso-support
When you posted the debug logs, you showed the debug driver (crt_emu_cm3_nxp) running (by communicating with LPC-Link1) and then crashing.

When you posted the results of the commands that I asked you to run, it could not find LPC-Link1. So, you need to connect LPC-Link1 and then run the commands I asked you to run. This will load the debug firmware into LPC-Link1 and then ensure that the debug driver can talk to it.



Okay i tried reconnecting the device again and this time it seems i got another result from boot_link1

boot_link1
Looking for DFU devices...
dfu-util -d 0x0471:0xdf55 -c 0 -i 0 -t 2048 -R -D /Applications/lpcxpresso_7.7.2_379/lpcxpresso/bin/LPCXpressoWIN.enc
Booted LPC-Link (0x0471:0xdf55) with /Applications/lpcxpresso_7.7.2_379/lpcxpresso/bin/LPCXpressoWIN.enc


crt_emu_cm3_nxp -info-emu -wire=winsub
Ni: LPCXpresso Debug Driver v7.7 (Mar 31 2015 21:07:36 - crt_emu_cm3_nxp build 93)
0 Emulators available:


Best regards
0 Kudos

793 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Thu May 14 07:28:36 MST 2015
When you posted the debug logs, you showed the debug driver (crt_emu_cm3_nxp) running (by communicating with LPC-Link1) and then crashing.

When you posted the results of the commands that I asked you to run, it could not find LPC-Link1. So, you need to connect LPC-Link1 and then run the commands I asked you to run. This will load the debug firmware into LPC-Link1 and then ensure that the debug driver can talk to it.
0 Kudos

793 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by kagestodder on Thu May 14 06:55:43 MST 2015
Oh but i did what you Said. The LED on the board is blinking. I tryed connecting to differnet USB ports with the same result.

Best Regards
0 Kudos

793 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Thu May 14 01:46:47 MST 2015
So, you haven't connected your device. Please connect it and try again...
0 Kudos

793 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by kagestodder on Thu May 14 01:41:17 MST 2015
boot_link1:
Last login: Thu May 14 10:17:21 on ttys000
Lukass-MacBook-Pro:~ lukaskragh$ /Applications/lpcxpresso_7.7.2_379/lpcxpresso/bin/boot_link1 ; exit;
Looking for DFU devices...
No bootable LPC-Link found
logout
[Proces udført]


crt_emu_cm3_nxp -info-emu -wire=winusb

Ni: LPCXpresso Debug Driver v7.7 (Mar 31 2015 21:07:36 - crt_emu_cm3_nxp build 93)
0 Emulators available:
 


The above are the results.

Best Regards
0 Kudos

793 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Wed May 13 07:39:22 MST 2015
It would really help if you could place place code markers (the # button on the editor toolbar) around your logs.

Anyway, it looks like the debug driver has crashed, which explains what you are seeing. It is not an issue we have seen before. Could you try the following:
0. disconnect and reconnect your LPCXpresso board
1. open a command prompt and cd to the LPCXpresso 'bin' directory
2. run 'boot_link1'
3. run 'crt_emu_cm3_nxp -info-emu -wire=winusb'

and report the results
0 Kudos

793 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by kagestodder on Wed May 13 07:30:29 MST 2015

Quote: R2D2

Quote: kagestodder
So i am using the embedded artist lpc1769 expresso board. It comes with a JTAG debugger



LPC1769 Expresso board is using LPC-link with SWD  :O


Quote: kagestodder
I tried running the perish_blinky, the perish_systick and the ferrets_blinky. All with the same result.



:quest:

I would suggest to start with 'periph_blinky'...


Quote: kagestodder
I am running this on OS X Yosemite 10.10.2 and with the LPCXpresso version 7.7.2 [Build 379].



If there are no debug messages, your debugger isn't working, probably because Debug probe wasn't found...



Hi R2D2 thanks for your reply

Sorry my webbrowser wants to autocorrect my words. It isn't doing a good job.

Okay if that is the case what would be the correct protocol for correcting it?

Best Regards
0 Kudos

793 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by kagestodder on Wed May 13 06:37:20 MST 2015

Quote: lpcxpresso-support
Please provide a *detailed* list of what you did and what messages your received (including which Debug probe is found). Also take a look at the Debug Log:
http://www.lpcware.com/content/faq/lpcxpresso/debug-log
and post its contents.



Alright.

I plug the board to my computer with a usb cable. I open lpcxpresso in a clean workspace. Then i click import project(s). I import the entire lpcopen folder for the lpcxpresso 1769. All projects are visible in the folder. I mark the periph_blinky project. I press the hammer which says build periph_blinky. The project i now built, no errors. I press the green bug that says Debug periph_blinky. A pop-up asks me what emulator i want to connect to. Only one shows. Emulator family: LPC-Link v1.1. Name: LPC-Link Driver MACOSX32 v2.0. Serial number: LPCLINK.

I press "ok". It continues and the console is blank.

3. Redlinkserver:
[Started server]
[Connected on port 3025]
redlink>ProbeList
No probes found
redlink>ProbeList
No probes found
redlink>ProbeStatus
redlink>exit
[Closed]

4. <terminated> periph_blinky Debug [C/C++(NXP Semiconductors) MCU Application] gdb traces
902,413 2-gdb-version
902,414 ~"GNU gdb (GNU Tools for ARM Embedded Processors) 7.8.1.20141128-cvs\n"
902,415 ~"Copyright (C) 2014 Free Software Foundation, Inc.\n"
902,415 ~"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\nThis is fre\
e software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitt\
ed by law.  Type \"show copying\"\nand \"show warranty\" for details.\n"
902,415 ~"This GDB was configured as \"--host=x86_64-apple-darwin10 --target=arm-none-eabi\".\nType \
\"show configuration\" for configuration details."
902,416 ~"\nFor bug reporting instructions, please see:\n"
902,416 ~"<http://www.gnu.org/software/gdb/bugs/>.\n"
902,416 ~"Find the GDB manual and other documentation resources online at:\n<http://www.gnu.org/soft\
ware/gdb/documentation/>.\n"
902,416 ~"For help, type \"help\".\n"
902,416 ~"Type \"apropos word\" to search for commands related to \"word\".\n"
902,416 2^done
902,416 (gdb)
902,417 3-environment-cd /Users/lukaskragh/Documents/Lpc/test9/periph_blinky
902,418 3^done
902,418 (gdb)
902,419 4-gdb-set breakpoint pending on
902,419 4^done
902,419 (gdb)
902,420 5-enable-pretty-printing
902,421 5^done
902,421 (gdb)
902,421 6-gdb-set python print-stack none
902,422 6^done
902,422 (gdb)
902,422 7-gdb-set print object on
902,423 7^done
902,423 (gdb)
902,424 8-gdb-set print sevenbit-strings on
902,424 8^done
902,424 (gdb)
902,425 9-gdb-set charset ISO-8859-1
902,425 9^done
902,425 (gdb)
902,426 10-gdb-set auto-solib-add on
902,426 10^done
902,426 (gdb)
902,444 11-file-exec-and-symbols --thread-group i1 /Users/lukaskragh/Documents/Lpc/test9/periph_blin\
ky/Debug/periph_blinky.axf
902,458 11^done
902,458 (gdb)
902,469 12-interpreter-exec console "set remotetimeout 60000"
902,470 =cmd-param-changed,param="remotetimeout",value="60000"
902,471 12^done
902,471 (gdb)
902,472 13-target-select extended-remote | crt_emu_cm3_nxp -msg-port=57127 -g -mi -2 -pLPC1769 -vend\
or=NXP -e0 -wire=winUSB -flash-driver=LPC175x_6x_512.cfx
906,697 13^error,msg="Remote connection closed"
906,697 (gdb)
906,699 14-gdb-exit
906,700 14^exit

6. <terminated> periph_blinky Debug messages
-

I hope this helps, let me know if you need anything else.

Best Regards
0 Kudos

793 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Wed May 13 06:02:51 MST 2015

Quote: kagestodder
So i am using the embedded artist lpc1769 expresso board. It comes with a JTAG debugger



LPC1769 Expresso board is using LPC-link with SWD  :O


Quote: kagestodder
I tried running the perish_blinky, the perish_systick and the ferrets_blinky. All with the same result.



:quest:

I would suggest to start with 'periph_blinky'...


Quote: kagestodder
I am running this on OS X Yosemite 10.10.2 and with the LPCXpresso version 7.7.2 [Build 379].



If there are no debug messages, your debugger isn't working, probably because Debug probe wasn't found...
0 Kudos

793 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Wed May 13 05:53:39 MST 2015
Please provide a *detailed* list of what you did and what messages your received (including which Debug probe is found). Also take a look at the Debug Log:
http://www.lpcware.com/content/faq/lpcxpresso/debug-log
and post its contents.
0 Kudos

793 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by kagestodder on Wed May 13 05:40:23 MST 2015
Hey R2D2 thanks for your reply

Oh dammit, i am sorry!

So i am using the embedded artist lpc1769 expresso board. It comes with a JTAG debugger.

I tried running the perish_blinky, the perish_systick and the ferrets_blinky. All with the same result.

I am running this on OS X Yosemite 10.10.2 and with the LPCXpresso version 7.7.2 [Build 379].

I did watch most of the video although i thought better of the quick start guides that i found, from a newbies perspective.

Best Regards
0 Kudos

793 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Wed May 13 04:02:57 MST 2015

Quote: kagestodder
I just received a lpc1769...



A naked 1769  :D

Which board / debugger are you using?

Which sample in detail?

Which OS / LPCXpresso Version?

Did you watch the video: http://www.lpcware.com/lpcxpresso
0 Kudos