ti_51ew_cc2540b.xcl 中有定义有
//
// Flash lock bits
// ---------------
//
// The CC2540 has its flash lock bits, one bit for each 2048 B flash page, located in
// the last available flash page, starting 16 bytes from the page end. The number of
// bytes with flash lock bits depends on the flash size configuration of the CC2540
// (maximum 16 bytes, i.e. 128 page lock bits, for the CC2530 with 256 kB flash).
// But since the bit that controls the debug interface lock is always in the last byte
// we include all 16 bytes in the segment, regardless of flash size.
//
-D_FLASH_LOCK_BITS_START=((_NR_OF_BANKS*_FIRST_BANK_ADDR)+0xFFF0)
-D_FLASH_LOCK_BITS_END=((_NR_OF_BANKS*_FIRST_BANK_ADDR)+0xFFFF)
// (this should resolve to 0x7FFF0-0x7FFFF if 256 kB flash (_NR_OF_BANKS=7), and
// 0x3FFF0-0x3FFFF if 128 kB flash (_NR_OF_BANKS=3))
//
//
// Define as segment in case one wants to put something there intentionally (then comment out the hack below)
-Z(CODE)FLASH_LOCK_BITS=_FLASH_LOCK_BITS_START-_FLASH_LOCK_BITS_END
我在程序中使用下面的方法发现不起作用
#pragma location = "FLASH_LOCK_BITS"
const char arry[]={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
如何正确的设置可以防止程序被读出来?