LPCXpresso 7.8.0 Debug problem on Ubuntu 15.04

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

LPCXpresso 7.8.0 Debug problem on Ubuntu 15.04

404 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by safarmer on Sun Jun 07 03:06:52 MST 2015
Hi,

I recently upgraded my workstation to Ubuntu 15.04 64 bit from 14.10 64 bit. On the old install, debugging worked fine but after the upgrade I see the LPC link 2 initialise but then I get the message: 

Quote:
No compatible emulators available.
They may be disconnected, not powered, already in use or not compatible with this target



I am debugging a LPC11u67 with LPC-Link2. I also see the same behaviour with the LPC11U68 Xpresso v2 development board.

When I run dmesg, I get this from any time I try to debug my firmware:
[185328.257175] usb 1-1.3.3: new high-speed USB device number 79 using xhci_hcd
[185328.357688] usb 1-1.3.3: New USB device found, idVendor=1fc9, idProduct=0090
[185328.357694] usb 1-1.3.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[185328.357696] usb 1-1.3.3: Product: LPC-LINK2 CMSIS-DAP V5.112
[185328.357697] usb 1-1.3.3: Manufacturer: NXP Semiconductors
[185328.357699] usb 1-1.3.3: SerialNumber: A000000002
[185328.357923] xhci_hcd 0000:00:14.0: Not enough bandwidth. Proposed: 1668, Max: 1607
[185328.357927] xhci_hcd 0000:00:14.0: Not enough bandwidth
[185328.357937] usb 1-1.3.3: can't set config #1, error -12


I get the following from dmesg with the Xpresso board:
[185902.006445] usb 1-1.3.2: new high-speed USB device number 82 using xhci_hcd
[185902.142694] usb 1-1.3.2: New USB device found, idVendor=1fc9, idProduct=000c
[185902.142697] usb 1-1.3.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[185902.142698] usb 1-1.3.2: Product: LPC
[185902.142699] usb 1-1.3.2: Manufacturer: NXP
[185902.142700] usb 1-1.3.2: SerialNumber: ABCD
[185906.806726] usb 1-1.3.2: usbfs: USBDEVFS_CONTROL failed cmd dfu-util rqt 161 rq 3 len 6 ret -71
[185906.818018] usb 1-1.3.2: USB disconnect, device number 82
[185907.235730] usb 1-1.3.2: new high-speed USB device number 83 using xhci_hcd
[185907.372121] usb 1-1.3.2: New USB device found, idVendor=1fc9, idProduct=0090
[185907.372124] usb 1-1.3.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[185907.372126] usb 1-1.3.2: Product: LPC-LINK2 CMSIS-DAP V5.112
[185907.372128] usb 1-1.3.2: Manufacturer: NXP Semiconductors
[185907.372130] usb 1-1.3.2: SerialNumber: A000000002
[185907.372278] xhci_hcd 0000:00:14.0: Not enough bandwidth. Proposed: 1668, Max: 1607
[185907.372281] xhci_hcd 0000:00:14.0: Not enough bandwidth
[185907.372288] usb 1-1.3.2: can't set config #1, error -12


I have run through the install steps again to ensure that all the required packages are installed and all packages mentioned are installed. I have tried with both 7.7.2 and the new 7.8.0 version.

$ crt_emu_lpc11_13_nxp -info-emu -wire=swd
Ni: LPCXpresso Debug Driver v7.8 (May 28 2015 03:14:03 - crt_emu_lpc11_13_nxp build 181)
0 Emulators available:

$ ./boot_link2
/usr/local/lpcxpresso_7.8.0_426/lpcxpresso/bin/dfu_boot -s ./boot_link2 -n LPC-Link2 -v 0x1fc9:0x000c -i /usr/local/lpcxpresso_7.8.0_426/lpcxpresso/bin/../bin/LPC432x_CMSIS_DAP_V5_112.bin.hdr
Looking for DFU devices...
dfu-util -d 0x1fc9:0x000c -c 0 -i 0 -t 2048 -R -D /usr/local/lpcxpresso_7.8.0_426/lpcxpresso/bin/../bin/LPC432x_CMSIS_DAP_V5_112.bin.hdr
Booted LPC-Link2 (0x1fc9:0x000c) with /usr/local/lpcxpresso_7.8.0_426/lpcxpresso/bin/../bin/LPC432x_CMSIS_DAP_V5_112.bin.hdr


I have verified that everything works fine on my mac laptop and it was working immediately previous to the upgrade of Ubuntu. Has Ubuntu 15.04 been validated as a working host OS? Is there just a new package missing?

Cheers,
Shane
0 Kudos
8 Replies

321 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by safarmer on Sat Jun 27 13:39:46 MST 2015
After removing it, everything is working fine. Thanks for the help!

Cheers,
Shane
0 Kudos

321 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Sat Jun 27 11:29:48 MST 2015
I suggest you try removing it then - there is a good chance that trying to manually invoke the "debug stub" like this is clashing with the IDE's attempts to do the same!

Regards,
LPCXpresso Support
0 Kudos

321 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by safarmer on Sat Jun 27 10:28:10 MST 2015

Quote: lpcxpresso-support
It looks like you are using a .gdbinit file.


Thanks, that solved my problem. This was a long time carry over. It has been there so long I had forgotten about it. It had never caused a problem until now so it has stuck around. I no longer need this so it is gone.


Quote: lpcxpresso-support
1. Why?


From memory, I was trying to do some scripting work against the debug probe to load images.


Quote: lpcxpresso-support
2. What're are its contents?


$ cat .gdbinit                                         
target extended-remote | crt_emu_cm_redlink -g -2 -pLPC11U67 -vendor=NXP -vc -reset= -ProbeHandle=1 -CoreIndex=0 
-flash-driver=LPC11U6x_128K.cfx


Cheers,
-Shane
0 Kudos

321 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Fri Jun 26 09:14:17 MST 2015
It looks like you are using a .gdbinit file.
1. Why?
2. What're are its contents?
0 Kudos

321 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by safarmer on Thu Jun 25 21:17:44 MST 2015
Hi, Sorry for the delay. I have been away from my workstation and unable to get the traces until now.

772,858 2-list-thread-groups
772,858 2^done,groups=[{id="i1",type="process"}]
772,858 (gdb) 
776,340 3-gdb-version
776,341 ~"GNU gdb (GNU Tools for ARM Embedded Processors) 7.8.0.20150304-cvs\n"
776,341 ~"Copyright (C) 2014 Free Software Foundation, Inc.\n"
776,341 ~"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law.  Type \"show copying\"\nand \"show warranty\" for details.\n"
776,341 ~"This GDB was configured as \"--host=i686-linux-gnu --target=arm-none-eabi\".\nType \"show configuration\" for configuration details."
776,341 ~"\nFor bug reporting instructions, please see:\n"
776,342 ~"<http://www.gnu.org/software/gdb/bugs/>.\n"
776,342 ~"Find the GDB manual and other documentation resources online at:\n<http://www.gnu.org/software/gdb/documentation/>.\n"
776,342 ~"For help, type \"help\".\n"
776,342 ~"Type \"apropos word\" to search for commands related to \"word\".\n"
776,342 3^done
776,361 (gdb) 
776,362 4-environment-cd /home/shane/source/firmware
776,363 4^done
776,363 (gdb) 
776,363 5-gdb-set breakpoint pending on
776,363 5^done
776,363 (gdb) 
776,364 6-enable-pretty-printing
776,364 6^done
776,364 (gdb) 
776,364 7-gdb-set python print-stack none
776,364 7^done
776,365 (gdb) 
776,365 8-gdb-set print object on
776,365 8^done
776,365 (gdb) 
776,366 9-gdb-set print sevenbit-strings on
776,366 9^done
776,366 (gdb) 
776,366 10-gdb-set charset ISO-8859-1
776,367 10^done
776,367 (gdb) 
776,367 11source .gdbinit
776,368 &"source .gdbinit\n"
776,617 &"Ni: LPCXpresso RedlinkMulti Driver v7.8 (May 28 2015 03:21:31 - crt_emu_cm_redlink build 388)\n"
776,617 &"Pc: (  0) Reading remote configuration\n"
776,617 &"Pc: (  5) Remote configuration complete\n"
776,617 &"Nc: Probe Firmware: LPC-LINK2 CMSIS-DAP V5.112 (NXP Semiconductors)\n"
776,618 &"Nc: VID:PID:  1FC9:0090\n"
776,618 &"Nc: USB Path: /dev/hidraw5\n"
776,618 &"Wc: Vector catch on SYSRESETREQ signal\n"
776,618 &"Pc: ( 30) Emulator Connected\n"
776,618 &"Pc: ( 40) Debug Halt\n"
776,618 &"Pc: ( 50) CPU ID\n"
776,618 &"Nc: Emu(0): Conn&Reset. DpID: 0BC11477. CpuID: 410CC600. Info: (null)\n"
776,618 &"Nc: Debug protocol: SWD. RTCK: Disabled. Vector catch: Enabled.\n"
776,618 &"Nc: loaded v.2 On-chip Flash Memory LPC11U6x_128K.cfx\n"
776,618 &"Nc: image 'LPC11U6x/11E6x (128K Flash) May 21 2015 09:32:48'\n"
776,618 &"Pc: ( 65) Chip Setup Complete\n"
776,618 &"Nt: Connected: was_reset=true. was_stopped=false\n"
776,618 &"Cr:v LPCXpresso Free License - Download limit is 256K\n"
776,618 &"Pc: ( 70) License Check Complete\n"
776,618 &"Pc: ( 85) Registered Semihost Handler\n"
776,618 &"Pc: (100) Target Ready\n"
776,618 =thread-group-started,id="i1",pid="42000"
776,618 =thread-created,id="1",group-id="i1"
776,619 12-list-thread-groups --available
776,620 13-list-thread-groups
776,636 ~"0x00000244 in ?? ()\n"
776,636 *stopped,frame={addr="0x00000244",func="??",args=[]},thread-id="1",stopped-threads="all"
776,636 11^done
776,636 (gdb) 
776,637 12^error,msg="Can not fetch data now."
776,637 (gdb) 
776,637 13^done,groups=[{id="i1",type="process",pid="42000"}]
776,637 (gdb) 
776,638 14-gdb-set auto-solib-add on
776,638 14^done
776,638 (gdb) 
776,646 15-file-exec-and-symbols --thread-group i1 /home/shane/source/firmware/Release/firmware.axf
776,651 16-list-thread-groups i1
776,681 15^done
776,681 (gdb) 
776,682 16^done,threads=[{id="1",target-id="Thread <main>",frame={level="0",addr="0x00000244",func="Chip_Clock_GetWDTRate",args=[{name="reg",value="268450532"}],file="../src/main/cpp/external/lpcopen-11u6x/clock_11u6x.c",fullname="/home/shane/source/firmware/src/main/cpp/external/lpcopen-11u6x/clock_11u6x.c",line="71"},state="stopped"}]
776,682 (gdb) 
776,686 17-interpreter-exec console "set remotetimeout 60000"
776,687 =cmd-param-changed,param="remotetimeout",value="60000"
776,687 17^done
776,687 (gdb) 
776,889 18-target-select extended-remote | crt_emu_cm_redlink -msg-port=37006 -g -mi -2 -pLPC11U67 -vendor=NXP -vc -reset= -ProbeHandle=1 -CoreIndex=0 -flash-driver=LPC11U6x_128K.cfx
776,889 19-stack-info-depth --thread 1 11
776,889 =thread-exited,id="1",group-id="i1"
776,889 =thread-group-exited,id="i1"
776,893 20-gdb-exit
777,006 =thread-group-started,id="i1",pid="42000"
777,006 =thread-created,id="1",group-id="i1"
777,006 21-list-thread-groups --available
777,017 ~"Chip_Clock_GetWDTRate (reg=268450532) at ../src/main/cpp/external/lpcopen-11u6x/clock_11u6x.c:71\n"
777,017 ~"71\t\tclk = (CHIP_WDTLFO_OSC_T) ((reg >> 5) & 0xF);\n"
777,017 *stopped,frame={addr="0x00000244",func="Chip_Clock_GetWDTRate",args=[{name="reg",value="268450532"}],file="../src/main/cpp/external/lpcopen-11u6x/clock_11u6x.c",fullname="/home/shane/source/firmware/src/main/cpp/external/lpcopen-11u6x/clock_11u6x.c",line="71"},thread-id="1",stopped-threads="all"
777,018 18^connected
777,018 (gdb) 
777,090 19^done,depth="5"
777,090 (gdb) 
777,090 =thread-exited,id="1",group-id="i1"
777,090 =thread-group-exited,id="i1"


Cheers,
-Shane
0 Kudos

321 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Mon Jun 08 00:19:00 MST 2015
Please try remove all of your breakpoints and debug again. If that does not work, please post the contents of the "gdb traces" console.

Also, please try using the "non-bridged" probe as discussed in my first reply.
0 Kudos

321 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by safarmer on Sun Jun 07 16:35:25 MST 2015
Thanks. I have plugged into a USB3.0 port and the problem has gone away.

Now I am able to find my probe, but when I debug on 7.8.0 the image terminates before hitting main. I have verified that things still work on 7.7.2. I have also tried all of the options in the article linked regarding soft loading the LPC-Link2 firmware. I can load a new empty C++ project, but I cannot load my existing firmware.

When I load an empty project:
LPCXpresso RedlinkMulti Driver v7.8 (May 28 2015 03:21:31 - crt_emu_cm_redlink build 388)
Probe Firmware: LPC-LINK2 CMSIS-DAP V5.112 (NXP Semiconductors)
VID:PID:  1FC9:0090
USB Path: /dev/hidraw6
Vector catch on SYSRESETREQ signal
Emu(0): Conn&Reset. DpID: 0BC11477. CpuID: 410CC600. Info: (null)
Debug protocol: SWD. RTCK: Disabled. Vector catch: Enabled.
loaded v.2 On-chip Flash Memory LPC11U6x_128K.cfx
image 'LPC11U6x/11E6x (128K Flash) May 21 2015 09:32:48'
Connected: was_reset=false. was_stopped=true
LPCXpresso Free License - Download limit is 256K
Writing 15876 bytes to address 0x00000000 in Flash
Progress meter completed at over 100% (16384/15876 bytes)
Erased/Wrote page  0-3 with 15876 bytes in 322msec
Flash Write Done
Flash Program Summary: 15876 bytes in 0.32 seconds (48.15 KB/sec)
Stopped (Was Reset)  [Reset from Unknown]
Stopped: Breakpoint #1


When I load my firmware:

LPCXpresso RedlinkMulti Driver v7.8 (May 28 2015 03:21:31 - crt_emu_cm_redlink build 388)
Probe Firmware: LPC-LINK2 CMSIS-DAP V5.112 (NXP Semiconductors)
VID:PID:  1FC9:0090
USB Path: /dev/hidraw6
Vector catch on SYSRESETREQ signal
Emu(0): Conn&Reset. DpID: 0BC11477. CpuID: 410CC600. Info: (null)
Debug protocol: SWD. RTCK: Disabled. Vector catch: Enabled.
loaded v.2 On-chip Flash Memory LPC11U6x_128K.cfx
image 'LPC11U6x/11E6x (128K Flash) May 21 2015 09:32:48'
Connected: was_reset=false. was_stopped=true
LPCXpresso Free License - Download limit is 256K
(crt_emu_cm_redlink) terminating due to request from GDB


GNU gdb (GNU Tools for ARM Embedded Processors) 7.8.0.20150304-cvs
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=i686-linux-gnu --target=arm-none-eabi".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
0x0000652a in ?? ()


The exact same project works fine in 7.7.2. What would I be missing?

Cheers,
- Shane
0 Kudos

321 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Sun Jun 07 05:40:53 MST 2015
With LPCXpresso 7.7.2 (and beyond) we Introduced SWO Trace support, using LPC-Link2. This support adds more endpoints to the LPC-Link2 device, resulting in potential additional bandwidth requirements on the USB driver. The driver publishes the bandwidth requirements for each end point, and the host sums these, to produce the *maximum* bandwidth that the driver may require and tries to reserve this bandwidth on the system.

If a USB hub is unable to support the maximum bandwidth of ALL devices connected to the hub, the system will refuse to load the driver. Note: in practice, the maximum bandwidth is not used, however this is irrelevant.

To resolve this issue you can:
- try connecting to a different USB port on your computer
- use the 'non-bridged' versions of the LPC-Link2 firmware (version that supports Debug only as does not have the additional endpoints for supporting SWO Trace) - basically the version from versions prior to v7.7.2. For information on this see:
http://www.lpcware.com/content/faq/lpcxpresso/configuring-lpc-link2-firmware-soft-load
0 Kudos