Linux - flash tool freeze

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

Linux - flash tool freeze

1,185 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by drakesoft on Mon Jul 18 14:35:40 MST 2011
Hello,
I cant Flash my LPC1114 with the LINUX version of LPCxpresso IDE.
The Flash tool freezes.

maxe@schorschmobile:/opt/lpcxpresso_4.0.5_113/lpcxpresso/bin$ ./crt_emu_lpc11_13_nxp -g -2  -info-emu -wire=winusb
Pc: (  0) Reading remote configuration
Ni: LPCXpresso Debug Driver v4.0 (Jun 27 2011 18:30:24)
1 Emulators available:
0. LPCLINK_1_1    LPC-Link Driver LINUX32 v1.1 (Code Red - LPCXpresso)

maxe@schorschmobile:/opt/lpcxpresso_4.0.5_113/lpcxpresso/bin$ ./crt_emu_lpc11_13_nxp -info-target -pLPC1114/301 -wire=winusb -4
Ni: LPCXpresso Debug Driver v4.0 (Jun 27 2011 18:30:24)
Nc: Looked for chip XML file in /opt/lpcxpresso_4.0.5_113/lpcxpresso/bin/LPC1114/301.xml

Nc: Looked for vendor directory XML file in /opt/lpcxpresso_4.0.5_113/lpcxpresso/bin/nxp_directory.xml

Nc: Found generic directory XML file in /opt/lpcxpresso_4.0.5_113/lpcxpresso/bin/crt_directory.xml

best regards

drakesoft
0 Kudos
Reply
14 Replies

1,097 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by LTTechPL on Sun Jul 24 05:31:59 MST 2011
I've found how to install & use LPCXpresso4.0.5 on my PLD Linux TH 64-bit:
Req packages:
glibc-*.i686
glib2-*.i686
xorg-lib-libXft-*.i686
gdk-pixbuf2-*.i686
gtk+2-*.x86_64
xorg-lib-libXtst-*.i686
udev rules (user must be in usb group):
# LPC-Link
ACTION=="add|change", ATTR{idVendor}=="0471", ATTR{idProduct}=="df55", MODE="0660", GROUP="usb"
ACTION=="add|change", ATTR{idVendor}=="1fc9", ATTR{idProduct}=="0009", MODE="0660", GROUP="usb"
Also I've written some wrapper scripts to Investigate, link boot and load execs and found those usefully, so it might help.
query-LPCLink (root investigation - use udev/lsusb - shows maximum allowable power for USB target...
#!/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
Boot_LPCLINK (Need to be linked in ~/bin)
#!/bin/sh
# See http://support.code-red-tech.com/CodeRedWiki/CommandLineFlashProgramming
dfu-util -d 0x471:0xdf55 -c 0 -t 2048 -R -D /usr/local/lpcxpresso_4.0.5_113/lpcxpresso/bin/LPCXpressoWIN.enc
Note, I've own 64-bit compilation with normal system paths of dfu-utils.  Here is initial spec attached to thist post.
Load_LPC1343 (Need to be linked in ~/bin):
#!/bin/sh
# See http://support.code-red-tech.com/CodeRedWiki/CommandLineFlashProgramming
/usr/local/lpcxpresso_4.0.5_113/lpcxpresso/bin/crt_emu_lpc11_13_nxp -wire=winusb -pLPC1343 -flash-load-exec=${1}
Results very good:
$ Boot_LPCLINK
dfu-util - (C) 2005-2008 by Weston Schmidt, Harald Welte and OpenMoko Inc.
This program is Free Software and has ABSOLUTELY NO WARRANTY

dfu-util does currently only support DFU version 1.0

Filter on vendor = 0x0471 product = 0xdf55
Opening DFU USB device... ID 0471:df55
Claiming USB DFU Runtime Interface...
Determining device status: state = dfuIDLE, status = 0
WARNING: Runtime device already in DFU state ?!?
Found Runtime: [0x0471:0xdf55] devnum=0, cfg=1, intf=0, alt=0, name="UNDEFINED"
Claiming USB DFU Interface...
Setting Alternate Setting #0 ...
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
No valid DFU suffix signature
Warning: File has no DFU suffix
bytes_per_hash=604
Copying data from PC to DFU device
Starting download: [##################################################] finished!
state(8) = dfuMANIFEST-WAIT-RESET, status(0) = No error condition is present
Done!
can't detach
Resetting USB to switch back to runtime mode
$ Load_LPC1343 blinky.axf
Current dir:"/home/users/light-i/Devel/ARM/LPCXpresso/blinky/Release"
Ni: LPCXpresso Debug Driver v4.0 (Jun 27 2011 18:30:24)
Nc: Looked for chip XML file in /usr/local/lpcxpresso_4.0.5_113/lpcxpresso/bin/LPC1343.xml

Nc: Looked for vendor directory XML file in /usr/local/lpcxpresso_4.0.5_113/lpcxpresso/bin/nxp_directory.xml

Nc: Found generic directory XML file in /usr/local/lpcxpresso_4.0.5_113/lpcxpresso/bin/crt_directory.xml

Xs:
Xc:
Nc: Emu(0): Conn&Reset. DpID: 2BA01477. Info: LPCLINK_1_1
Nc: SWD Frequency: 3000 KHz. RTCK: False. Vector catch: False.
Nc: Packet delay: 0  Poll delay: 0.
Nc: NXP: LPC1343  Part ID: 0x3D00002B
Cr:v Registered license, download limit of 128K
Nt: Loading ELF file 'blinky.axf' at location 00000000
Xs:
Nc: nSRST assert (if available)
Nc: Executing in user flash.
0 Kudos
Reply

1,097 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by LTTechPL on Fri Jul 22 05:30:52 MST 2011
[FONT=Verdana][SIZE=2]Also check Voltages on board:
- GND to connection between D1 and D2 - should be ~5V
- GND to TP-1V8 - 1,8 V
- GND to TP-1V2 - 1,2 V
- GND to D6-A - 3,3 V
- GND to 3V3 - 3,1 V (Falling voltage on D6)
You can try power 5V from external power supply, but it must be done carefully (some resistance in serial, starting from [/SIZE][/FONT][FONT=Verdana][SIZE=2]4[FONT=Univers Condensed CE][I]7[/I][/FONT][FONT=Univers Condensed CE][I]Ω [/I][FONT=Verdana]and making it smaller until a connection[/FONT][/FONT]). In other way you can power targets 3,3V externally, so it cause to make power consumption from  USB smaller...
It will be nice if CR Crew will release open source kernel proto-driver for own link device... ;)
 
[/SIZE][/FONT]
0 Kudos
Reply

1,097 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by drakesoft on Fri Jul 22 03:18:54 MST 2011
Before initialisation:
root@schorschmobile:/home/maxe# lsusb | grep LPC
Bus 003 Device 012: ID 0471:df55 Philips (or NXP) LPCXpresso LPC-Link
root@schorschmobile:/home/maxe# dmesg | grep usb | tail -n 20 
[  133.503573] usb 3-3.3.1: USB disconnect, device number 9
[  133.732587] usb 3-3.3.1: new low speed USB device number 10 using ohci_hcd
[  133.841583] usb 3-3.3.1: New USB device found, idVendor=046d, idProduct=c051
[  133.841591] usb 3-3.3.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  133.841597] usb 3-3.3.1: Product: USB-PS/2 Optical Mouse
[  133.841604] usb 3-3.3.1: Manufacturer: Logitech
[  133.850297] input: Logitech USB-PS/2 Optical Mouse as /devices/pci0000:00/0000:00:12.0/usb3/3-3/3-3.3/3-3.3.1/3-3.3.1:1.0/input/input10
[  133.850671] generic-usb 0003:046D:C051.0006: input,hidraw0: USB HID v1.10 Mouse [Logitech USB-PS/2 Optical Mouse] on usb-0000:00:12.0-3.3.1/input0
[  263.716086] usb 3-3.3.1: USB disconnect, device number 10
[  263.953082] usb 3-3.3.1: new low speed USB device number 11 using ohci_hcd
[  264.065082] usb 3-3.3.1: New USB device found, idVendor=046d, idProduct=c051
[  264.065090] usb 3-3.3.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  264.065096] usb 3-3.3.1: Product: USB-PS/2 Optical Mouse
[  264.065102] usb 3-3.3.1: Manufacturer: Logitech
[  264.073793] input: Logitech USB-PS/2 Optical Mouse as /devices/pci0000:00/0000:00:12.0/usb3/3-3/3-3.3/3-3.3.1/3-3.3.1:1.0/input/input11
[  264.074158] generic-usb 0003:046D:C051.0007: input,hidraw0: USB HID v1.10 Mouse [Logitech USB-PS/2 Optical Mouse] on usb-0000:00:12.0-3.3.1/input0
[11887.388619] usb 3-3.3.3: new full speed USB device number 12 using ohci_hcd
[11887.487012] usb 3-3.3.3: not running at top speed; connect to a high speed hub
[11887.493560] usb 3-3.3.3: New USB device found, idVendor=0471, idProduct=df55
[11887.493570] usb 3-3.3.3: New USB device strings: Mfr=0, Product=0, SerialNumber=0
After initialisation:
root@schorschmobile:/home/maxe# lsusb 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 002: ID 1b1c:1928  
Bus 003 Device 002: ID 058f:6254 Alcor Micro Corp. USB Hub
Bus 003 Device 003: ID 058f:9254 Alcor Micro Corp. Hub
Bus 003 Device 011: ID 046d:c051 Logitech, Inc. G3 (MX518) Optical Mouse
Bus 003 Device 006: ID 046d:c30a Logitech, Inc. iTouch Composite
Bus 003 Device 007: ID 041e:3020 Creative Technology, Ltd SoundBlaster Audigy 2 NX
Bus 003 Device 013: ID 1fc9:0009 NXP Semiconductors
root@schorschmobile:/home/maxe# dmesg | grep usb | tail -n 20 
[  133.850671] generic-usb 0003:046D:C051.0006: input,hidraw0: USB HID v1.10 Mouse [Logitech USB-PS/2 Optical Mouse] on usb-0000:00:12.0-3.3.1/input0
[  263.716086] usb 3-3.3.1: USB disconnect, device number 10
[  263.953082] usb 3-3.3.1: new low speed USB device number 11 using ohci_hcd
[  264.065082] usb 3-3.3.1: New USB device found, idVendor=046d, idProduct=c051
[  264.065090] usb 3-3.3.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  264.065096] usb 3-3.3.1: Product: USB-PS/2 Optical Mouse
[  264.065102] usb 3-3.3.1: Manufacturer: Logitech
[  264.073793] input: Logitech USB-PS/2 Optical Mouse as /devices/pci0000:00/0000:00:12.0/usb3/3-3/3-3.3/3-3.3.1/3-3.3.1:1.0/input/input11
[  264.074158] generic-usb 0003:046D:C051.0007: input,hidraw0: USB HID v1.10 Mouse [Logitech USB-PS/2 Optical Mouse] on usb-0000:00:12.0-3.3.1/input0
[11887.388619] usb 3-3.3.3: new full speed USB device number 12 using ohci_hcd
[11887.487012] usb 3-3.3.3: not running at top speed; connect to a high speed hub
[11887.493560] usb 3-3.3.3: New USB device found, idVendor=0471, idProduct=df55
[11887.493570] usb 3-3.3.3: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[12319.094518] usb 3-3.3.3: USB disconnect, device number 12
[12319.596525] usb 3-3.3.3: new full speed USB device number 13 using ohci_hcd
[12319.710598] usb 3-3.3.3: New USB device found, idVendor=1fc9, idProduct=0009
[12319.710603] usb 3-3.3.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[12319.710606] usb 3-3.3.3: Product: LPC-Link Probe v1.1
[12319.710608] usb 3-3.3.3: Manufacturer: Code Red Technologies
[12319.710610] usb 3-3.3.3: SerialNumber: T1S6RGRIA
0 Kudos
Reply

1,097 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by LTTechPL on Thu Jul 21 10:20:01 MST 2011
It might help - my LPCExpresso:
$ lsusb | grep LPC
Bus 002 Device 003: ID 0471:df55 Philips (or NXP) LPCXpresso LPC-Link
0 Kudos
Reply

1,097 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by LTTechPL on Thu Jul 21 10:09:31 MST 2011
Regardless of the Linux distribution, your software has requirements in:
- architecture (can be in example i686 or x86_64 etc.)
- versions of system libs and installed tools in current paths.
So system req In Linux should be defined in other way than "supported OS". Of course, this does not in any way interfere with annotating systems on which the software was tested. So stop magic -  most people who use the Linux knows what they're doing... ;)
Best regards.
BTW. It will be nice to use 64-bit version in Linux too... ;)
0 Kudos
Reply

1,097 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Thu Jul 21 06:59:55 MST 2011

Quote: LTTechPL
I think Linux is similar in all distros, so reply "This OS is not supported" makes me smile...


If only that were true. Just search this forum for MANY cases where different distros exhibit different behavior. Unfortunately, as there are so many distros and so many differences, we have to limit the distros we support. That may not be what you expected, but it is true.
0 Kudos
Reply

1,097 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by LTTechPL on Thu Jul 21 04:46:30 MST 2011

Quote: CodeRedSupport
one more thing to try is a different USB port, or perhaps a USB hub. otherwise I would suspect there is a problem with the OS.

I think Linux is similar in all distros, so reply "This OS is not supported" makes me smile...
First question in this case should be:
What's lsusb lists (in root account) ?
Of course lsusb program needed...
Second :
Give output of command :
# dmesg | grep usb | tail -n 20
0 Kudos
Reply

1,097 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Tue Jul 19 14:52:17 MST 2011
one more thing to try is a different USB port, or perhaps a USB hub. otherwise I would suspect there is a problem with the OS.
0 Kudos
Reply

1,097 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by drakesoft on Tue Jul 19 06:43:15 MST 2011
My wheezy is up to date. I install updates almost every day.
0 Kudos
Reply

1,097 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by serge on Tue Jul 19 05:36:58 MST 2011
Wheezy is in the testing phase and like Debian states on their website: there are build failures

Quote:
There were known problems with the amd64 and i386 builds this week (on Monday 16th), due to build failures in d-i.



As far as i know these build failures are solved in the latest version of Wheezy.
So did you at least update your wheezy-installation?
0 Kudos
Reply

1,097 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by drakesoft on Tue Jul 19 03:04:22 MST 2011
I use the LPCxpresso with LPC1114 Baseboard.
In my virtual Windows XP maschine flashing works great so I think it is not the cable or the USB port.
0 Kudos
Reply

1,097 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Tue Jul 19 02:57:50 MST 2011
Debian isn't one of our supported distros. Also, I think Wheezy is not yet released - it is in Testing phase. So these problems could be related to your distro.

However, could you tell us:
- what is your target board? Is it an LPCXpresso board, or your own target? Are you using a baseboard?
- have you ever been able to connect to your target?
- have you checked your USB cables and tried different cables?
- have you tried a different USB port?
0 Kudos
Reply

1,097 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by drakesoft on Tue Jul 19 00:08:52 MST 2011
sorry, i use debian wheezy (amd64).
0 Kudos
Reply

1,097 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by TheFallGuy on Mon Jul 18 15:22:51 MST 2011
It's normally a good idea to tell us which Linux distro and the version that you are using.
0 Kudos
Reply