crt_emu_cm3_nxp and CRP1

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

crt_emu_cm3_nxp and CRP1

1,323 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by blasiis on Tue May 08 06:28:50 MST 2012
When I use the comamnd-line program flash like crt_emu_cm3_nxp what protection is activated ?
None or CRP1 ?
I would not use ISP and flashmagic utility !

Thanks
0 Kudos
29 Replies

1,172 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Fri Jul 06 01:32:43 MST 2012

Quote: Serge
...your LPC1343...



:confused: LPC1343 :confused:
0 Kudos

1,172 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by serge on Fri Jul 06 01:26:28 MST 2012
Yes, if you have set CRP3 and did not provide the IAP calls in your program then you succesfully brought your LPC1769 to his end. :eek:

Was indeed a 1769. My mistake Zero. I own you a case of beer. Would a nice Belgium Kriek beer be ok?
0 Kudos

1,172 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by ju2low on Wed Jul 04 23:50:06 MST 2012

Quote: Zero
If you haven't provided IAP / or ISP functions in your code, your LPC is now locked successfully and just pulling low P2.10 isn't working ;)



So, Did I break my LPC Board?:(
0 Kudos

1,172 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Wed Jul 04 23:39:52 MST 2012

Quote:

CRP3 0x43218765 This is similar to CRP2, but ISP entry by pulling P2.10 LOW is disabled if a valid user code is present in flash sector 0.
This mode effectively disables ISP override using the P2.10 pin. It is up to the user’s application to provide for flash updates by using IAP
calls or by invoking ISP with UART0. Caution: If CRP3 is selected, no future factory testing can be performed on the device

If you haven't provided IAP / or ISP functions in your code, your LPC is now locked successfully and just pulling low P2.10 isn't working ;)
0 Kudos

1,172 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by ju2low on Wed Jul 04 23:31:32 MST 2012

Quote: TheFallGuy
"Target marked as not debuggable" normally means that you have set CRP in your target. That will have disabled debug and so LPC-Link (or any other debugger) cannot connect. Depending on which CRP you have set, you may be able to erase the flash by using FlashMagic through a serial port and recover your chip.



If I have used CP3, is it possible to reset LPC1769 ? How ?
0 Kudos

1,172 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by TheFallGuy on Wed Jul 04 01:12:28 MST 2012
"Target marked as not debuggable" normally means that you have set CRP in your target. That will have disabled debug and so LPC-Link (or any other debugger) cannot connect. Depending on which CRP you have set, you may be able to erase the flash by using FlashMagic through a serial port and recover your chip.
0 Kudos

1,172 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by ju2low on Wed Jul 04 00:39:20 MST 2012
Hello everyone,

I recently received my new LPCLINK and its Cortex M3 1769, and unfortunately I have this recurrent message.

I'm rookie with all this NXP & XPRESSO stuff so I'm looking for your help !!!

My situation:
Plugged on front USB port on my computer with LPCLINK

I have tried to erase memory but I received this
---------------------------------------------------------------------------------------------------------
PROGRAM FLASH
crt_emu_cm3_nxp -g -2 -vendor=NXP -pLPC1751 -s250 -flash-mass  -wire=hid

Pc: (  0) Reading remote configuration
Ni: LPCXpresso Debug Driver v4.0 (May 21 2012 21:42:41)
Nc: Looked for chip XML file in C:/nxp/LPCXpresso_4.2.3_292/lpcxpresso/bin/LPC1751.xml

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

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

Pc: (  5) Remote configuration complete
Xe:
Pc: ( 15) nSRST assert (if available)
Ed:02: Failed on connect: Ep(01). Target marked as not debuggable.
Et: Emu(0): Connected. Was: None. DpID:     EDB6. Info: T1S6RGRIA
Error 0: (null)
Last sticky: 0. AIndex: 0
---------------------------------------------------------------------------------------------------

I have FLASHMAGIC but also with this program, I can't establish communication for read ISP security... something about autobaud with ALL Baudrate...

Sorry for the long post...

Keep looking for solutions....
0 Kudos

1,172 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by gogamoga on Wed May 09 05:58:08 MST 2012
You can as long as you include dependencies such as libLPC_Link.so and LPCXpressoWIN.enc and probably the dfu-util and the old libusb-0.1
(not sure about the license of nxp and CodeRed software)

Generally, the required dependencies are just 2 thing: the libLPC_Link.so and LPCXpressoWIN.enc, you can get along with dfu-util that is already present on the system (I have one on FreeBSD and i am using it actually)

And... take a look at my thread

I have made open version of libLPC_Link (as a part of my effort porting this shit to FreeBSD)

You might find something usefull in the source code.
crt emu communicates with the devboard via this solib.

Lol, just remembered some extras. there are xme and xml files that are also required dependencies.
the ones you need depend on your board. Just make a copy of crt_emu_cm3_nxp somewhre outside the lpcxpresso/bin, copy the libLPC_Link.so into it and try running the crt_emu_cm3_nxp and see what it complains about.

PS.
Eventually i am planning to make opensource out of all the lpcxpresso toolset, but it will take quite a while (too much reversing to be done)
0 Kudos

1,172 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by blasiis on Wed May 09 05:52:01 MST 2012
check this out:
./crt_emu_cm3_nxp -info-target -wire=winusb
All the error codes come from there :D[/QUOTE]
This command reply same:
Ed:02: Failed on connect: Ep(01). Target marked as not debuggable.
Et: Emu(0): Connected. Was: None. DpID:     EDB6. Info: T1S6RGRIA

Anyway now I have understood the problem and is OK !
----------------------------------------------------------------------------------------
   Let me give you another little question: In my production, can I use the executable crt_emu_cm3_nxp without installing lpcxpresso ?
0 Kudos

1,172 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by gogamoga on Wed May 09 05:13:33 MST 2012

Quote: blasiis

...The error messagge "Ed:02: Failed on connect: Ep(01). Target marked as not debuggable" is misleading



The errors reported by IDE are totally useless. And, targets are marked non-debugable returned by crt_emu_cm3_nxp all the time (at least on my lpc11u14)

check this out:
./crt_emu_cm3_nxp -info-target -wire=winusb


All the error codes come from there
0 Kudos

1,172 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by blasiis on Wed May 09 04:35:26 MST 2012
The problem was this :

__CRP const unsigned int CRP_WORD = CRP_CRP1 ;:D
The error messagge "Ed:02: Failed on connect: Ep(01). Target marked as not debuggable" is misleading
0 Kudos

1,172 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Wed May 09 02:45:07 MST 2012

Quote: blasiis
...CRP was actived, but I do not know how; I never used the-flash-protect option



So what is your CODE writing to 0x002FC?

Did you enable CRP in target image of your project?

If CRP1 is set in your code, flash programming tool is not deleting this value ;)

So you can set CRP1 (via Code) without setting protect option in flash programming tool :eek:
0 Kudos

1,172 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by blasiis on Wed May 09 02:23:18 MST 2012
OK, solved the problem.
After erase all from ISP all goes correctly.
Therefore the protection of CRP was actived, but I do not know how; I never used the-flash-protect option
0 Kudos

1,172 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Wed May 09 02:21:05 MST 2012

Quote: blasiis
In the case, for error,  CRP1 was settet, the message is the same ?
Now try to delete it by ISP and flashmagic



Yes, CRP settings is another reason for the "Target marked as not debuggable" error.
0 Kudos

1,172 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Wed May 09 02:01:19 MST 2012
#1 After setting CRP1, SWD is disabled. So it's no surprise that your LPCXpresso refuses to work :rolleyes:

#2 If you don't know what if CRP1 is set or not, use FlashMagic: ISP-Read -> Security :) It will show you '[COLOR=Red]CRP is at level 1[/COLOR]'
0 Kudos

1,172 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by blasiis on Wed May 09 01:57:06 MST 2012
In the case, for error,  CRP1 was settet, the message is the same ?
Now try to delete it by ISP and flashmagic
0 Kudos

1,172 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Wed May 09 01:50:52 MST 2012
Perhaps you didn't understand what I meant.

If you have your own *custom* board. The debugger is unable to make a connection because you have a hardware problem which needs fixing. I gave some clues as to what might be wrong...

If you have a standard board, you still have a hardware problem...
0 Kudos

1,172 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by blasiis on Wed May 09 01:17:47 MST 2012

Quote: CodeRedSupport
I assume you have your own board?

We have found that "Target marked as not debuggable" is often caused by
1. plugging the debug cable in the wrong way round
2. insufficient power being supplied to the board
3. incorrect debug circuit

If you have have inserted the cable correctly, I suggest you review your debug circuit, and power. For more information, see
http://support.code-red-tech.com/CodeRedWiki/HardwareDebugConnections



Yes obviously I have a board
- I have check the cable
- Changed the lpclink
- verified the power
0 Kudos

1,172 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Wed May 09 01:01:00 MST 2012
I assume you have your own board?

We have found that "Target marked as not debuggable" is often caused by
1. plugging the debug cable in the wrong way round
2. insufficient power being supplied to the board
3. incorrect debug circuit

If you have have inserted the cable correctly, I suggest you review your debug circuit, and power. For more information, see
http://support.code-red-tech.com/CodeRedWiki/HardwareDebugConnections
0 Kudos

1,172 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by blasiis on Wed May 09 00:27:49 MST 2012
I use LPCLINK on Win 7.
I use the command lines:

1) C:\nxp\LPCXpresso_4.2.2_275\lpcxpresso\bin\Scripts\bootLPCXpresso.cmd  hid
Booting LPC-Link with LPCXpressoHS.enc

2) C:\nxp\LPCXpresso_4.2.2_275\lpcxpresso\bin\crt_emu_cm3_nxp  -wire=hid -pLPC1758 -flash-load=loader.axf
Ni: LPCXpresso Debug Driver v4.0 (Mar 24 2012 17:40:00)
Nc: Looked for chip XML file in C:/nxp/LPCXpresso_4.2.2_275/lpcxpresso/bin/LPC1758.xml

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

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

Xe:
Ed:02: Failed on connect: Ep(01). Target marked as not debuggable.
Et: Emu(0): Connected. Was: None. DpID:     EDB6. Info: T1S6RGRIA
Error 0: (null)
Last sticky: 0. AIndex: 0
No MemAp selected
No Speed test
SWD Frequency: 3000 KHz. RTCK: False. Vector catch: False.
Packet delay: 0  Poll delay: 0.
0 Kudos