Problem loading image to LPCXpresso

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

Problem loading image to LPCXpresso

485 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by midas on Sat Mar 10 13:10:36 MST 2012
I have an LPCXpresso LPC1114 REV A, Windows Vista 64 bit, LPCXpresso v4.2.0_264

When I connect the LPCXpresso board to any USB slot (directly, no hub), I get a "USB Device with DFU Capabilities" added under Device Manager.
When I choose the Blinky application and select debug, I get a message that "No emulator/board available".
Based on what I read, I go to the Scripts directory and run "bootLPCXpresso HID", which causes the USB Device with DFU Capabilities" to be replaced by a generic "HID-complient device" and "USB Human Interface Device" entries under the Device Manager.
Now, selecting the Blinky application for debug, I get an error message "Command failed" target extended-remote | crt_emu_lpc11_13 nxp -g -mi -4 -pLPC1114/301 -vendor=NXP -wire=hid -msg-port=49262
Reason: The program file specified in launch configuration does not exist" and in the details it complains:
"Caused by: java.io.FileNotFoundException: C:\Users\Uri\Documents\LPCXpresso_4.2.0_264\workspace\blinky\Debug\blinky.axf not found". However, the blinky.axf file is actually there, having a size of 502KB.

Any idea why it fails to locate the file? How to avoid the need to manually bootload the board?

Thanks
0 Kudos
Reply
7 Replies

423 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by midas on Mon Mar 12 19:12:02 MST 2012
I PMed you the results of the crash as you asked me. BTW, I realize now that the problems I had with "Cannot start..." happened because I would double click the debug option, instead of single click them, so the second click would generate this error, but the first click would cause the crash.
0 Kudos
Reply

423 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Mon Mar 12 16:24:21 MST 2012
It seems there's more than one problem going on here. Can you reproduce the crash on your Windows 64-bit system in a DOS command window with the following command-line?

C:\nxp\LPCXpresso_4.2.0_264\lpcxpresso\bin\crt_emu_lpc11_13.exe -g -2 -pLPC1114/301 -wire=hid -flash-erase

Please cut and paste your output. For this case only, you can contact Code Red support directly via http://www.code-red-tech.com/support.php

Regards,

CodeRedSupport
0 Kudos
Reply

423 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by midas on Mon Mar 12 15:12:17 MST 2012
BTW, the exception is due to an access violation writing to location 0x00540000, if that helps.
0 Kudos
Reply

423 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by midas on Mon Mar 12 15:06:19 MST 2012
I did exactly as you suggested. Crt_emu_lpc11_13_nxp crashed at exactly the same place (at offset 00410500, doing a byte array copy). Any other suggestion? Can you look up this address, to get an idea why the program crashes?
0 Kudos
Reply

423 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Mon Mar 12 07:25:06 MST 2012
The fact that the part ID is being displayed indicates that communication down to the target is working.

The message "Cannot start debug of xxx Debug until Startup of previous session has completed" indicates that you have attempted to connect more than once. How are you actually starting the debug session? You should just need to click on the Debug button in the Quickstart panel once. Also make sure that you terminate a current debug session before trying to start another.


Suggest you...

Reboot your PC (ensuring that you LPCXpresso board is unplugged).

Start LPCXpresso and open a completely new workspace directory.

Import the "LPCXpresso1114_cmsis2.zip" examples from:
C:\nxp\LPCXpresso_4.2.0_264\lpcxpresso\Examples\NXP\LPC1000\LPC11xx
[exact location will depend upon your install directory].

Select the "Build all" option in the Quickstart panel.

Now open up the task manager and ensure that you do not have "crt_emu_lpc11_13_nxp" running.

Now connect your LPCXpresso board to the USB of your PC and run  the "bootLPCXpresso HID" script.

Now select the "LPCX1114_cmsis2_systick" project in Project Explorer, then click on "Debug" in the Quickstart panel.

This should then start up the debug connection, download the code, and run to the start of main(). What do you see?

Regards,
CodeRedSupport
0 Kudos
Reply

423 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by midas on Mon Mar 12 06:09:29 MST 2012
The board is new, I got it a few months ago, but I have never managed to operate it.
I have tried different USB ports - I get the same bevaviour.
I have tried replacing USB cable with another one - same behaviour. I cannot say for sure they are shielded (without cutting one open), but they both seem rather thick, and relatively short.
I do get to the phase where I get the following message, though:
"LPCXpresso Debug Driver v4.0 (Feb 17 2012 17:57:38)
Looked for chip XML file in C:/nxp/LPCXpresso_4.2.0_264/lpcxpresso/bin/LPC1114/301.xml
Looked for vendor directory XML file in C:/nxp/LPCXpresso_4.2.0_264/lpcxpresso/bin/nxp_directory.xml
Found generic directory XML file in C:/nxp/LPCXpresso_4.2.0_264/lpcxpresso/bin/crt_directory.xml
Emu(0): Conn&Reset. DpID:  BB11477. Info: T1S6RGRIA
SWD Frequency: 3000 KHz. RTCK: False. Vector catch: False.
Packet delay: 0  Poll delay: 0.
NXP: LPC1114/301  Part ID: 0x2540102B"
This seems to me to indicate that some communication is going over the JTAG link where the CPU ID gets to be read correctly, right? So can you confirm that even though the LPCXpresso board does not get loaded automatically and I need to manually run the "bootLPCXpresso HID", otherwise the rest should behave the same as normal?
So, now to the second, more severe problem of not being able to load any image to the board:
It seems to me as if there are a couple of possibly unrelated problems I encounter. As for the message of the missing file, I had a space in the name because I manually wrote that line. There is no space in the real message.
However, I noticed that that message appears at the initial stage of running the make file, probably after the file is deleted and before it is regenerated. For example, I tried debugging another example (the adc one) and I had the same error message as the file did not exist yet, but it did exist at the end of the compilations and link process. The same for the blinky example - after I do the suggested "Delete Launch Configuration" (which doesn't help) I get the same missing file message but the building process proceeds anyway until it fails later.
So it seems to me the missing file error message is benign and can be ignored.
However, there seem to be two additional problems causing the download to fail:
sometimes I get a message "Cannot start debug of xxx Debug until Startup of previous session has completed". I got this message even after I exited the LPCXpresso application, and I always disconnect-reconnect the USB cable and run the bootloader script before proceeding with anything.
When I don't get that last message, a process launched by LPCXpresso application, crt_emu_lpc11_13_nxp.exe!00410500(), will crash while trying to copy some string from one place to another. I assumed before that it was related to the presumably missing file, but now I suspect it has nothing to do with it?
0 Kudos
Reply

423 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Mon Mar 12 04:18:17 MST 2012
Is this a new board and LPCXpresso installation, or one that you have been using for a while?

Have you ever been able to download successfully?

Have you tried using a different USB port on your PC?

Try using different USB cables (make sure they are shielded.... more info in http://knowledgebase.nxp.com/showpost.php?p=10131&postcount=8).

With regards to your debug launch problems, I suggest you try deleting your existing launch configurations, then try debugging again (which should recreate them). To delete them, right click on the project and select....

[FONT=Courier New][SIZE=2]Launch Configurations -> Delete Launch Configurations.
[/SIZE][/FONT]
If this doesn't help, then double check where your project is on your disc. In particular your original post shows a space character in your pathname ("[FONT=Courier New][SIZE=2]worksp  ace[/SIZE][/FONT]").

Regards,
CodeRedSupport
0 Kudos
Reply