[an error occurred while processing this directive]
|
Подскажите пожалуйста, при линковке следующего исходника в
IAR EW AVR получаем (на PC это работает)://----------------------------------------------------------
struct WinItems
{
unsigned char x,y;
char *String;
};WinItems __flash Menu1[] = {{ 0,1,"Пункт 1" },{ 0,10,"Пункт 2" }};
void main(void)
{
for(unsigned char i = 0;i < 2; i++)
Puts(Items[i].x,Items[i].y,Items[i].String);
};//----------------------------------------------------------
Error[e16]: Segment NEAR_C (size: 0x1a align: 0) is too long for segment definition. At least 0x1a more bytes needed. The problem occurred while processing the segment placement command "-Z(DATA)NEAR_C=_..X_EXT_ROM_BASE:+_..X_EXT_ROM_SIZE", where at the moment of placement the available memory ranges were "DATA:10ff--1"
Если же в структуре написать char __flash *,то уже при компиляции:Error[Pe144]: a value of type "char const *" cannot be used to
initialize an entity of type "char __flash *"Как можно заставить IAR положить строки отдельно и при этом занести указатель в структуру. Нижележащий вариант мне очень не нравится,
хотя и работает:char __flash Str1[] = "Пункт 1";
char __flash Str2[] = "Пункт 2";
WinItems __flash Menu1[] = {{ 0,1,Str1 },{ 0,10,Str2 }};
E-mail: info@telesys.ru