crt_emu_cm3_nxp from LPCXpresso 7.1.1 hangs on Mac OS X

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

crt_emu_cm3_nxp from LPCXpresso 7.1.1 hangs on Mac OS X

615 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by MOLINARO on Mon Apr 07 10:08:00 MST 2014
I am trying to flash a LPCXpresso LPC1769 with command line utilities on Mac OS X.
System : Mac OS X 10.7.5
LPCXpresso version 7.1.1

The command list I have tried in a shell script is :

cd /Applications/lpcxpresso_7.1.1_125/lpcxpresso/bin &&
./dfu-util -d 0x471:0xdf55 -c 0 -t 2048 -R -D LPCXpressoWIN.enc &&
./crt_emu_cm3_nxp -info-target -wire=winusb &&
./crt_emu_cm3_nxp -g -4 -wire=winusb -plpc1769 -flash-load-exec=/my-path/product-internal-flash.elf


Execution freezes invoking info target :
+ cd /Applications/lpcxpresso_7.1.1_125/lpcxpresso/bin
+ ./dfu-util -d 0x471:0xdf55 -c 0 -t 2048 -R -D LPCXpressoWIN.enc
dfu-util - (C) 2005-2008 by Weston Schmidt, Harald Welte and OpenMoko Inc.
This program is Free Software and has ABSOLUTELY NO WARRANTY
Code Red Technologies Build : 03:46:35, Nov 21 2012

dfu-util currently only supportS DFU version 1.0

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=8, cfg=0, intf=0, alt=0, name="UNDEFINED"
Claiming USB DFU Interface...
Setting Alternate Setting #0 ...
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
bytes_per_hash=583
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: Broken pipe
Resetting USB to switch back to runtime mode
error resetting after download: Result too large
+ ./crt_emu_cm3_nxp -info-target -wire=winusb
Ni: LPCXpresso Debug Driver v7.0 (Mar 26 2014 18:32:42 - crt_emu_cm3_nxp build 1243)
Nc: Looked for vendor directory XML file in /Applications/lpcxpresso_7.1.1_125/lpcxpresso/bin/nxp_directory.xml

Nc: Found generic directory XML file in /Applications/lpcxpresso_7.1.1_125/lpcxpresso/bin/crt_directory.xml



What I am doing wrong ?
0 Kudos
10 Replies

544 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Tue Apr 08 13:57:54 MST 2014
The IDE will DFU the probe if it recognizes an enumerated device with a VID/PID associated with a supported DFU device. Otherwise, it won't be used.

Regards,

LPCXpresso-Support
0 Kudos

544 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by MOLINARO on Tue Apr 08 12:43:55 MST 2014
Ok, the first time I do :

./dfu-util -d 0x471:0xdf55 -c 0 -t 2048 -R -D LPCXpressoWIN.enc &&
sleep 2 &&
./crt_emu_cm3_nxp -flash-load-exec "/mypath/product-internal-flash.elf" -g -2 -vendor=NXP -pLPC1769  -wire=winUSB -s250  -flash-driver=LPC175x_6x_512.cfx


And the next times :
./crt_emu_cm3_nxp -flash-load-exec "/mypath/product-internal-flash.elf" -g -2 -vendor=NXP -pLPC1769  -wire=winUSB -s250  -flash-driver=LPC175x_6x_512.cfx


This perfectly runs. Thanks !

Strangely, the IDE always uses dfu-util, so I have to unplug the board before every flashing. Is there an option to avoid this ?
0 Kudos

544 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Tue Apr 08 03:07:08 MST 2014
It will fail as you should only boot ( use dfu-util )  once until you next power cycle the board.

After booting you have to allow time for th OS to re enumerate the device on usb
0 Kudos

544 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by MOLINARO on Tue Apr 08 02:05:26 MST 2014
I have found what was going wrong.

The correct sequence is:
cd /Applications/lpcxpresso_7.1.1_125/lpcxpresso/bin &&
./dfu-util -d 0x471:0xdf55 -c 0 -t 2048 -R -D LPCXpressoWIN.enc &&
sleep 2 &&
./crt_emu_cm3_nxp -flash-load-exec "/mypath/zPRODUCTS/product-internal-flash.elf" -g -2 -vendor=NXP -pLPC1769  -wire=winUSB -s250  -flash-driver=LPC175x_6x_512.cfx


My interpretation is the -R option of dfu-util invocation performs is reset, and LPC-Link needs time to reset. Adding a 2-second wait solves the problem.

However, invoking the script again always fails : I always need to unplug the LPCXpresso board in order to flash again.
0 Kudos

544 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by MOLINARO on Mon Apr 07 13:11:52 MST 2014
Thanks for your response

Yes, I do not use the keyboard USB port. I have seen this message on the forum :
http://www.lpcware.com/content/forum/lpcxpresso-ide-not-able-establish-lpc-link-lpcxpresso-812

I have the same behavior for every high-powered USB port.



0 Kudos

544 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Mon Apr 07 12:48:26 MST 2014
Have you tried different USB ports?
0 Kudos

544 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by MOLINARO on Mon Apr 07 12:30:03 MST 2014
Ok, I have found the "program Flash" button.

First, it tries to connect to to Redlink Server, fails, displays 2 error sheets, and the same with CMSIS-DAP, ...

Finally it displays the progression window: "Initializing LPC-link v1.1 with LPCXpressoWIN.enc".

Then a dialog appears, I have got the command line that is used by the IDE :
crt_emu_cm3_nxp -flash-load-exec "/myPath/product-internal-flash.elf" -g -2 -vendor=NXP -pLPC1769  -wire=winUSB -s250  -flash-driver=LPC175x_6x_512.cfx


So my script becomes :
cd /Applications/lpcxpresso_7.1.1_125/lpcxpresso/bin &&
./dfu-util -d 0x471:0xdf55 -c 0 -t 2048 -R -D LPCXpressoWIN.enc &&
./crt_emu_cm3_nxp -flash-load-exec "/mypath/zPRODUCTS/product-internal-flash.elf" -g -2 -vendor=NXP -pLPC1769  -wire=winUSB -s250  -flash-driver=LPC175x_6x_512.cfx


Bit it still fails:
+ cd /Applications/lpcxpresso_7.1.1_125/lpcxpresso/bin
+ ./dfu-util -d 0x471:0xdf55 -c 0 -t 2048 -R -D LPCXpressoWIN.enc
dfu-util - (C) 2005-2008 by Weston Schmidt, Harald Welte and OpenMoko Inc.
This program is Free Software and has ABSOLUTELY NO WARRANTY
Code Red Technologies Build : 03:46:35, Nov 21 2012

dfu-util currently only supportS DFU version 1.0

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=8, cfg=0, intf=0, alt=0, name="UNDEFINED"
Claiming USB DFU Interface...
Setting Alternate Setting #0 ...
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
bytes_per_hash=583
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: Broken pipe
Resetting USB to switch back to runtime mode
error resetting after download: Result too large
+ ./crt_emu_cm3_nxp -flash-load-exec /myPath/zPRODUCTS/product-internal-flash.elf -g -2 -vendor=NXP -pLPC1769 -wire=winUSB -s250 -flash-driver=LPC175x_6x_512.cfx
Ni: LPCXpresso Debug Driver v7.0 (Mar 26 2014 18:32:42 - crt_emu_cm3_nxp build 1243)
Pc: (  0) Reading remote configuration
Nc: Looked for chip XML file in /Applications/lpcxpresso_7.1.1_125/lpcxpresso/bin/LPC1769.xml

Nc: Looked for vendor directory XML file in /Applications/lpcxpresso_7.1.1_125/lpcxpresso/bin/nxp_directory.xml

Nc: Found generic directory XML file in /Applications/lpcxpresso_7.1.1_125/lpcxpresso/bin/crt_directory.xml

Pc: (  5) Remote configuration complete
Ed:02: Failed on connect: Ee(05). No matching emulator found - make sure power is on and not in use already.
Et:31: No connection to emulator device
Pc: (100) Target Connection Failed


How can I get the code invoked during "Initializing LPC-link v1.1 with LPCXpressoWIN.enc" progress windows ?
Is my command "./dfu-util -d 0x471:0xdf55 -c 0 -t 2048 -R -D LPCXpressoWIN.enc" valid ?
0 Kudos

544 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Mon Apr 07 11:37:21 MST 2014
If you use the Flash Utility (from the toolbar), the command line is displayed.
0 Kudos

544 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by MOLINARO on Mon Apr 07 11:26:30 MST 2014
It works sometimes with the GUI. I need to unplug and replug the LPCXpresso board when I launch again.

How the invoked command lines can be displayed ? I have taken a look on all preferences, project settings, and find nothing.
0 Kudos

544 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Mon Apr 07 10:51:00 MST 2014
Does it work through the GUI? If so, look at the command line that issues, and use that...

0 Kudos