CRP problems

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

CRP problems

1,771 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by jc.wang on Sun Oct 14 20:03:11 MST 2012
I tried and build a project, with different CRP_WORD constant, see below
code snippets:

[FONT=Courier New]main.c:[/FONT]
  :
[FONT=Courier New]#include <cr_section_macros.h>
#include <NXP/crp.h>
//__CRP const unsigned int CRP_WORD = CRP_CRP2;
__CRP const unsigned int CRP_WORD = CRP_NO_CRP ;[/FONT]
  :

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

[FONT=Courier New]///// CRP_WORD = CRP_CRP2
   :
:1002D000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF2E
:1002E000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF1E
:1002F000FFFFFFFFFFFFFFFFFFFFFFFF21436587BA
   :

///// CRP_WORD = CRP_NO_CRP
   :
:1002D000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF2E
:1002E000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF1E
:1002F000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0E
   :
[/FONT]

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:

[FONT=Courier New]   :
:1002D0001080000080B582B000AF074A074BD358AA
:1002E0001A1CBB1D1A80044ABB1D1988044BD1502F
:1002F000BD4602B080BDC04600000250188000001C
   :[/FONT]

What was wrong?
Any hints would be appreciated!

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

=========================================================
0 Kudos
Reply
3 Replies

1,717 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Mon Oct 15 03:02:26 MST 2012
Background information here....

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

Regards,
CodeRedSupport
0 Kudos
Reply

1,717 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by jc.wang on Mon Oct 15 01:14:40 MST 2012
Yes, it works!  You saved my life!  Thanks a lot!! :D


Quote: daniel.widyanto
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]

0 Kudos
Reply

1,717 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by daniel.widyanto on Sun Oct 14 20:46:04 MST 2012
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]
0 Kudos
Reply