سلام
دوستان كسي مي تونه كمك كنه كه چطور ميشه
كتابخانه avrlib به winavr يا eclipes اضافه كرد.
سلام
دوستان كسي مي تونه كمك كنه كه چطور ميشه
كتابخانه avrlib به winavr يا eclipes اضافه كرد.
سلام
راهنمایی نیمه کامل نرم افزار winavr:
http://www.iranmicro.ir/winavr/
شما میتونید اونا رو در مسیر ذخیره ی پروژه یا پوشه ی avr در مسیر نصب نرم افزار کپی کنید .
برای حالت اول باید از دستور
#include "mylib.h"و برای حالت دوم باید از دستور :
#include <mylib.h>استفاده کنید ، در واقع فرقی نداره که کتابخونه کجا کپی میشه ، مهم ان هست که شما در داخل نرم افزار با ادرس صحیح فراخونیش کنید
سلام
دوستان اين ميدونم .اما چون هر فايل شو استفاده ميكنم مانند:lcd.h اون خودش داخلش چندتا فايل ديگر نياز داره مثلاtimer,...من
ميخوام طوري به كمپايلر معرفي بشه كه همه يه فايلا رو بدون خطا بشناسه.
من روش قبلي رو امتحان كردم نشده فكر كنم تو mfile يا ..... بايد تنظيم بشه ؟؟؟؟؟؟
اين برنامه رو ببينيد:
[PHP]#include<avr/io.h>
#include"lcd.h"
int main(void)
{
PORTC=0X00;
DDRC=0XFF;
//_delay_ms(100);
for(;;)
{
}
return(0);
}[/PHP]
اينم خطاهاش :
[PHP]
Description Resource Path Location Type
'i' undeclared (first use in this function) lcd.c /lcd line 410 C/C++ Problem
'nBytes' undeclared (first use in this function) lcd.c /lcd line 416 C/C++ Problem
'u08' undeclared (first use in this function) lcd.c /lcd line 342 C/C++ Problem
avrlibdefs.h: No such file or directory global.h /lcd line 25 C/C++ Problem
avrlibtypes.h: No such file or directory global.h /lcd line 27 C/C++ Problem
expected ')' before '*' token lcd.c /lcd line 382 C/C++ Problem
expected ')' before '*' token lcd.h /lcd line 172 C/C++ Problem
expected ')' before 'bitRes' lcd line 290, external location: ..\timer.h C/C++ Problem
expected ')' before 'data' lcd.c /lcd line 125 C/C++ Problem
expected ')' before 'data' lcd.c /lcd line 220 C/C++ Problem
expected ')' before 'data' lcd.h /lcd line 141 C/C++ Problem
expected ')' before 'data' lcd.h /lcd line 145 C/C++ Problem
expected ')' before 'interruptNum' lcd line 240, external location: ..\timer.h C/C++ Problem
expected ')' before 'interruptNum' lcd line 242, external location: ..\timer.h C/C++ Problem
expected ')' before 'prescale' lcd line 208, external location: ..\timer.h C/C++ Problem
expected ')' before 'prescale' lcd line 210, external location: ..\timer.h C/C++ Problem
expected ')' before 'prescale' lcd line 213, external location: ..\timer.h C/C++ Problem
expected ')' before 'progress' lcd.c /lcd line 422 C/C++ Problem
expected ')' before 'progress' lcd.h /lcd line 181 C/C++ Problem
expected ')' before 'pwmDuty' lcd line 306, external location: ..\timer.h C/C++ Problem
expected ')' before 'pwmDuty' lcd line 307, external location: ..\timer.h C/C++ Problem
expected ')' before 'row' lcd.h /lcd line 166 C/C++ Problem
expected ')' before 'topcount' lcd line 295, external location: ..\timer.h C/C++ Problem
expected ')' before 'x' lcd.c /lcd line 364 C/C++ Problem
expected '=', ',', ';', 'asm' or '__attribute__' before 'i' lcd.c /lcd line 410 C/C++ Problem
expected '=', ',', ';', 'asm' or '__attribute__' before 'lcdControlRead' lcd.c /lcd line 173 C/C++ Problem
expected '=', ',', ';', 'asm' or '__attribute__' before 'lcdControlRead' lcd.h /lcd line 143 C/C++ Problem
expected '=', ',', ';', 'asm' or '__attribute__' before 'lcdDataRead' lcd.c /lcd line 268 C/C++ Problem
expected '=', ',', ';', 'asm' or '__attribute__' before 'lcdDataRead' lcd.h /lcd line 147 C/C++ Problem
expected '=', ',', ';', 'asm' or '__attribute__' before 'timer0GetPrescaler' lcd line 209, external location: ..\timer.h C/C++ Problem
expected '=', ',', ';', 'asm' or '__attribute__' before 'timer1GetPrescaler' lcd line 211, external location: ..\timer.h C/C++ Problem
expected '=', ',', ';', 'asm' or '__attribute__' before 'timer2GetPrescaler' lcd line 214, external location: ..\timer.h C/C++ Problem
expected declaration specifiers or '...' before 'u08' lcd.c /lcd line 408 C/C++ Problem
expected declaration specifiers or '...' before 'u08' lcd.h /lcd line 175 C/C++ Problem
expected expression before ')' token lcd.c /lcd line 342 C/C++ Problem
expected expression before ')' token lcd.c /lcd line 343 C/C++ Problem
expected expression before ')' token lcd.c /lcd line 344 C/C++ Problem
expected expression before ')' token lcd.c /lcd line 345 C/C++ Problem
expected expression before ')' token lcd.c /lcd line 346 C/C++ Problem
expected expression before ')' token lcd.c /lcd line 347 C/C++ Problem
expected expression before ')' token lcd.c /lcd line 348 C/C++ Problem
expected expression before ')' token lcd.c /lcd line 349 C/C++ Problem
make: *** [lcd.o] Error 1 lcd line 0 C/C++ Problem
implicit declaration of function 'cbi' lcd.c /lcd line 59 C/C++ Problem
implicit declaration of function 'inb' lcd.c /lcd line 97 C/C++ Problem
implicit declaration of function 'lcdControlWrite' lcd.c /lcd line 327 C/C++ Problem
implicit declaration of function 'lcdDataWrite' lcd.c /lcd line 418 C/C++ Problem
implicit declaration of function 'lcdLoadCustomChar' lcd.c /lcd line 342 C/C++ Problem
implicit declaration of function 'outb' lcd.c /lcd line 72 C/C++ Problem
implicit declaration of function 'sbi' lcd.c /lcd line 63 C/C++ Problem
[/PHP]
اگه كسي راهي بلده يا تنظيم ات كامل تو winavr يا اگر eclipse باشه كه عالي
ویرایش توسط jadopcb : 19-05-2010 در ساعت 10:29
نگاهی به "avrlib\examples" بنداز.
می تونی از نمونه برنامه های آماده کمک بگیری.
خوب چرا کل کتابخونه رو تو فولدر include برنامه کپی نمی کنی؟
این جوری می تونی همه رو راحت با <> به برنامت اضافه کنی.
سلام
اين كار وه كردم جواب نداد؟؟؟خوب چرا کل کتابخونه رو تو فولدر include برنامه کپی نمی کنی؟
این جوری می تونی همه رو راحت با <> به برنامت اضافه کنی.
سلام
ببخشید یادم رفت بگم که تو make file باید اسم اون فایل ها رو هم اضافه کنید.مثل این:
SRC = mmc.c playlist.c $(TARGET).c
l
سلام
مهندس نميشه همه ي فايلا را اضافه كرد .قبلا امتحان كردم.ببخشید یادم رفت بگم که تو make file باید اسم اون فایل ها رو هم اضافه کنید.مثل این:
SRC = mmc.c playlist.c $(TARGET).c
l
اگر مي شه راهي بگو كه كل پوشه را به برنامه معرفي كنم
فکر نمی کنم که بشه کل کتابخونه رو اضافه کرد.تو هر پروژه هر کدوم رو که لازم داری اضافه کن.
اگر برنامه های نوشته شده رو هم نگاهی بندازید همین طوری اند.