Хочу установить CRP для LPC2368. Имеется FlashMagic 5.72 и информация взятая по ссылке http://forum.flashmagictool.com/index.php?topic=3620.0
Цитата
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:
const unsigned long crp __attribute__ ((at(0x1FC))) = 0x87654321;
or:
Code:
const unsigned long crp __attribute__ ((at(0x2FC))) = 0x87654321;
If you don't wish to use CRP then set the value to zero.
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:
const unsigned long crp __attribute__ ((at(0x1FC))) = 0x87654321;
or:
Code:
const unsigned long crp __attribute__ ((at(0x2FC))) = 0x87654321;
If you don't wish to use CRP then set the value to zero.
Т.е. чтобы установить CRP необх. прописать в проекте одну из констант. Пример приведён для Keil, я же пользуюсь IAR.
Пример из хелпа не работает
Код
#pragma location=0x1fc
__root const unsigned long crp = 0x87654321;
__root const unsigned long crp = 0x87654321;
Кто знает подскажите пожалуйста как задать эту константу в IAR.