Content originally posted in LPCWare by mohan on Sat Mar 28 23:50:45 MST 2015
I'm using Ubuntu 14.04.3 x86_64 development platform and installed LPCXpresso v7.6.2. I tried to flash new programs to LPCXpresso LPC1769 target from the IDE, which progressed in the download for long time and didn't complete. So I planned to use the command line utils to flash the target.
$ cd /usr/local/lpcxpresso_7.6.2_326/lpcxpresso
$ bin/dfu-util -d 0x0471:0xdf55 -c 0 -t 2048 -R -D bin/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=22, 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=583
Starting download: [##################################################] finished!
state(8) = dfuMANIFEST-WAIT-RESET, status(0) = No error condition is present
Done!
can't detach: error sending control message: Broken pipe
Resetting USB to switch back to runtime mode
$ /usr/local/lpcxpresso_7.6.2_326/lpcxpresso/bin/crt_emu_cm3_nxp -flash-load-exec "/home/mohan/LPCXpresso/workspace/LPCX176x_cmsis2_systick_twinkle/Debug/LPCX176x_cmsis2_systick_twinkle.axf" -g -2 -vendor=NXP -pLPC1768 -wire=winUSB -s250 -flash-driver=LPC175x_6x_512.cfx
LPCX176x_cmsis2_systick_twinkle/Debug/LPCX176x_cmsis2_systick_twinkle.axf" -g -2 -vendor=NXP -pLPC1768 -wire=winUSB -s250 -flash-driver=LPC175x_6x_512.cfx
Ni: LPCXpresso Debug Driver v7.6 (Jan 28 2015 22:25:00 - crt_emu_cm3_nxp build 50)
Pc: ( 0) Reading remote configuration
Pc: ( 5) Remote configuration complete
Pc: ( 30) Emulator Connected
Pc: ( 40) Debug Halt
Pc: ( 50) CPU ID
Nc: Emu(0): Conn&Reset. DpID: 2BA01477. Info: LPCLINK_1_1
Nc: SWD Frequency: 250 KHz. RTCK: False. Vector catch: False.
Nc: Packet delay: 0 Poll delay: 0.
Nc: loaded v.2 On-chip Flash Memory LPC175x_6x_512.cfx
Nc: image 'LPC175x_6x (512K) Jan 22 2015 07:52:11'
Nc: NXP: LPC1768 Part ID: 0x00000000
Pc: ( 65) Chip Setup Complete
Nt: Connected: was_reset=true. was_stopped=false
Cr:v LPCXpresso Free License - Download limit is 256K
Pc: ( 70) License Check Complete
Nt: Loading ELF file 'LPCX176x_cmsis2_systick_twinkle.axf' at location 00000000
Nt: Writing 1528 bytes to address 0x00000000 in Flash
Pb: 1 of 1 ( 0) Writing pages 0-0 at 0x00000000 with 1528 bytes
^C
$
And the program was waiting at the writing step for a long time w/o any progress. Am I missing any step here to successfuly flash the target image?