Цитата(Dan_Dima @ Feb 15 2007, 01:13)

Цитата(jorikdima @ Feb 14 2007, 22:44)

const int arr[10]
Притаком объявлении массив размещаеться в RAM а не во flash, а надо именно во flash.
Для IAR все верно указано. Квалификтор
const указывает, что массив располагается в сегменте констант, а сегмент констант по-умолчанию располагается во Flash. См. сами xcl-файл. Например, в lnk430F149.xcl указано
Цитата
// Program and non-volatile segments (FLASH)
// =========================================
//
// segment address range usage
// ------- ------------- --------------------------
// INFO 1000-10FF Information memory
// CSTART 1100-FFDF cstartup program code
// CODE 1100-FFDF Program code
// DATA16_C 1100-FFDF Constant "const" variables AND String literals
// DATA16_ID 1100-FFDF Initializers for DATA16_I
// DIFUNCT 1100-FFDF Dynamic initialization vector used by C++
// CHECKSUM 1100-FFDF The linker places the checksum byte(s) in this segment,
// when the -J linker command line option is used.
//
// INTVEC FFE0-FFFF Interrupt vectors
//
// NOTE:
// It is not possible to pack the CSTART segment by using the XLINK -P option
// Special function registers and peripheral modules occupy addresses 0-01FFh
// Be sure to use end values for the defined addresses
//*****************************************************************