JTAG Programming from command line

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

JTAG Programming from command line

472 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by nsacks on Fri Mar 22 19:58:49 MST 2013
Hello all,

Because the Example Virtual Serial Device project from NXPUSBLib contains a space in it's directory structure (specifically Example_VirtualSerialDevice/LPC43xx M4/...) I can not successfully download code through the GUI programming tool in LPCXpresso.

So, I have attempted to compile a binary file, and download to my LPCXplorer4330's M4 core. This results in the error included at the end of this post.

Do you have any suggestions as to how I can get some code downloading? I'm running Ubuntu 12.10 x32, and the LPC-Link JTAG programmer.

I have quadruple checked file permissions, and have tried multiple combinations of AXF files or BIN files.

Thank You!




[FONT=Courier New]$ crt_emu_lpc18_43_nxp -wire=winusb -pLPC4330 -vendor=NXP -flash-load-exec=~/Desktop/Example_VirtualSerialDevice.bin -load-base-address=0x14000000
Ni: LPCXpresso Debug Driver v4.0 (Sep 19 2012 09:15:29)
Nc: Looked for chip XML file in /usr/local/lpcxpresso_4.3.0_1025/lpcxpresso/bin/LPC4330.xml

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

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

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: LPC4330  Part ID: 0x00000000
Cr:v Registered license, download limit of 128K
Et:58: Cannot open binary file 'Example_VirtualSerialDevice.bin'
[/FONT]
0 Kudos
3 Replies

326 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by nsacks on Sat Mar 23 11:02:09 MST 2013
By using a tmp directory and by adding the flash driver command specification, I have been able to download the codes successfully.

Thanks.
0 Kudos

326 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Sat Mar 23 07:01:17 MST 2013
You are also missing the flash driver specification - needed as the LPC4330 has no internal flash, thus you must be trying to program an external flash device.

Your command will need to be something like the following, depending upon what external flash device you are using...

crt_emu_lpc18_43_nxp -g -2 -vendor=NXP -pLPC4330 -wire=winusb -flash-load-exec "proj.axf" -flash-driver=LPC18_43_SPIFI_4MB_64KB.cfx


More information on LPC18/43 flash drivers for external flash devices at:

http://support.code-red-tech.com/CodeRedWiki/LPC18xx_43xx_ExternalFlash

Regards,
CodeRedSupport
0 Kudos

326 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by TheFallGuy on Sat Mar 23 01:25:51 MST 2013
Presumabley the tools aren't lying when they say "cannot open...". Does the file actually exist? Have you tried copying to another locacation (/tmp)? Have you tried running the utility from the same directory as the file, so you don't have to provide a complete path?

I also see you are using v4.3.0. Latest version is v5.1.2. Time to upgrade?

Another thought: [FONT=Courier New]~[/FONT] is expanded by the shell - but not when it is embedded in the middle of a string, as it is in your example. Try replacing with the full path[FONT=Courier New]
[/FONT]
0 Kudos