LPC link not erasing flash on new debug

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

LPC link not erasing flash on new debug

327 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpc_user on Tue Jan 29 21:07:41 MST 2013
Hi. I have just started using my LPCxpresso 1768/1769 dev boards and I am having some trouble with lpcxpresso 5.0.14  Sometimes old code is retained on the device even after trying to debug new projects. I had some code on the board which used uart0 to send some messages. Now even after loading a new workspace, importing all the demo projects again, and then trying to debug the supplied uart example (which uses uart3) the board keeps sending the message on uart0 each time I debug. Since there is no erase flash button, nor is there a program flash button and it seems these processes are entrusted to the IDE, I cant see how to ensure the IDE actually does this.

I've watched the very few videos I could find and I have made sure focus is on the right part of project explorer during builds etc.

I hope someone can help with this, it is extremely frustrating.
0 Kudos
7 Replies

304 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Wed Jan 30 01:57:07 MST 2013
To investigate this we would really need an actual example project, plus exact instructions on how to reproduce. If you can't send a project, then sending two AXF files (a "before" and "after"), plus corresponding linker map files may be sufficient.

Note, the below recent thread contains details of how to cause a mass erase "automatically" before each debug launch.

http://knowledgebase.nxp.com/showthread.php?t=4085

You might find that you can use this as a "workaround" for now.

Regards,
CodeRedSupport
0 Kudos

304 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpc_user on Tue Jan 29 22:45:11 MST 2013
Yeah it isn't doing it consistently for me. But I can at least see changes on the device now using the manual programming button. Thanks for the help!
0 Kudos

304 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Tue Jan 29 22:38:29 MST 2013

Quote: lpc_user
...you have to clean, then build, the debug in order to see the changes?



No, usually a simple Build / Debug is doing the job :)
0 Kudos

304 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpc_user on Tue Jan 29 22:27:08 MST 2013
There are no error messages that I can spot at least.

I guess I am not using the IDE correctly. If you have code that is sending "ttt\r\n" on uart0 in a while(1) loop, then you change said code to instead send "bbb\r\n", you have to clean, then build, the debug in order to see the changes?

I'll look into the alternative loaders you suggested. Thanks again!
0 Kudos

304 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Tue Jan 29 22:14:29 MST 2013
No error messages ?

Are we talking about LPCXpresso1769 boards ?

Did you use CRP ?

Try ISP bootlader (http://www.support.code-red-tech.com/CodeRedWiki/DebugAccessChip) and use FlashMagic (http://www.flashmagictool.com). That's independent from SWD  :)


Quote:
EDIT: OK I just tried the erase option in the chip programming window  and I managed to stop the device sending the message on uart0. Do you  really have to do these steps manually to ensure it works?

No :eek: If debugging isn't working there's a problem somewhere :)
0 Kudos

304 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpc_user on Tue Jan 29 21:57:13 MST 2013
Thanks for those suggestions. I had tried those options and I just tried again with no improvement. Whichever axf file I choose in the program flash dialog, and with mass erase selected, uart0 still sends the same message on power up. even flash files form workspaces before I was using uart0 and from demo programs that dont even use a uart.

EDIT: OK I just tried the erase option in the chip programming window and I managed to stop the device sending the message on uart0. Do you really have to do these steps manually to ensure it works?
0 Kudos

304 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Tue Jan 29 21:50:00 MST 2013
#1 Try to Clean your Project and Build it again :)

#2 Use 'Flash Program' Button (little chip icon) to program your *.axf file. There you can select 'Mass erase' ('Erase option') to delete your complete flash ;)
0 Kudos