LPC1111 FHN33/203 LPC-Link programming issue

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

LPC1111 FHN33/203 LPC-Link programming issue

400 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by zare on Wed Mar 20 09:01:37 MST 2013
I have a custom board with LPC1111FHN33/203. When I try to program the flash with LPC-Link (one half of the LPC1114 LPCXpresso board) I got following error message:

--------------------------------------------------------------
Pc: ( 0) Reading remote configuration
Ni: LPCXpresso Debug Driver v4.0 (Sep 19 2012 09:03:23)
Nc: Looked for chip XML file in C:/nxp/LPCXpresso_4.3.0_1023/lpcxpresso/bin/LPC1111/203.xml

Nc: Looked for vendor directory XML file in C:/nxp/LPCXpresso_4.3.0_1023/lpcxpresso/bin/nxp_directory.xml

Nc: Found generic directory XML file in C:/nxp/LPCXpresso_4.3.0_1023/lpcxpresso/bin/crt_directory.xml

Pc: ( 5) Remote configuration complete
Pc: ( 30) Emulator Connected
Pc: ( 40) Debug Halt
Pc: ( 50) CPU ID
Nc: Emu(0): Conn&Reset. DpID: BB11477. Info: HID32HS12
Nc: SWD Frequency: 250 KHz. RTCK: False. Vector catch: False.
Nc: Packet delay: 0 Poll delay: 0.
Nc: NXP: LPC1111/203 Part ID: 0x00010012
Pc: ( 65) Chip Setup Complete
Nt: Connected: was_reset=false. was_stopped=false
Cr:v Registered license, download limit of 128K
Pc: ( 70) License Check Complete
Nt: Loading ELF file 'LPC.axf' at location 00000000
Nt: Writing 5620 bytes to 0000 in Flash (assumed clock: 12.0MHz)
Pb: 1 of 1 ( 0) Writing pages 0-41292144 at 0x00000000 with 5620 bytes
Ps: ( 0) Page 0 at 00000000
Ps: ( 18) Page 0 at 00000000: 1024 bytes
Ps: ( 36) Page 0 at 00000400: 1024 bytes
Ps: ( 54) Page 0 at 00000800: 1024 bytes
Ps: ( 72) Page 0 at 00000C00: 1024 bytes
Pb: (100) Writing Flash ended with an error.
Ed:05: File 'LPC.axf' load failure: Ef(8). Invalid address for flash write - not in defined flash.
Nc: nSRST assert (if available)
Nc: Executing in bootloader.
Wc: SWD Frequency (Final): 250 KHz.
-------------------------------------------------------------

LPC1111 should have 8KB FLASH but the LPCXpresso say that the FLASH is 4KB. Actually the LPC-Link is programming first 4KB and then report the following error:

Ed:05: File 'LPC.axf' load failure: Ef(8). Invalid address for flash write - not in defined flash.

If someone see this issue on LPC1111/203 or someone have some useful information please share with me.
0 Kudos
7 Replies

368 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Fri Mar 22 09:44:30 MST 2013
Please post the debug log and the map file generated by the linker. Can you also try mass erasing before programming.

You might also want to try debugging the cause of the hard fault. This may not be an issue with the tools at all.

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


Note that I strongly doubt that your new problem is anything to do with the original. Your original programming problem was caused by the flash programming code being passed the wrong flash size for this specific part.

Regards,
CodeRedSupport
0 Kudos

368 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by zare on Fri Mar 22 04:17:21 MST 2013
Now the programming is working (with LPCXpresso 5.1.2 and updated config in lpcxpresso/bin), but the firmware is not executing properly.

After some single-step debugging I got Hardware Fault exception.

I dump the entire FLASH with other debugger and seems like the bin and FLASH have little difference. I attaching FLASH dump (read_back.bin), original bin from build (ECR_LPC.axf.bin) and elf (ECR_LPC.axf) file.

If I program the generated bin with J-Link is executing properly.

I think you got the point and found where is the issue, but we need just small adjustment to get it completely working.
0 Kudos

368 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Thu Mar 21 02:57:36 MST 2013
OK, I think that  I can see the problem (which is specific to the LPC1111/203 part).

Ensure that LPCXpresso 5.1.2 is not running, then extract the file from the attached zip and place it in the \lpcxpresso\bin subdirectory of your LPCXpresso 5.1.2 installation.

Does this then allow a successfully programming of your flash?

Regards,
CodeRedSupport
0 Kudos

368 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Thu Mar 21 01:58:43 MST 2013
Can you try doing a mass erase before programming...

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

Then post the debug log from LPCXpresso 5.1.2

Also does this only happen with one particular image, or with every image?

If possible could you zip up and attach you AXF and map file to this thread?

Regards,
CodeRedSupport
0 Kudos

368 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by zare on Thu Mar 21 01:48:25 MST 2013
Same issue with latest LPCXpresso IDE.
I try to program with ulink2 and there was no issue, ulink was able to program entire flash area, only LPC-Link have issue programming upper 4KB
0 Kudos

368 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by zare on Wed Mar 20 09:18:48 MST 2013
Also my LPCXpresso showing 0x2000 FLASH size :(
0 Kudos

368 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Wed Mar 20 09:15:34 MST 2013
My  LPCXpresso v5.1.2 [Build 2065] [2013-02-20]  is showing a flash size of  0x2000 :eek::eek:

Perhaps it's time to update?

http://lpcxpresso.code-red-tech.com/LPCXpresso/
0 Kudos