LPC-Link1.1 and LPC-Link2 no longer download firmware images larger than 8k

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

LPC-Link1.1 and LPC-Link2 no longer download firmware images larger than 8k

572 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by scsims on Fri Aug 16 02:20:24 MST 2013
Hello,

I've recently been successfully debugging and downloading firmware to a custom board containing an LPC11U24/401 (32k Flash, 8k RAM, 4k EEPROM) through an LPC-Link2. At some point whilst using LPCXpresso 5.1.2 (on Ubuntu 12.04LTS), the LPC-Link2 debug and flash programming operation began to fail consistently at 8k (of my binary's ~22k) with the error message "File 'firmware.axf' load failure: Ef(8). Invalid address for flash write - not in defined flash.". I reverted back to my trusty LPC-Link1.1 which worked fine.

I've since upgraded to LPCXpresso 5.6.2 and now both LPC-Link 1.1 and LPC-Link2 fail with the same issue. The output from the flash programming operation is as follows:

Pc: (  0) Reading remote configuration
Ni: LPCXpresso Debug Driver v5.2 (Jul  1 2013 15:00:23 - crt_emu_cm_redlink build 34)
Nc: Looked for chip XML file in /home/scsims/bin/lpcxpresso_5.2.6/lpcxpresso/bin/LPC11U24/401.xml

Nc: Looked for vendor directory XML file in /home/scsims/bin/lpcxpresso_5.2.6/lpcxpresso/bin/NXP_directory.xml

Nc: Found generic directory XML file in /home/scsims/bin/lpcxpresso_5.2.6/lpcxpresso/bin/crt_directory.xml

Pc: (  5) Remote configuration complete
Pc: ( 15) nSRST assert (if available)
Pc: ( 30) Emulator Connected
Pc: ( 40) Debug Halt
Pc: ( 50) CPU ID
Nc: Emu(0): Conn&Reset. DpID:  BB11477. Info: Redlink: 300567
Nc: Debug protocol: SWD. RTCK: Disabled. Vector catch: Disabled.
Nc: Loaded LPC11_12_13_8K_2K.cfx: LPC11_12_13 (8K Flash, min 2K RAM) Apr 22 2013 12:13:49  On-chip Flash Memory

Pc: ( 65) Chip Setup Complete
Nt: Connected: was_reset=true. was_stopped=false
Cr:v Registered license, download limit of 128K
Pc: ( 70) License Check Complete
Nt: Loading ELF file 'firmware.axf' at location 00000000
Nt: Writing 21556 bytes to 0000 in Flash (assumed clock: unknown)
Pb: 1 of 1 (  0) Writing pages 0-0 at 0x00000000 with 21556 bytes
Ps: (  0) Page  0 at 00000000
Ps: (  0) Page  0 at 00000000: 1024 bytes
Ps: (  4) Page  0 at 00000400: 1024 bytes
Ps: (  9) Page  0 at 00000800: 1024 bytes
Ps: ( 14) Page  0 at 00000C00: 1024 bytes
Ps: ( 19) Page  1 at 00001000: 1024 bytes
Ps: ( 23) Page  1 at 00001400: 1024 bytes
Ps: ( 28) Page  1 at 00001800: 1024 bytes
Ps: ( 33) Page  1 at 00001C00: 1024 bytes
Pb: (100) Writing Flash ended with an error.
Ed:05: File 'firmware.axf' load failure: Ef(8). Invalid address for flash write - not in defined flash.
Pc: (100) Target Connection Failed


I noticed within here the line specifying the flash driver "Loaded LPC11_12_13_8K_2K.cfx: LPC11_12_13 (8K Flash, min 2K RAM)" and subsequently went into my project context menu->Properties->C/C++ Build->MCU Settings->Edit and changed the Flash Driver to be LPC11_12_13_32K_8K.cfx however it doesn't seem to change that line from *8K_2K in the log.

I found this thread which looks suspiciously similar so I wonder if it's possible that this is the same cause and if so is there a magic file that somebody could send me please?

Many Thanks,

Steve
0 Kudos
3 Replies

456 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by scsims on Fri Aug 16 06:09:58 MST 2013
Thanks - I got 2) working with the following command (LPC-Link2) without having to change the symbolic link:

crt_emu_cm_redlink -g -2 -vendor=NXP -pLPC11U24/401 -s250 -flash-load-exec "/home/scsims/bin/lpcxpresso_5.2.6/workspace/firmware/Release/firmware.axf" -flash-driver=LPC11_12_13_32K_8K.cfx -wire=redlink

Thanks again for your help,

Steve
0 Kudos

456 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by scsims on Fri Aug 16 05:08:00 MST 2013
Thank you very much for your prompt reply. I hadn't actually checked the debug functionality after changing the flash driver as I went straight to the flash programmer to see the log; so I now have debug working again.

Regarding running the flash programmer from the command line, because I'm using Ubuntu 64-bit I get the error:
Et: Failed emulator initialization: E(xx). HID driver load/install error: libRDB_Link.so. libusb-1.0.so.0: wrong ELF class: ELFCLASS64

I'm assuming therefore that crt_emu_lpc11_13_nxp is linking to /usr/lib/libusb-1.0.so.0 -> /usr/lib/x86_64-linux-gnu/libusb-1.0.so.0 instead of the one in <install dir>/lpcxpresso/bin/libusb-1.0.so.0. Do you know of any way to force a linux command line application to link to a specific library other than by changing the link in /usr/lib? What command does the GUI flash programmer use?

Many Thanks,

Steve
0 Kudos

456 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Fri Aug 16 04:14:38 MST 2013
I am sorry for the problems you are experiencing. It looks like you have stumbled across two issues here:

1. Our configuration file for the LPC11U24/401 has the wrong flash driver defined. As you noticed, it should be LPC11_12_13_32K_8K.cfx. Changing this in the Memory Configuration Editor will fix this (for the debugger - see below)

2. There is an issue with the GUI Flash utility ignoring the flash driver specified in the Memory Configuration Editor. You can work around this by running directly from the command line:
crt_emu_lpc11_13_nxp -g -2 -vendor=NXP -pLPC11U24/401 -s250  -flash-driver=LPC11_12_13_32K_8K.cfx  -wire=hid -flash-load-exec "your_application.axf"

Both of these issues will be fixed in a future release.

0 Kudos