Programming binary files into LPC1113 flash memory

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

Programming binary files into LPC1113 flash memory

1,787 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by ngruending on Wed Nov 24 11:50:27 MST 2010
How do you download a .axf file into the flash memory for a LPC1113? I'm using LPCXpresso 3.5.6 on XP. Using the "Program Flash" button on the toolbar I get "05: File 'test.axf' load failure: Eg(10). Attempt to load into missing flash area." I only set the file name in "Program Flash". No other options were changed from default.

I also tried the command line:
G:\test\Debug>crt_emu_lpc11_13_nxp -wire=winusb -pLPC1113/301 -flash-load-exec=test.axf
Ni: LPCXpresso Debug Driver v2.0 (Oct 27 2010 12:23:56)
Nc: Looked for chip XML file in G:/nxp/lpcxpresso_3.5/bin/LPC1113/301.xml

Nc: Looked for vendor directory XML file in G:/nxp/lpcxpresso_3.5/bin/nxp_direct
ory.xml

Nc: Found generic directory XML file in G:/nxp/lpcxpresso_3.5/bin/crt_directory.
xml

Nc: Emu(0): Conn&Reset. DpID:  BB11477. Info: T1S6RGRIA
Nc: SWD Frequency: 3000 KHz. RTCK: False. Vector catch: False.
Nc: Packet delay: 0  Poll delay: 0.
Wc: Cannot find definition 'LPC11_PMU' for peripheralInstance 'PMU'
Nc: NXP: LPC1113/301  Part ID: 0x0434102B
Cr:v Registered license, download limit of 128K
Nt: Loading ELF file 'SLA_charger.axf' at location 00000000
Nc: nSRST assert (if available)
Nc: Executing in user flash.
Nt: Loading ELF file 'SLA_charger.axf' at location 00000000
Ed:05: File 'SLA_charger.axf' load failure: Eg(10). Attempt to load into missing
flash area.

I can download to the LPC1113 properly if I use the "Debug test" option in the Quickstart panel, so it's not the chip.

Any ideas?

Thanks!
0 Kudos
Reply
7 Replies

1,737 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Manonline on Tue Sep 11 07:00:47 MST 2012
Hi, I'm having this same issue. I can flash the LPC1768 from quickstart panel (both Debug and Release mode).

I tried this method before and it worked well, but now it isnt working.

Which are those steps to initialize or edit the ELF file?

P.S.: Despite the error, it seems that the tool is flashing correctly the binary file. I mass erased the device memory and checked if the app was running (it wasnt). Then flashed the AXF and checked if the app was running (it was).

Thanks in advance,
Mariano.
0 Kudos
Reply

1,737 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Thu Nov 25 16:39:38 MST 2010
The problem is the data in your .noinit section located at address  0x10000004. This is a RAM address, yet the section attributes in the ELF  file suggest to our loader it's writable. Based on the chip attributes,  we know there's no flash there, so we emit an error. If it's really a  noinit section, then perhaps you need to redefine the section attributes  (e.g. .bss). I don't have your source to know where this section  originates. Otherwise, you'll need to treat the .noinit section like the  .data section . Any initialized values in .data are copied from flash  to RAM at a runtime. See the ResetISR code in the Code Red startup.

Note the reason it seems to work under debug, is the debug environment  has intervened and issued a RAM write command for the .noinit contents. A  flashed application has to resolve all initialization details, without  such intervention.
0 Kudos
Reply

1,737 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Thu Nov 25 10:58:29 MST 2010
Could you contact Code Red support and send your .axf file and liker script, so we can try to determine what is going on.

See the "email:support" link here:
http://www.code-red-tech.com/contact.php

Thanks
0 Kudos
Reply

1,737 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by ngruending on Thu Nov 25 10:28:42 MST 2010
Sorry, I made a mistake editing. I meant to change all instances of SLA_charger.axf to test.axf. I obviously forgot one. But the output is correct.
0 Kudos
Reply

1,737 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Thu Nov 25 00:42:08 MST 2010
Did you paste the real output from the command? I ask because

Quote:

G:\test\Debug>crt_emu_lpc11_13_nxp -wire=winusb -pLPC1113/301 -flash-load-exec=test.axf


is followed by

Quote:

Nt: Loading ELF file 'SLA_charger.axf' at location 00000000
Nt: Loading ELF file 'SLA_charger.axf' at location 00000000
Ed:05: File 'SLA_charger.axf' load failure: Eg(10). Attempt to load into missing


That is, you specified "test.axf", but the output is reporting "SLA_charger.axf"
0 Kudos
Reply

1,737 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by ngruending on Wed Nov 24 15:28:01 MST 2010
Yes, I can download and debug projects just fine using the quickstart panel. But if I want to download just the axf file using the Program Flash button on the toolbar I get the errors mentioned. Unfortunately I need to be able program the axf file without using the quickstart panel.

Thanks!
0 Kudos
Reply

1,737 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by NXP_Europe on Wed Nov 24 14:35:54 MST 2010
Hello ngruending,

where you able to run other example programs with your LPCXpresso?
0 Kudos
Reply