No longer able to program flash

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

No longer able to program flash

861 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by sbishop77 on Thu Oct 29 16:13:09 MST 2015
I am working on a dual-core application targeting the LPCXpresso 54102 evaluation board.  After recently making some simple changes to the C code, I am no longer able to flash the device.  I get this message:


Quote:
Ni: LPCXpresso RedlinkMulti Driver v7.8 (May 28 2015 03:19:07 - crt_emu_cm_redlink.exe build 388)
Pc: (  0) Reading remote configuration
Pc: (  5) Remote configuration complete
Nc: Probe Firmware: LPC-Link-II CMSIS-DAP (NXP)
Nc: VID:PID:  1FC9:0090
Nc: USB Path: \\?\hid#vid_1fc9&pid_0090&mi_00#7&1ab974eb&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
Pc: ( 30) Emulator Connected
Xw:
Xc:
Pc: ( 40) Debug Halt
Pc: ( 50) CPU ID
Nc: Emu(0): Conn&Reset. DpID: 2BA01477. CpuID: 410FC240. Info: (null)
Nc: Debug protocol: SWD. RTCK: Disabled. Vector catch: Disabled.
Nc: loaded v.2 On-chip Flash Memory LPC5410x_512K.cfx
Nc: image 'LPC5410x (512K Flash) May 21 2015 09:32:17'
Pc: ( 65) Chip Setup Complete
Nt: Connected: was_reset=true. was_stopped=false
Cr:v LPCXpresso Free License - Download limit is 256K
Pc: ( 70) License Check Complete
Nt: Loading ELF file 'spectrum-analyzer-m4-master.axf' at location 00000000
Nt: Writing 24940 bytes to address 0x00000000 in Flash
Pb: 1 of 1 (  0) Writing pages 0-0 at 0x00000000 with 24940 bytes
Ps: (  0) at 00000000: 0 bytes - 0/24940
Ps: ( 65) at 00000000: 16384 bytes - 16384/24940
Ps: (131) at 00004000: 16384 bytes - 32768/24940
Nc: Progress meter completed at over 100% (32768/24940 bytes)
Nt: Erased/Wrote page  0-0 with 24940 bytes in 397msec
Pb: (100) Finished writing Flash successfully.
Nt: Flash Write Done
Nt: Loaded 0x616C bytes in 527ms (about 47kB/s)
Nt: Loading ELF file 'spectrum-analyzer-m4-master.axf' at location 020108E4
Nt: Writing 4 bytes to address 0x020108E4 in Flash
Ed:05: File 'spectrum-analyzer-m4-master.axf' load failure: Eg(10). Attempt to load into missing flash area.
Pc: (100) Target Connection Failed



I don't know why it no longer working.  Any help would be appreciated.  I have attached my projects in a single ZIP file.

Original Attachment has been moved to: projects_0.zip

0 Kudos
6 Replies

682 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by sbishop77 on Mon Nov 02 12:42:13 MST 2015
That worked.  Thank you very much!
0 Kudos

682 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Mon Nov 02 02:10:32 MST 2015
Please can you try building and downloading your image using LPCXpresso IDE v7.9.2.

I believe your issue is related to one of the multicore project related fixes that we made in LPCXpresso IDE v7.9.0 : https://www.lpcware.com/content/forum/lpcxpresso-latest-release

You can safely install LPCXpresso v7.9.2 without uninstalling your current version. And then for testing purposes, you might want to create a new workspace and import your existing projects into it.

Regards,
LPCXpresso Support
0 Kudos

682 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by sbishop77 on Fri Oct 30 11:53:37 MST 2015
Yes, that's from using the "Program Flash" button in the LPCXpresso (version 7.8.0, build 426) tool bar.  (I'm sorry, I should have mentioned that earlier.)

Here's the command line:

Quote:
crt_emu_cm_redlink -flash-load-exec "C: xp\workspace\54102\spectrum-analyzer-m4-master\Release\spectrum-analyzer-m4-
master.axf" -g -2 -vendor=NXP -pLPC54102J512 -reset=vectreset -flash-driver=LPC5410x_512K.cfx



And I have attached my AXF file.
0 Kudos

682 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Fri Oct 30 11:18:06 MST 2015
I can't reproduce your problem here using the project that you supplied.

Looking at your original log (from using the GUI flash programmer I presume?) the curious thing is the lines:

Nt: Loading ELF file 'spectrum-analyzer-m4-master.axf' at location 020108E4
Nt: Writing 4 bytes to address 0x020108E4 in Flash
Ed:05: File 'spectrum-analyzer-m4-master.axf' load failure: Eg(10). Attempt to load into missing flash area.


the address of which is in RAM, and hence shouldn't be being programmed as flash anyway!

Can you ZIP up and provide the actual AXF file that you are trying to flash?

And also provide the actual command line displayed at the top of the GUI flash programmer after it runs.

Regards,
LPCXpresso Support
0 Kudos

682 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by sbishop77 on Fri Oct 30 10:33:27 MST 2015
No, the application does not configure for low power or use sleep mode.

I have followed the linked-to instructions, but I still get the same error message when attempting to flash an image.

Also, I realize that flashing the board and starting a debug session is a similar process; but just to be clear, I have no trouble starting a debug session.  (And in case this matters in terms of replicating the problem, note that the image I am attempting to flash is compiled in a "release" configuration.)

And in case you're wondering, I can't just use a debug session, unfortunately.  The code running on the M0+ is very time sensitive, but the overhead of a debug session on the M0+ is significant.  (The M4 is fine.  I assume the M4 has support for hardware breakpoints and the like while the M0+ doesn't?)

One more thing.  I have two boards, and I see the same issue with both of them.
0 Kudos

682 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Thu Oct 29 16:51:00 MST 2015
Does your application configure for low power, or use a sleep mode? If so, boot the part into the ISP before you start your debug session. In fact, do it anyway.

Regaining debug access to target MCU

Thanks and regards,
LPCXpresso Support
0 Kudos