Content originally posted in LPCWare by frame on Tue Jun 21 12:45:54 MST 2011
I have a persisting debugging problem with a lpcxpresso 1769 board under Linux, specifically under OpenSuse11.2-x64. I've been searching
for similiar threads, and tried the hints, to no avail.
The source of problem seems to be the lpc-link.
After inserting the board, lsusb says:
[COLOR=Blue]localhost:/home/fm/dev/arm-lpc-code-red/bin # lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 009: ID 0471:df55 Philips
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
localhost:/home/fm/dev/arm-lpc-code-red/bin #[/COLOR]
Specifically, lsusb for the lpc-link:
[COLOR=Blue]localhost:/home/fm/dev/arm-lpc-code-red/bin # lsusb -v -s 002:009
Bus 002 Device 009: ID 0471:df55 Philips
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x0471 Philips
idProduct 0xdf55
bcdDevice 0.01
iManufacturer 0
iProduct 0
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 25
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 254 Application Specific Interface
bInterfaceSubClass 1 Device Firmware Update
bInterfaceProtocol 0
iInterface 0
Device Firmware Upgrade Interface Descriptor:
bLength 7
bDescriptorType 33
bmAttributes 1
Will Not Detach
Manifestation Intolerant
Upload Unsupported
Download Supported
wDetachTimeout 65535 milliseconds
wTransferSize 2048 bytes
Device Qualifier (for other device speed):
bLength 10
bDescriptorType 6
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
bNumConfigurations 1
Device Status: 0x0000
(Bus Powered)
localhost:/home/fm/dev/arm-lpc-code-red/bin #[/COLOR]
This seems normal to me. It is identified as DFU adaptor.
But is this normal ?
[COLOR=Blue]localhost:/home/fm/dev/arm-lpc-code-red/bin # crt_emu_cm3_nxp --info-emu --wire=winusb
Ni: LPCXpresso Debug Driver v2.0 (Apr 1 2011 10:54:24)
0 Emulators available:
localhost:/home/fm/dev/arm-lpc-code-red/bin #
[COLOR=Black]
Then, I download the firmware to the lpc-link, exactly as suggested in
another[/COLOR] [COLOR=Black]thread. I need to do this as root, not sure if this o.k.:
[COLOR=Blue]localhost:/home/fm/dev/arm-lpc-code-red/bin # dfu-util -d 0x471:0xdf55 -c 0 -t 2048 -R -D LPCXpressoWIN.enc
dfu-util - (C) 2007-2008 by OpenMoko Inc.
This program is Free Software and has ABSOLUTELY NO WARRANTY
Opening USB Device 0x0471:0xdf55...
Claiming USB DFU Runtime Interface...
Determining device status: state = dfuIDLE, status = 0
WARNING: Runtime device already in DFU state ?!?
Found Runtime: [0x0471:0xdf55] devnum=9, cfg=0, intf=0, alt=0, name="UNDEFINED"
Claiming USB DFU Interface...
Setting Alternate Setting ...
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
Transfer Size = 0x0800
bytes_per_hash=604
Starting download: [##################################################] finished!
state(8) = dfuMANIFEST-WAIT-RESET, status(0) = No error condition is present
Done!
can't detach: Broken pipe
Resetting USB to switch back to runtime mode
error resetting after download: No such file or directory
localhost:/home/fm/dev/arm-lpc-code-red/bin #[/COLOR]
Albeit the error message, this is identical to the thread mentioned, so
I guess no problem here.
Then, lsusb says:
[COLOR=Blue]localhost:/home/fm/dev/arm-lpc-code-red/bin # lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
[COLOR=Red]Bus 002 Device 010: ID 1fc9:0009[/COLOR]
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
localhost:/home/fm/dev/arm-lpc-code-red/bin #
[/COLOR]
And, specifically to this device:
[/COLOR][/COLOR][COLOR=Blue]localhost:/home/fm/dev/arm-lpc-code-red/bin # lsusb -v -s 002:010
Bus 002 Device 010: ID 1fc9:0009
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x1fc9
idProduct 0x0009
bcdDevice 1.00
[COLOR=Red] iManufacturer 1 Code Red Technologies
iProduct 2 LPC-Link Probe v1.1 [/COLOR]
iSerial 3 T1S6RGRIA
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 32
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 500mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 1
Device Qualifier (for other device speed):
bLength 10
bDescriptorType 6
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
bNumConfigurations 1
Device Status: 0x0000
(Bus Powered)
localhost:/home/fm/dev/arm-lpc-code-red/bin # lsusb[/COLOR]
It seems the firmware is downloaded properly.
Now I need to cycle power, because the device is 'busy' otherwise, and
when I try to start a debugging session, GDB times out.
However, after that, it is again a DFU adaptor, as before:
[COLOR=Blue]localhost:/home/fm/dev/arm-lpc-code-red/bin # lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
[COLOR=Red]Bus 002 Device 011: ID 0471:df55 Philips
[/COLOR]Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
localhost:/home/fm/dev/arm-lpc-code-red/bin # lsusb -v -s 002:011
Bus 002 Device 011: ID 0471:df55 Philips
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
[COLOR=Red] idVendor 0x0471 Philips
idProduct 0xdf55
[/COLOR] bcdDevice 0.01
iManufacturer 0
iProduct 0
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 25
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
[COLOR=Red] MaxPower 100mA
[/COLOR] Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 254 Application Specific Interface
[COLOR=Red] bInterfaceSubClass 1 Device Firmware Update
[/COLOR] bInterfaceProtocol 0
iInterface 0
Device Firmware Upgrade Interface Descriptor:
bLength 7
bDescriptorType 33
[COLOR=Lime]... (shortened, too much characters !)[/COLOR]
(Bus Powered)
localhost:/home/fm/dev/arm-lpc-code-red/bin #[/COLOR]
When I try to start a debug session, a message box "initializing LPC-Link v1.1" appears, superseeded by a timeout message box. I can opt to
show a boot log, but it's shortened to uselessness. I can see that it
tried to start dfu-util with the correct vendor/product id.
Finally I'm thrown out with a message box "Timeout waiting for LPC-link
v1.1 to initialize".
Finally, the same board (LPCXpresso) works fine under Windows, so
there is no hardware issue.
Can someone explain what am I doing wrong, and set me on the right track ?