[an error occurred while processing this directive]
[an error occurred while processing this directive]
|
Итак, версия IAR EW AVR 2.26N
Простенькая программа ://-----------------------------------------------------------
#include
typedef unsigned char byte;
typedef unsigned short word;
#define ConstantMemory __flash
//-----------------------------------------------------------
word Addition( byte val, word param ) {
return param+val;
}
//-----------------------------------------------------------
void main(void) {
word result=0;
byte ConstantMemory * j=(byte ConstantMemory *)0x2000;
do { /* или : */
j-=1; /* */
result=Addition(*j,result); /* result=Addition(*(--j),result); */
} while( j != 0 );
if( result != 0 ) { /* только чтобы вычислялся result */
PORTA=0xff;
}
}
//-----------------------------------------------------------вызывает ошибку Tool Internal Error: Internal error: []: Illegal state
Достаточно изменить цикл на :
do {
result=Addition(j,result);
} while( --j != 0 );
и ошибка пропадает
У кого есть желание, можете отписать это IAR'у
E-mail: info@telesys.ru