LPC-Link & LPC1343 fails

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

LPC-Link & LPC1343 fails

724 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by DarkVeg on Tue Mar 01 11:37:05 MST 2011
Hi

I am running 32bit Windows7 and LPCXpresso v3.6.2 [Build 279] [29/01/2011]

cscript appears to be installed:

[FONT=Courier New]D:\nxp\lpcxpresso_3.6\bin>cscript
Microsoft (R) Windows Script Host Version 5.8
Copyright (C) Microsoft Corporation. All rights reserved.
[/FONT]
I have an EA LPC1343 Quick Start board connected to my LPC-Link. The DFU download to the LPOC-Link works, I think, but I get an error trying to start the debugger. A dialog box pops up

Error launchin Debug\<project>.axf
02: Failed on connect: Ee(07). Bad ACK returned from status - wire error.:

The console window shows:

[FONT=Courier New]34 set remotetimeout 60000
&"set remotetimeout 60000\n"
34^done
(gdb)
35 target extended-remote | crt_emu_lpc11_13_nxp -g -mi -4   -pLPC1343  -wire=hid -msg-port=54552
&"target extended-remote | crt_emu_lpc11_13_nxp -g -mi -4   -pLPC1343  -wire=hid -msg-port=54552\n"
&"Pc: (  0) Reading remote configuration\n"
&"Remote communication error: No error.\n"
35^error,msg="Remote communication error: No error."
(gdb)
36-gdb-exit
36^exit
[/FONT]

Any help would be apreciated
0 Kudos
15 Replies

684 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by danielalsanta on Tue Nov 29 09:51:04 MST 2011
Hello,

I had the same problems. I have an LPCXpresso board that I cut it in order to have only teh LPC Link. Connected as a target I use the EA LPC1343 Quick Start board. I run Windows 7 64bit. I had LPCXpresso 4.0.5_123

1. I tried the script that was mentioned before and the problem only became worst. It gave me other problems stating that

crt_emu_lpc11_13_nxp.exe -wire=winusb -info-emu was not a win32 application.

When i tried everything else in IDE the computer was not even able to connect to the LPC link.

I unistalled the drivers for the LPCLink, uninstalled LPCXpresso IDE, and reinstalled the newest version 4.1.0_190

Then I changed the option in the debugger options in the launch configurations to a blank, and finally everything works!!
0 Kudos

684 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by LTTechPL on Mon Jul 25 16:31:12 MST 2011

Quote: CodeRedSupport
especially: http://support.code-red-tech.com/CodeRedWiki/DebugAccessChip

Nice advice, but as seen earlier, erase fails... ;)
0 Kudos

684 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by octavsly on Mon Jul 25 08:32:43 MST 2011

Quote: CodeRedSupport
It would have saved a lot of time if you had mentioned this to start with... it MUST be due to a problem with your board, and we are wasting out time looking at problems with your LPCXpresso installation.

If you can't recover your board using one of the following techniques, then I suggest you discard the board and get another one.

See
Debug Target Connections: http://support.code-red-tech.com/CodeRedWiki/CodeRedFAQ#DebugConnection
and especially: http://support.code-red-tech.com/CodeRedWiki/DebugAccessChip


:-) I only have two boards. I was hoping that there is something wrong with my set-up.
What if the second (aka last board) starts exhibiting the same behavior?

Thanks for your links. I was aware of some of them.
0 Kudos

684 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Mon Jul 25 06:01:25 MST 2011

Quote: octavsly
Before I answer the questions I should mention that I have [B]another[/B] identical board for which I have no issue.



It would have saved a lot of time if you had mentioned this to start with... it MUST be due to a problem with your board, and we are wasting out time looking at problems with your LPCXpresso installation.

If you can't recover your board using one of the following techniques, then I suggest you discard the board and get another one.

See
Debug Target Connections: http://support.code-red-tech.com/CodeRedWiki/CodeRedFAQ#DebugConnection
and especially: http://support.code-red-tech.com/CodeRedWiki/DebugAccessChip
0 Kudos

684 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by octavsly on Mon Jul 25 05:36:44 MST 2011
Before I answer the questions I should mention that I have [B]another[/B] identical board for which I have no issue.


Quote:
Can you tell us which distro, and version of Linux you are running?    

Gentoo. Latest (two weeks behind)


Quote:

Also, which board are you trying to connect? Is it an LPCXpresso board,  or a custom board?    

I am using an LPCXpresso LPC1343 REV A.
[B]No[/B] custom board.


Quote:

Are you using the Embedded Artists baseboard? How are  you connecting it to your PC?    

See the board at http://195.241.111.6/LPCXpresso_1343.JPG
Sorry for the bad quality. The picture is taken fast with a colleague's phone.
I am connecting using USB.


Quote:
In correct configured system you don't need root's account to boot LPCLink, erase/program target. Maybe it can help :

I have used root to eliminate any source of uncertainty. As far as I see the setuid is set anyway on the dfu-util executable.
0 Kudos

684 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by LTTechPL on Mon Jul 25 03:42:15 MST 2011
In correct configured system you don't need root's account to boot LPCLink, erase/program target. Maybe it can help :
http://knowledgebase.nxp.com/showpost.php?p=10445&postcount=15
Also in SELinux you must set permisive mode (setenforce for set/getenforce for info).
If you use cut-off LPC Link, it can be bad wiring problem...
0 Kudos

684 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by LTTechPL on Mon Jul 25 03:19:59 MST 2011

Quote: octavsly
And trying to flash it again
pc67247005 bin # ./crt_emu_lpc11_13_nxp  -wire=winusb  -flash-mass
Ni: LPCXpresso Debug Driver v2.0 (Oct 27 2010 16:01:27)
GetModuleFileName path == /usr/local/LPCXpresso/bin/crt_emu_lpc11_13_nxp
Nc: Looked for vendor directory XML file in /usr/local/LPCXpresso/bin/nxp_directory.xml

Nc: Found generic directory XML file in /usr/local/LPCXpresso/bin/crt_directory.xml

Ed:02: Failed on connect: Ee(02). Not connected to emulator.
Et: Emu(0): Connected. Was: None. DpID:     EDB6. Info: LPCLINK_1_1
Error 0: (null)
Last sticky: 0. AIndex: 0
No MemAp selected
No Speed test
SWD Frequency: 50 KHz. RTCK: False. Vector catch: False.
Packet delay: 0  Poll delay: 0.

Where you do LPCLink boot ? (dfu-utill) http://support.code-red-tech.com/CodeRedWiki/CommandLineFlashProgramming
0 Kudos

684 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Mon Jul 25 01:25:26 MST 2011
Can you tell us which distro, and version of Linux you are running?
Also, which board are you trying to connect? Is it an LPCXpresso board, or a custom board? Are you using the Embedded Artists baseboard? How are you connecting it to your PC?
0 Kudos

684 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by octavsly on Mon Jul 25 00:46:23 MST 2011
Here is the requested info using LPCXpresso-Linux-x86-3.7.5.100

pc67247005 ~ # ldd /usr/local/LPCXpresso/bin/crt_emu_lpc11_13_nxp
        linux-gate.so.1 =>  (0xb78dc000)
        libgdb_remote_lpc11_13_nxp.so => /usr/lib/libgdb_remote_lpc11_13_nxp.so (0xb7871000)
        libchip_flash_lpc11_13_nxp.so => /usr/lib/libchip_flash_lpc11_13_nxp.so (0xb782c000)
        libproc_cm3.so => /usr/lib/libproc_cm3.so (0xb77ea000)
        libelf.so => /usr/lib/libelf.so (0xb77e4000)
        libdl.so.2 => /lib/libdl.so.2 (0xb77df000)
        libpthread.so.0 => /lib/libpthread.so.0 (0xb77c6000)
        libstdc++.so.6 => /usr/lib/gcc/i686-pc-linux-gnu/4.4.5/libstdc++.so.6 (0xb76d2000)
        libm.so.6 => /lib/libm.so.6 (0xb76ac000)
        libgcc_s.so.1 => /usr/lib/gcc/i686-pc-linux-gnu/4.4.5/libgcc_s.so.1 (0xb7690000)
        libc.so.6 => /lib/libc.so.6 (0xb7535000)
        /lib/ld-linux.so.2 (0xb78c0000)
pc67247005 ~ # ~/bin/lpc 
LPCLink Bootless Found:"Bus 001 Device 016: ID 0471:df55 Philips (or NXP) LPCXpresso LPC-Link"
         Bus/Dev No:001/016
    ATTR{bMaxPower}=="100mA"
pc67247005 bin # ~/bin/lpc 
LPCLink Ready to Link Found:"Bus 001 Device 017: ID 1fc9:0009  "
         Bus/Dev No:001/017
    ATTR{bMaxPower}=="500mA"
    ATTR{manufacturer}=="Code Red Technologies"
    ATTR{product}=="LPC-Link Probe v1.1"
    ATTR{serial}=="T1S6RGRIA"
And trying to flash it again
pc67247005 bin # ./crt_emu_lpc11_13_nxp  -wire=winusb  -flash-mass
Ni: LPCXpresso Debug Driver v2.0 (Oct 27 2010 16:01:27)
GetModuleFileName path == /usr/local/LPCXpresso/bin/crt_emu_lpc11_13_nxp
Nc: Looked for vendor directory XML file in /usr/local/LPCXpresso/bin/nxp_directory.xml

Nc: Found generic directory XML file in /usr/local/LPCXpresso/bin/crt_directory.xml

Ed:02: Failed on connect: Ee(02). Not connected to emulator.
Et: Emu(0): Connected. Was: None. DpID:     EDB6. Info: LPCLINK_1_1
Error 0: (null)
Last sticky: 0. AIndex: 0
No MemAp selected
No Speed test
SWD Frequency: 50 KHz. RTCK: False. Vector catch: False.
Packet delay: 0  Poll delay: 0.
0 Kudos

684 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by LTTechPL on Sun Jul 24 04:26:21 MST 2011
Show command output :
$ ldd /usr/local/LPCXpresso/bin/crt_emu_lpc11_13_nxp
Running this shell script as root give us more information:
#!/bin/sh
LPCLink_New_ID="0471:df55"
LPCLink_Ready_ID="1fc9:0009"
USB_LIST=$(lsusb)
target_udev_info () {
    udevadm info -a -p $(udevadm info -q path -n /dev/bus/usb/${1}/${2}) | egrep "ATTR{(bMaxPower|manufacturer|product|serial)}"
}
LPCLink_New=$(echo "${USB_LIST}" | grep ${LPCLink_New_ID})
if [ -n "${LPCLink_New}" ]; then
    echo "LPCLink Bootless Found:\"${LPCLink_New}\""
    LPCLink_New_BusNo=$(echo "${LPCLink_New}" | sed -n "s/^Bus[[:space:]]\([[:digit:]]\{3\}\).*/\1/p")
    LPCLink_New_DevNo=$(echo "${LPCLink_New}" | sed -n 's/^.*Device[[:space:]]\([[:digit:]]\{3\}\).*/\1/p')
    echo -e "\t Bus/Dev No:${LPCLink_New_BusNo}/${LPCLink_New_DevNo}"
    target_udev_info "${LPCLink_New_BusNo}" "${LPCLink_New_DevNo}"
fi
LPCLink_Ready=$(echo "${USB_LIST}" | grep ${LPCLink_Ready_ID})
if [ -n "${LPCLink_Ready}" ]; then
    echo "LPCLink Ready to Link Found:\"${LPCLink_Ready}\""
    LPCLink_Ready_BusNo=$(echo "${LPCLink_Ready}" | sed -n "s/^Bus[[:space:]]\([[:digit:]]\{3\}\).*/\1/p")
    LPCLink_Ready_DevNo=$(echo "${LPCLink_Ready}" | sed -n "s/^.*Device[[:space:]]\([[:digit:]]\{3\}\).*/\1/p")
    echo -e "\t Bus/Dev No:${LPCLink_Ready_BusNo}/${LPCLink_Ready_DevNo}"
    target_udev_info "${LPCLink_Ready_BusNo}" "${LPCLink_Ready_DevNo}"
fi
0 Kudos

684 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by octavsly on Thu Jul 21 12:37:35 MST 2011

Quote: CodeRedSupport

To boot LPC-Link under Linux see:
http://support.code-red-tech.com/CodeRedWiki/CommandLineFlashProgramming


Thanks. I have it working
./crt_emu_lpc11_13_nxp -wire=winusb -info-emu
Ni: LPCXpresso Debug Driver v2.0 (Oct 27 2010 16:01:27)
1 Emulators available:
0. LPCLINK_1_1  LPC-Link Driver LINUX32 v1.1 (Code Red - LPCXpresso)


Any idea what I am doing wrong? The output is the same even in ISP mode, which I hope I have entered correctly.
./crt_emu_lpc11_13_nxp -pLPC1343 -wire=winusb -flash-load=~/LPCXpresso/eclipse/workspace/LPCXpresso/blinky/Debug/blinky.axf 
Ni: LPCXpresso Debug Driver v2.0 (Oct 27 2010 16:01:27)
GetModuleFileName path == /usr/local/LPCXpresso/bin/crt_emu_lpc11_13_nxp
Nc: Looked for chip XML file in /usr/local/LPCXpresso/bin/LPC1343.xml

Nc: Looked for vendor directory XML file in /usr/local/LPCXpresso/bin/nxp_directory.xml

Nc: Found generic directory XML file in /usr/local/LPCXpresso/bin/crt_directory.xml

Ed:02: Failed on connect: Ee(02). Not connected to emulator.
Et: Emu(0): Connected. Was: None. DpID:     EDB6. Info: LPCLINK_1_1
Error 0: (null)
Last sticky: 0. AIndex: 0
No MemAp selected
No Speed test
SWD Frequency: 50 KHz. RTCK: False. Vector catch: False.
Packet delay: 0  Poll delay: 0.
0 Kudos

684 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Thu Jul 21 07:04:53 MST 2011
LPCXpresso for Linux does not need or use cscript.

To boot LPC-Link under Linux see:
http://support.code-red-tech.com/CodeRedWiki/CommandLineFlashProgramming
0 Kudos

684 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by octavsly on Thu Jul 21 05:42:42 MST 2011

Quote: DarkVeg

cscript appears to be installed:

[FONT=Courier New]D:\nxp\lpcxpresso_3.6\bin>cscript
Microsoft (R) Windows Script Host Version 5.8
Copyright (C) Microsoft Corporation. All rights reserved.
[/FONT]



Is there an equivalent script in Linux? I have both LPCXpresso-Linux-x86-3.7.5.100 and lpcxpresso_4.0.5_113 but I dont have that script.

Although, what would be the Linux equivalent of
Scripts\bootLPCXpresso.c md winusb
0 Kudos

684 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Tue Mar 01 14:54:56 MST 2011
One other thing to check is that the EA Baseboard is powered. You cannot power the LPCXpresso baseboard through the LPCXpresso board. This is described in the EA documentation.
0 Kudos

684 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Tue Mar 01 12:30:20 MST 2011
First double check the orientation of the debug cable connection to the LPC-Link. If all is well, boot the software probe.

C:\nxp\lpcxpresso_3.6\bin>Scripts\bootLPCXpresso.cmd [I]winusb[/I]
Booting LPC-Link with LPCXpressoWIN.enc
Press any key to continue . . .

This should show up in the Device Manager under "USB Serial Bus controllers" as an LPC-Link entry:

[FONT=Arial][SIZE=2]LPC-Link Debug Probe v1.1[/SIZE][/FONT]

Note that you can substitute 'hid' for 'winusb' in each case. The actual probe used by the IDE is normally OS dependent, but you can override in Windows -> Preferences -> LPCXpresso -> Debug Options (1).

Issue this command to the debug utility to confirm it can see the emulator:

The following command should show the LPCXpresso has booted.:

C:\nxp\lpcxpresso_3.6\bin>crt_emu_lpc11_13_nxp.exe -wire=[I]winusb[/I] -info-emu
Ni: LPCXpresso Debug Driver v2.0 (Jan 18 2011 08:09:09)
1 Emulators available:
0. T1S6RGRIA    LPC-Link Probe v1.1 (Code Red - LPCXpresso)

If further trouble is seen check the usual (e.g. USB cable integrity, etc.)

Regards,

CodeRedSupport
0 Kudos