Unable to flash LPCXpresso LPC1769 from command line in Linux

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Unable to flash LPCXpresso LPC1769 from command line in Linux

1,106 次查看
lpcware
NXP Employee
NXP Employee
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?

0 项奖励
回复
4 回复数

989 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mohan on Wed Apr 01 12:04:20 MST 2015
The command line flash link helps!
I ran the dfu-util command once for the first time when the target is USB plugged-in and then ran flash_utility as many times to download different applications.
Thanks R2D2 :exmark:
0 项奖励
回复

989 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Wed Apr 01 11:54:38 MST 2015

Quote: mohan
So 'Debug' is a way to download the application to target flash usually?



'Debug' is used to Debug  :D

If you want to flash, use 'Program Flash':

http://www.lpcware.com/content/faq/lpcxpresso/gui-flash-programming-tool

or command line flash programming tool:

http://www.lpcware.com/content/faq/lpcxpresso/command-line-flash-programming
0 项奖励
回复

989 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mohan on Wed Apr 01 11:44:41 MST 2015
The program got downloaded successfully and debug session started when I 'Debug the application'!!
I'm planning to run eLua on the LPCXpresso LPC1769 target, so expecting to download the binaries with few simple commands. So 'Debug' is a way to download the application to target flash usually?
0 项奖励
回复

989 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by TheFallGuy on Sun Mar 29 04:23:10 MST 2015
What happens if you debug the application?
0 项奖励
回复