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

 
 
> Помогите разобратся с ICC AVR 7, В 6й версии работало, в 7й - ошибка
Pyku_He_oTTyda
сообщение Dec 22 2005, 05:51
Сообщение #1


Профессионал
*****

Группа: Свой
Сообщений: 1 751
Регистрация: 4-08-05
Из: Великие Луки
Пользователь №: 7 360



Осваиваю Си по примерам с [banned], пока работал на шестой версии ICC, все было хорошо.
Вчера поставил седьмую версию, и она стала ругатся на этот фрагмент:

putchar('R');
putchar('x');

говорит: !ERROR file 'work03.0':undefined symbol '_putchar'

как эта процедура прописывается в седьмой версии? Тыкните носом!

На всякий случай прикладываю текст программы
Прикрепленные файлы
Прикрепленный файл  work.txt ( 1.38 килобайт ) Кол-во скачиваний: 64
 


--------------------
Андрей Смирнов
Go to the top of the page
 
+Quote Post
 
Start new topic
Ответов
_artem_
сообщение Dec 23 2005, 21:58
Сообщение #2


учащийся
*****

Группа: Свой
Сообщений: 1 065
Регистрация: 29-10-05
Из: города контрастов
Пользователь №: 10 249



V tom linke kotorij priveden mnoju naverxu napisano (FAQ dlja ICC v& compilers):

How to use putchar() -- [AVR7]
This is currently applicable to ICC7 for AVR, but will eventually apply to all of our V7 compilers.

richard@imagecraft.com
Q: When I call printf, I get the following message:
!ERROR Function 'putchar' not defined.

A: This is a function that references the device's IO register locations and must be compiled specifically for the target device. You may find examples of this function for different devices under the <install root>\examples.AVR directory.


Q: But even when I write my own putchar and add it to my project file list, I still get the same error. Why?

A: Some device specific functions must be provided by users at project build time and cannot be put in the default libraries that we provide. putchar is one such function. From V7.03B onward, we have added a capability in the compiler/linker that if you decorate a function with the pragma

#pragma device_specific_function <function_name> ...

and if the function is needed but undefined, the linker will emit an error message of the above form. For putchar/getchar, this pragma is in the provided stdio.h file, and hence if you are writing your own putchar, you must have:

"#include <stdio.h>"

in your putchar source file.


Етот товариш хочет сказать что если вы написали свой вариант putchar() то в том файле где он ( putchar() )
содержится (исходник putchar() ) вам надо добавить #include <stdio.h> .


--------------------
Зачем лаять на караван , когда на него можно плюнуть?

Go to the top of the page
 
+Quote Post

Сообщений в этой теме
- Pyku_He_oTTyda   Помогите разобратся с ICC AVR 7   Dec 22 2005, 05:51
- - haker_fox   Цитата(Pyku_He_oTTyda @ Dec 22 2005, 13:5...   Dec 22 2005, 06:36
- - Serega Doc   Простите за offtop Но если это ваши первые пробы ...   Dec 22 2005, 08:27
|- - defunct   Цитата(Serega Doc @ Dec 22 2005, 10:27) П...   Dec 23 2005, 12:38
|- - Old1   Цитата(defunct @ Dec 23 2005, 16:38) ...i...   Dec 23 2005, 20:51
- - Pyku_He_oTTyda   Serega Doc , я вас поддерживаю, но к сожалению 100...   Dec 22 2005, 08:42
- - Pyku_He_oTTyda   ЦитатаПопробуйте написать так: #include <stdio....   Dec 22 2005, 10:35
- - Serega Doc   А радио базара у вас в городе что нет? Болванка гр...   Dec 22 2005, 13:34
- - Pyku_He_oTTyda   К сожалению... Возят в основном софт - системы, др...   Dec 22 2005, 13:49
- - _artem_   vot zdes tvoja problema : http://www.dragonsgate...   Dec 22 2005, 14:13
- - IgorKossak   Надо определить низкоуровневую функцию вывода _put...   Dec 22 2005, 14:35
- - Pyku_He_oTTyda   Спасибо! буду разбиратся   Dec 23 2005, 05:55
- - defunct   Цитата(Pyku_He_oTTyda @ Dec 22 2005, 07:5...   Dec 23 2005, 12:13
- - Laksus   _______________________________ defunct Дата Dec 2...   Dec 25 2005, 19:26
- - Pyku_He_oTTyda   Что то у меня ничего не получается, а никто не пом...   Dec 26 2005, 05:44
|- - defunct   Цитата(Pyku_He_oTTyda @ Dec 26 2005, 07:4...   Dec 27 2005, 09:36
- - Laksus   _______________ ЦитатаЧто то у меня ничего не полу...   Dec 27 2005, 23:13
- - Pyku_He_oTTyda   Спасибо! Вечером буду пробовать разбиратся.   Dec 28 2005, 05:49
- - Pyku_He_oTTyda   Спасибо Laksus, ваш пример заработал у меня. Тепер...   Dec 29 2005, 07:58


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

 


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


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