Hi Rui, You can use the following assembler code if you are using GAS. Including the stub below in your startup code. As part of building procedure, I check and panic if the symbol "crpWord" resolves to something other than 0x1fc -- this can happen when code is moved around. Hope this helps. Jaya PS: (Caveat) I refute claims that enabling CRP protects on-chip flash contents. > @ enable/disable CRP > .set CRP_WORD, 1 > > [ other manifests here ] > > .section .init > > [ startup code here ] > >.if CRP_WORD > .code 32 > > @ CRP location > . = 0x1fc > > .global crpWord >crpWord: > @ CRP contents > strhib r4, [r5, -r1, lsr #6]! > >.endif --- In lpc2000@yahoogroups.com, Rui Gonçalves <rpsgoncalves@...> wrote: > > You are absolutly right Karl. > I've tested and it works just fine. > Thanks, once more. > > Another question. > How can I place same assembler code before position > 0x01FC? And C code (compiled with gnuarm)? > > Rui Gonçalves Send instant messages to your online friends http://au.messenger.yahoo.com
Message
Re: How to protect code in LPC2129
2006-02-19 by Jayasooriah
Attachments
- No local attachments were found for this message.