LPC-Link on LPC1788

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

LPC-Link on LPC1788

3,134 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Andrea Iachini on Wed May 09 06:26:17 MST 2012
Using:
- LPCxpresso 4.2.2 registered to 128K (on 2 PC)
- 3 LPC-LINK LPCxpresso LPC11U14 Rev.A
- 3 OemBaseBoard + 5 OemBoard from Embedded artist for LPC1788
- Needs 512K flash option.
- 2 Custom Board with LPC1788.

The main problem is:
"04: Failed to erase flash: EF(9) Flash erase or write operation aborted"
This happens on all the combination of the aboved tools.
Tipically this happen about the 50% of the writing process.
It seems to depend by some "project configuration"on the IDE; if we change project... flashing works; returning to the previous project flashing gives error....
It seems to depend also by the board, changing the board alla works for a certain time.

Sometimes we have other error as "Commit Flash Write"; of "target error" during debug.

FYI: we observe the rate of rise of the percentage on the flash writing phase; if this is high (or become high during the phase) flashing gives error; if it is slow the operation is OK.

Have someone worked seriously with LPCXpresso & LPC1788?? And it works??
There is something to do, to work in an acceptable manner??
There is an IDE with emulator that works better?
0 Kudos
Reply
11 Replies

3,058 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Wed May 16 03:03:57 MST 2012
So you are using the GUI flash tool, as per...

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

?

Can you clarify exactly what you are doing in this dialog (which options you have selected) and also turn on the progress log option and send us the log text generated when the tool completes.

Then post the debug log file from when you then launch the debug session after using the above tool.

You also mentioned right at the start of this thread that...


Quote:
It seems to depend by some "project configuration"on the IDE; if we  change project... flashing works; returning to the previous project  flashing gives error....



Would it be possible for you to provide two such images (ie one which works, then a second that causes the failure)? Probably the easiest thing to do here would be to take a copy of the project at the point where you see a failure, then modify the original project until it "works".

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

It would be useful here to get both the linker map file, and also the axf file - assuming that source project cannot be supplied. And this can be done "off forum" if you prefer - just zip the files up and send them to support at code-red-tech.com, with a reference to this forum thread.

If you can send buildable projects, then please see this FAQ for details of how to export them from your workspace...

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

Regards,
CodeRedSupport.
0 Kudos
Reply

3,058 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Andrea Iachini on Tue May 15 07:48:37 MST 2012
Next time i will try.

At the moment i have resolved (as said before) simply clicking the "program flash" button, and then retrying "Debug" button; it seems to work always.
0 Kudos
Reply

3,058 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Tue May 15 06:10:23 MST 2012
And have you tried the tests I suggested back on 9th May yet?

My suspicion at present is that you are putting some code into flash that is destabilising the part, and preventing the debug tools obtaining control when you try to reconnect. Try booting the board into ISP mode, or enabling the "vector catch" functionality in the debug launch configuration, as detailed in the FAQ that I previously pointed you at. Then let us know if either of these allow you to connect to your board.

Note that I have again just run a series of tests here using LPCXpresso 4.2.2, an LPC-Link and an Embeddded Artists LPC1788 board, and see no problems.

Regards,
CodeRedSupport
0 Kudos
Reply

3,058 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Andrea Iachini on Tue May 15 04:53:52 MST 2012
LPCXpresso Debug Driver v4.0 (Feb 17 2012 17:57:25)
Looked for chip XML file in C:/NXP/LPCXpresso_4.2.0_264/lpcxpresso/bin/LPC1788.xml
Looked for vendor directory XML file in C:/NXP/LPCXpresso_4.2.0_264/lpcxpresso/bin/nxp_directory.xml
Found generic directory XML file in C:/NXP/LPCXpresso_4.2.0_264/lpcxpresso/bin/crt_directory.xml
Emu(0): Conn&Reset. DpID: 2BA01477. Info: T1S6RGRIA
SWD Frequency: 3000 KHz. RTCK: False. Vector catch: False.
Packet delay: 0  Poll delay: 0.
NXP: LPC1788  Part ID: 0x281D3F47
Connected: was_reset=false. was_stopped=false
v Registered license, download limit of 128K
License status is Full
Command In: $qSupported:multiprocess+;qRelocInsn+
Unsupported feature multiprocess
Unsupported feature qRelocInsn
Reply: +$PacketSize=4000;qXfer:memory-m...
Command In: $!
Reply: +$OK
Command In: $Hg0
Unsupported command H
Command In: $qXfer:features:read:target.xml:0,fff
Reply: +$l<?xml version="1.0"?><!DOCTYP...
Command In: $?
Reply: +$S00
Command In: $Hc-1
Unsupported command H
Command In: $qC
Unsupported command q
Command In: $qAttached
Unsupported command q
Command In: $qOffsets
Reply: +$
Command In: $g
Note PC=0x00000136
Reply: +$0000000088fd00100000010000c008...
Command In: $qXfer:memory-map:read::0,fff
Reply: +$l<?xml version="1.0"?><!DOCTYP...
Command In: $m136,4
Reply: +$fee7fee7
Command In: $qSymbol::
Unsupported command q
Command In: $qTStatus
Unsupported command q
Command In: $qRcmd,6361706162696c6974696573
Reply: +$OK
Command In: $qRcmd,6f6e646973636f6e6e65637420636f6e74
Reply: +$OK
Command In: $vFlashErase:00000000,00018000
Reply: +$OK
Command In: $vFlashWrite (len=16378, rest clipped)
Reply: +$OK
Command In: $vFlashWrite (len=16369, rest clipped)
Reply: +$OK
Command In: $vFlashWrite (len=16377, rest clipped)
Reply: +$OK
Command In: $vFlashWrite (len=16372, rest clipped)
Reply: +$OK
Command In: $vFlashWrite (len=635, rest clipped)
Reply: +$OK
Command In: $vFlashWrite (len=16373, rest clipped)
Reply: +$OK
Command In: $vFlashWrite (len=12700, rest clipped)
Reply: +$OK
Command In: $vFlashWrite (len=119, rest clipped)
Reply: +$OK
Command In: $vFlashDone
Writing 93804 bytes to 0000 in Flash (assumed clock: 120.0MHz)
15: Target error from Commit Flash write: Et: Flash driver not ready.
Command In: $qRcmd,696e666f2c616c6c
Reply: +$OK
Command In: $qfThreadInfo
Unsupported command q
Command In: $qL1200000000000000000
Unsupported command q
Command In: $m1000fd6c,4
Reply: +$00500061
Command In: $m1000fd40,40
Reply: +$c60400000100000003000000000000...
Command In: $m94ec,4
Reply: +$70b5fff7
Command In: $m94d0,2
Reply: +$f9f7
Command In: $m33b2,4
Reply: +$6ff07f40
Command In: $m3594,2
Reply: +$d7f8
Command In: $m34f6,2
Reply: +$4ff4
Command In: $m3332,2
Reply: +$48f2
Command In: $m34e2,2
Reply: +$4ff0
Command In: $m3310,2
Reply: +$3b46
Command In: $Z1,3310,2
Reply: +$OK
Command In: $Z1,3332,2
Reply: +$OK
Command In: $Z1,34e2,2
Reply: +$OK
Command In: $Z1,34f6,2
Reply: +$OK
Command In: $Z1,3594,2
Reply: +$OK
Command In: $vCont?
Unsupported command v
Command In: $Hc0
Unsupported command H
Command In: $c
0 Kudos
Reply

3,058 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Mon May 14 03:24:32 MST 2012
As an absolute minimum, if you want any help, then please provide the debug log !

Regards,
CodeRedSupport
0 Kudos
Reply

3,058 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Andrea Iachini on Mon May 14 03:14:51 MST 2012
Update:

Today the problem reoccurred; it has been resolved using the "program flash" button (same error) and returning to "debug button" (restart to work).

For the speed, the comparison is made for the same project beetween the correct operation :)(percentage increase slowly) and the bad operation :mad:(percentage increase fastly); maybe the lpclink believe that flash block require no update and skip??
0 Kudos
Reply

3,058 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Fri May 11 04:34:26 MST 2012
It is good to hear that you are working. However if you want us to try to look into the issues that you have been seeing (including the "slow flashing" you still mention), then please go through the procedure that I previously asked you to and report the results - including providing the debug log.

The other point regarding "slow flashing" is - what is this in comparison to? Did you previously have LPCXpresso/LPC-Link working and flashing at a "faster speed" ?? Remember that LPC-Link is a "cheap and cheerful" debug probe - Red Probe+ will provide a much faster download and general debug performance.

Regards,
CodeRedSupport
0 Kudos
Reply

3,058 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Andrea Iachini on Thu May 10 23:55:54 MST 2012
Yesterday the system return to work misteriously, (flashing speed always slow), next time the prbolem will occurs, i will update this post.
0 Kudos
Reply

3,058 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Andrea Iachini on Wed May 09 08:10:20 MST 2012
Another info:
Sometime when i cant' connect with debugger (bug icon) i can suuccessfully program using the "program flash" (chip icon on lpcxpresso).

In any case i ALWAYS can program the flash with FlashMagic
0 Kudos
Reply

3,058 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Wed May 09 07:29:16 MST 2012
In the first place, please ensure that you are providing sufficient power to the boards - particularly if you are just using USB.  If you are, make sure you are connecting to the correct USB port on the board, and preferably use a powered USB hub rather than just the supply from your PC. Better still, use an external power supply.

Power supply is a particular thing to watch with LPC1788 boards, which often have a big LCD screen to drive too.  Please check the Embedded Artists documentation for exact power requirements here.

Anyway, after checking your power, please can you try the following:

[LIST]
[*]Create a new workspace (File -> Switch workspace).
[*]Import the LPC177x_8x CMSIS library project from the LPCXpresso examples subdirectory.
[*]Use the project wizard to create a new LPC1788 "semihosting C project" with the default settings.
[*]Now power down your board, then bring it back up in ISP mode:
[/LIST]
[INDENT]http://support.code-red-tech.com/CodeRedWiki/DebugAccessChip

[/INDENT]
[LIST]
[*]After selecting the "semihosting C project" that you just created in the Project Explorer view, use the GUI interface to the flash programmer to mass erase the flash (using the options on the "Erase flash memory" tab)...
[/LIST]
[INDENT]http://support.code-red-tech.com/CodeRedWiki/GuiFlashProgramming

[/INDENT]
[LIST]
[*]Now build the  "semihosting C project" that you just created, then use the Debug option on the Quickstart menu to program it to flash and start a debug connection.
[/LIST]
Does this then correctly run?

If not, then please provide the debug log...

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

Regards,
CodeRedSupport
0 Kudos
Reply

3,058 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Wed May 09 06:49:28 MST 2012

Quote: Andrea Iachini
Have someone worked seriously with LPCXpresso & LPC1788?? And it works??



Yes, no problems here with:

-LPC1788 Developer's Kit

-10-pos IDC Ribbon Cable 50 mil

-LPC-Link

Video: http://lpcware.com/content/blog/swim-lesson-2

or http://youtu.be/4mzhiesIh60
0 Kudos
Reply