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

 
 
> uc/Gui 3.32a, Gui и Atmega128
BioWolf2000
сообщение Oct 12 2005, 10:08
Сообщение #1


Частый гость
**

Группа: Свой
Сообщений: 89
Регистрация: 11-01-05
Из: Беларусь, Минск
Пользователь №: 1 897



Как заставить компилятор Iar 4.11a размещать фонты во flash памяти?

В Gui.h есть строки
/* GUI_FLASH allows to put constants into a special memory area
For most CPUs, this is not necessary hence the default is "".
(This makes sense for CPUs like ATMEL AT90 or 8051, where
default pointers are unable to reach ROM/FLASH memory in some
memory models)
*/
#ifndef GUI_FLASH
#define GUI_FLASH
#endif

если исправить #define GUI_FLASH на #define GUI_FLASH __flash то компилятор ругается.

зы контроллер t6963


--------------------
ex740104/103 БГУИР
Go to the top of the page
 
+Quote Post
 
Start new topic
Ответов (1 - 5)
AlexandrY
сообщение Oct 12 2005, 13:04
Сообщение #2


Ally
******

Группа: Модераторы
Сообщений: 6 232
Регистрация: 19-01-05
Пользователь №: 2 050



Еще бы не ругаться.
У IAR-а ведь функции работы с FLASH имеют уникальные названия.
Придется круто патчить GUI
Go to the top of the page
 
+Quote Post
IgorKossak
сообщение Oct 13 2005, 06:54
Сообщение #3


Шаман
******

Группа: Модераторы
Сообщений: 3 064
Регистрация: 30-06-04
Из: Киев, Украина
Пользователь №: 221



BioWolf2000
Вам следует в файле GUI_ConfDefaults.h переопределить определение
Код
#ifndef GUI_CONST_STORAGE
 #define GUI_CONST_STORAGE const
#endif
на следующее
Код
#ifndef GUI_CONST_STORAGE
 #define GUI_CONST_STORAGE __flash
#endif
Go to the top of the page
 
+Quote Post
IgorKossak
сообщение Oct 13 2005, 07:08
Сообщение #4


Шаман
******

Группа: Модераторы
Сообщений: 3 064
Регистрация: 30-06-04
Из: Киев, Украина
Пользователь №: 221



Кстати, я говорил об исправлениях в версии 3.90a.

Что касается Вашей версии, то у меня её нет, но решение должно быть аналогичным.
Не могли бы Вы привести полностью сообщение компилятора?
Go to the top of the page
 
+Quote Post
BioWolf2000
сообщение Oct 13 2005, 09:15
Сообщение #5


Частый гость
**

Группа: Свой
Сообщений: 89
Регистрация: 11-01-05
Из: Беларусь, Минск
Пользователь №: 1 897



Цитата(IgorKossak @ Oct 13 2005, 10:08)
Кстати, я говорил об исправлениях в версии 3.90a.

Что касается Вашей версии, то у меня её нет, но решение должно быть аналогичным.
Не могли бы Вы привести полностью сообщение компилятора?
*

Не нашёл в своей версии GUI_CONST_STORAGE, искал во всех файлах. Может в более поздних версиях GUI ввели?
может кто скинет мне на почту zhukowski {at } tut.by?

вот что выдаёт компилятор, если я определяю #define GUI_FLASH __flash

Building configuration: ip-6 - Debug
Updating build tree...

F6x8.C
iccavr.exe D:\IAR Systems\Project\IP-6\gui\Font\F6x8.C -v3 --enhanced_core -ms -o D:\IAR Systems\Project\IP-6\Debug\Obj\ -y --initializers_in_flash
--root_variables -z9 --debug -DENABLE_BIT_DEFINITIONS -e --enable_multibytes -I D:\IAR Systems\Project\IP-6\Source\ -I D:\IAR Systems\Project\IP-6\
rtc\src\ -I D:\IAR Systems\Project\IP-6\gui\ -I D:\IAR Systems\Project\IP-6\SDFlash\ -I D:\IAR Systems\Project\IP-6\ -I D:\IAR Systems\Project\IP-6\Config\
-I D:\IAR Systems\Project\IP-6\AVR\SOURCE\ -I D:\IAR Systems\Project\IP-6\gui\Core\ -I D:\IAR Systems\Project\IP-6\gui\AntiAlias\ -I D:\IAR Systems\
Project\IP-6\gui\ConvertColor\ -I D:\IAR Systems\Project\IP-6\gui\ConvertMono\ -I D:\IAR Systems\Project\IP-6\gui\Font\ -I D:\IAR Systems\Project\IP-6\
gui\LCDDriver\ -I D:\IAR Systems\Project\IP-6\gui\MemDev\ -I D:\IAR Systems\Project\IP-6\gui\Widget\ -I D:\IAR Systems\Project\IP-6\gui\WM\ -I D:\IAR
Systems\Embedded Workbench 4.0 Evaluation\avr\INC\ -I D:\IAR Systems\Embedded Workbench 4.0 Evaluation\avr\INC\CLIB\ --eeprom_size 4096

IAR Atmel AVR C/C++ Compiler V4.11A/W32, Evaluation Version
Copyright 1996-2005 IAR Systems. All rights reserved.
Error[Pe144]: a value of type "struct <unnamed> const __flash *" cannot be used to initialize an entity of type "struct <unnamed> const *" D:\IAR Systems\Project\IP-6\gui\Font\F6x8.C 2219
Error[Pe144]: a value of type "void __flash *" cannot be used to initialize an entity of type "void *" D:\IAR Systems\Project\IP-6\gui\Font\F6x8.C 2224
Error[Pe144]: a value of type "void __flash *" cannot be used to initialize an entity of type "void *" D:\IAR Systems\Project\IP-6\gui\Font\F6x8.C 2225
Error[Pe144]: a value of type "struct <unnamed> const __flash *" cannot be used to initialize an entity of type "struct <unnamed> const *" D:\IAR Systems\Project\IP-6\gui\Font\F6x8.C 2226
Error[Pe147]: declaration is incompatible with "GUI_FONT const __flash GUI_Font6x8" (declared at line 2230) D:\IAR Systems\Project\IP-6\gui\Font\F6x8.C 2230
Error[Pe144]: a value of type "void __flash *" cannot be used to initialize an entity of type "void *" D:\IAR Systems\Project\IP-6\gui\Font\F6x8.C 2230
Error[Pe147]: declaration is incompatible with "GUI_FONT const __flash GUI_Font6x9" (declared at line 2231) D:\IAR Systems\Project\IP-6\gui\Font\F6x8.C 2231
Error[Pe144]: a value of type "void __flash *" cannot be used to initialize an entity of type "void *" D:\IAR Systems\Project\IP-6\gui\Font\F6x8.C 2231

Errors: 8
Warnings: none

Total number of errors: 8
Total number of warnings: 0


--------------------
ex740104/103 БГУИР
Go to the top of the page
 
+Quote Post
BioWolf2000
сообщение Oct 14 2005, 05:57
Сообщение #6


Частый гость
**

Группа: Свой
Сообщений: 89
Регистрация: 11-01-05
Из: Беларусь, Минск
Пользователь №: 1 897



Цитата(IgorKossak @ Oct 13 2005, 09:54)
BioWolf2000
Вам следует в файле GUI_ConfDefaults.h переопределить определение
Код
#ifndef GUI_CONST_STORAGE
 #define GUI_CONST_STORAGE const
#endif
на следующее
Код
#ifndef GUI_CONST_STORAGE
 #define GUI_CONST_STORAGE __flash
#endif

*


В версии 3.90a прописал как указано выше __flash выдаёт туже ошибку...


--------------------
ex740104/103 БГУИР
Go to the top of the page
 
+Quote Post

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

 


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


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