Author Topic: Important Change Regarding Code Read Protection  (Read 6489 times)

Andy Ayre

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 2124
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Important Change Regarding Code Read Protection
« on: June 11, 2009, 04:01:30 pm »
Previously code read protection was enabled by checking a box in the main window of Flash Magic. This supported only level 2 of CRP.

Starting with Flash Magic 5.11 the code read protection setting is read from the hex file and all CRP levels are supported. If an attempt is made to set the device to CRP3 then the user is prompted for confirmation.

To set the CRP value in your project add something like the following (Keil RealView example):

Code: [Select]
const unsigned long crp __attribute__ ((at(0x1FC))) = 0x87654321;
or:

Code: [Select]
const unsigned long crp __attribute__ ((at(0x2FC))) = 0x87654321;
If you don't wish to use CRP then set the value to zero.

If you have previously programmed hex files without problems and now find that you cannot read the contents of memory or access a few other features then this change is the likely cause. Erase all the flash in the device and add the above line (or similar).

Andy
« Last Edit: June 15, 2009, 09:14:07 am by Andy Ayre »
Embedded Systems Academy, Inc.
support at esacademy dot com