NOTICE:  LPCWare.com is moving to nxp.com.  The LPCware.com Forums are now read-only. Forum content has been migrated to community.nxp.com. LPCware.com user accounts could not be migrated due to security restrictions.  We encourage you to create a user account on nxp.com to use the new community forums and access NXP microcontroller content. We greatly appreciate your contributions to the LPC community and look forward to seeing you at our new web location.

 

CRP problems

3 replies [Last post]
jc.wang
Offline
Joined: 2013-02-05
Posts: 6

I tried and build a project, with different CRP_WORD constant, see below
code snippets:

main.c:
:
#include
#include
//__CRP const unsigned int CRP_WORD = CRP_CRP2;
__CRP const unsigned int CRP_WORD = CRP_NO_CRP ;

:

then I compared the result .hex files, I found the only difference is at
address 0x2FC: (As expected)

///// CRP_WORD = CRP_CRP2
:
:1002D000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF2E
:1002E000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF1E
:1002F000FFFFFFFFFFFFFFFFFFFFFFFF21436587BA
:

///// CRP_WORD = CRP_NO_CRP
:
:1002D000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF2E
:1002E000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF1E
:1002F000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0E
:

But, when I built another project, with different CRP_WORD constant,
I got identical .hex files. I also found that at address 0x2fc, the space
seems are occupied by the object codes, not remained empty like pervous
project does:

:
:1002D0001080000080B582B000AF074A074BD358AA
:1002E0001A1CBB1D1A80044ABB1D1988044BD1502F
:1002F000BD4602B080BDC04600000250188000001C
:

What was wrong?
Any hints would be appreciated!

PS. My development tool is LPCXpresso v4.1.0
Both projects use CMSISv1p30_LPC11xx

=========================================================

0
Your rating: None

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
daniel.widyanto
Offline
Joined: 2010-05-26
Posts: 132

Hi,

Check the Project Properties (right click on project name and select 'Properties')->C/C++ Build->Settings->MCU Linker->Target.

The 'Enable Code Read Protect' should be ticked.

[ATTACH]866[/ATTACH]

PreviewAttachmentSize
crp_settings.jpg20.28 KB

Regards,
-Daniel Widyanto
NXP Application Support

Post your MCU questions to LPCWare.com forum, and get better support from us

Regards,
-Daniel Widyanto
NXP Application Support

Post your MCU questions to LPCWare.com forum, and get better support from us

jc.wang
Offline
Joined: 2013-02-05
Posts: 6

Yes, it works! You saved my life! Thanks a lot!! Laughing out loud

daniel.widyanto wrote:
Hi,

Check the Project Properties (right click on project name and select 'Properties')->C/C++ Build->Settings->MCU Linker->Target.

The 'Enable Code Read Protect' should be ticked.

[ATTACH]866[/ATTACH]

CodeRedSupport
Offline
Joined: 2009-12-06
Posts: 4268

Background information here....

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

Regards,
CodeRedSupport

feedback