реклама на сайте
подробности

 
 
> IAR ругается на __farflash
west329_
сообщение Sep 29 2008, 10:36
Сообщение #1


Местный
***

Группа: Свой
Сообщений: 378
Регистрация: 10-09-07
Из: UKR/Voz
Пользователь №: 30 423



Проект изначально писался под мегу128, после отладки программы попытались перейти на другой контроллер а именно мегу162.
Компилятор сразу выругался на обьявленные процедуры

Код
Error[Pa043]: the keyword "__farflash" is not available with the  E:\RADIO\IAR4.21A\avr\tutor\Xbox4\main.c 43   current settings   Error[Pe167]: argument of type "char __flash *" is incompatible with  E:\RADIO\IAR4.21A\avr\tutor\Xbox4\main.c 125   parameter of type "unsigned char *"   Warning[Pe111]: statement is unreachable E:\RADIO\IAR4.21A\avr\tutor\Xbox4\main.c 221   Error[Pe167]: argument of type "char __flash *" is incompatible with  E:\RADIO\IAR4.21A\avr\tutor\Xbox4\main.c 238   parameter of type "unsigned char *"   Error[Pe167]: argument of type "char __flash *" is incompatible with  E:\RADIO\IAR4.21A\avr\tutor\Xbox4\main.c 258   parameter of type "unsigned char *"   Error[Pe167]: argument of type "char __flash *" is incompatible with  E:\RADIO\IAR4.21A\avr\tutor\Xbox4\main.c 262   parameter of type "unsigned char *"   Error[Pe167]: argument of type "char __flash *" is incompatible with  E:\RADIO\IAR4.21A\avr\tutor\Xbox4\main.c 275   parameter of type "unsigned char *"   Error[Pe167]: argument of type "char __flash *" is incompatible with  E:\RADIO\IAR4.21A\avr\tutor\Xbox4\main.c 290   parameter of type "unsigned char *"   Error[Pe167]: argument of type "char __flash *" is incompatible with  E:\RADIO\IAR4.21A\avr\tutor\Xbox4\main.c 314   parameter of type "unsigned char *"   Error[Pe167]: argument of type "char __flash *" is incompatible with  E:\RADIO\IAR4.21A\avr\tutor\Xbox4\main.c 329   parameter of type "unsigned char *"   Error[Pe167]: argument of type "char __flash *" is incompatible with  E:\RADIO\IAR4.21A\avr\tutor\Xbox4\main.c 347   parameter of type "unsigned char *"   Error[Pe167]: argument of type "char __flash *" is incompatible with  E:\RADIO\IAR4.21A\avr\tutor\Xbox4\main.c 356   parameter of type "unsigned char *"   Error[Pe167]: argument of type "char __flash *" is incompatible with  E:\RADIO\IAR4.21A\avr\tutor\Xbox4\main.c 364   parameter of type "unsigned char *"


описание самих процедур выглядит так
Цитата
extern void PrintDebug(unsigned char __farflash stringD[25]);


в сырцах ничего особенного не менялось.

ключ в экстраопциях учтён --string_literals_in_flash

подскажите куда копать ?
Go to the top of the page
 
+Quote Post
 
Start new topic
Ответов
west329_
сообщение Sep 29 2008, 12:57
Сообщение #2


Местный
***

Группа: Свой
Сообщений: 378
Регистрация: 10-09-07
Из: UKR/Voz
Пользователь №: 30 423



Цитата
//#define AVRm128
//#define AVRm16
#define AVRm162


#ifdef AVRm128
#include <iom128.h>
#else
#ifdef AVRm16
#include <iom16.h>
#else
#ifdef AVRm162
#include <iom162.h>
#define __farflash __flash
#else
#error "Device not defined!
#endif
#endif
#endif


А можно ли как то компилятору передать тим контроллера, чтоб каждый раз не лазить в опции проекта а там в конфигурацию контроллера, и выбирать их.
Go to the top of the page
 
+Quote Post



Reply to this topicStart new topic
1 чел. читают эту тему (гостей: 1, скрытых пользователей: 0)
Пользователей: 0

 


RSS Текстовая версия Сейчас: 20th July 2025 - 00:22
Рейтинг@Mail.ru


Страница сгенерированна за 0.01359 секунд с 7
ELECTRONIX ©2004-2016