EmbeddedRelated.com
Forums
Memfault Beyond the Launch

Code read protection LPC2132

Started by "andreas.jurk" May 27, 2008
Hello,

actually I'm working with the LPC2132 uC and with the development
software uvision3 from Keil. I'd like to protect my source code by
enabling the code read protection. Through the datasheet I know that I
have to write the constant 0x87654321 to adress 0x1FC.
When I look into the Flash after programming the uC(Code read
protection isn't enabled yet) I can see that at the adress 0x1FC data
is written.

So how can I write the constant to this adress without damaging my
code?
Maybe someone can sent me a little bit of C code or a hint to solve my
problem.

kind regards

Andreas

An Engineer's Guide to the LPC2100 Series

Hello,

If you are using CARM compiler then you can simply use __at
keyword. But with RealView, you have to play with the .sct file. This link
should provide you with the solution in case of RealView. Remember RealView
doesn't support __at keyword.

http://www.keil.com/support/docs/3237.htm

With Regards,

Nishant Agrawal,

Design Engineer,

Real Time Solutions Pvt. Ltd.,

58 Samarpan Marg, Tripureshwor,

Kathmandu, Nepal.

Tel: +977-01-4253717,

Mobile: +977-9841259267,

Skype: nishant.rts

From: l... [mailto:l...] On Behalf Of
andreas.jurk
Sent: Tuesday, May 27, 2008 12:03 PM
To: l...
Subject: [lpc2000] Code read protection LPC2132

Hello,

actually I'm working with the LPC2132 uC and with the development
software uvision3 from Keil. I'd like to protect my source code by
enabling the code read protection. Through the datasheet I know that I
have to write the constant 0x87654321 to adress 0x1FC.
When I look into the Flash after programming the uC(Code read
protection isn't enabled yet) I can see that at the adress 0x1FC data
is written.

So how can I write the constant to this adress without damaging my
code?
Maybe someone can sent me a little bit of C code or a hint to solve my
problem.

kind regards

Andreas



Memfault Beyond the Launch