FAQ | Points | Add... | Recent posts | Search | Register | Log in


Czemu taki błąd? Problem z kompilacją


Post new topic  Reply to topic      Main Page -> Forum Index -> Microcontrollers Generally -> Czemu taki błąd? Problem z kompilacją
Author
Message
squall0
Poziom 11
Poziom 11


Joined: 19 May 2006
Posts: 68

Post#1 Post from the author of the topic 22 May 2006 06:55   

Czemu taki błąd? Problem z kompilacją


Kod programu jest do granic możliwości prosty :D

#include <avr/io.h>
#include <util/delay.h>

int main()
{
while(1)
{
PORTA=0xFF;
};
}

A pojawia się błąd:

C:/WinAVR/avr/include/util/delay.h:154:19: invalid suffix "ULUL" on integer constant
C:/WinAVR/avr/include/util/delay.h:179:19: invalid suffix "ULUL" on integer constant


../testowy_c.c:8: error: `PORTA' undeclared (first use in this function)
../testowy_c.c:8: error: (Each undeclared identifier is reported only once
../testowy_c.c:8: error: for each function it appears in.)

Co się dzieje i jak się tych błędów pozbyć, przecież to nawet program nie jest więcej komunikatów o błędach niż linijek kodu :(
Back to top
   
Google

Google Adsense


Post# Post from the author of the topic 22 May 2006 06:55   





Back to top
   
pubus
Poziom 21
Poziom 21


Joined: 13 May 2004
Posts: 1248
Location: Kraków

Post#2 22 May 2006 09:00   

Czemu taki błąd? Problem z kompilacją


Błąd pojawia się dlatego, że uC na których chcesz ten program skompilować nie ma portu A...
Ewentulanie ten o którym myślisz ma taki port ale w makefile jest wpisany inny...
Back to top
   
Google

Google Adsense


Post# 22 May 2006 09:00   





Back to top
   
Pituś Bajtuś
Poziom 20
Poziom 20


Joined: 11 Feb 2005
Posts: 841
Location: Żabieniec

Post#3 22 May 2006 09:11helpful post - solution   

Re: Czemu taki błąd? Problem z kompilacją


Quote:
C:/WinAVR/avr/include/util/delay.h:154:19: invalid suffix "ULUL" on integer constant
C:/WinAVR/avr/include/util/delay.h:179:19: invalid suffix "ULUL" on integer constant

Piszesz w AVR Studio?
Project->Configuration Options w polu Frequency AVR Studio czasami samo dopisuje przyrostek UL tak więc jeśli sam dopisałeś go wcześniej to teraz będzie "ULUL". Skasuj jeden i będzie ok.
Back to top
   
Google

Google Adsense


Post# 22 May 2006 09:11helpful post - solution   





Back to top
   
squall0
Poziom 11
Poziom 11


Joined: 19 May 2006
Posts: 68

Post#4 Post from the author of the topic 22 May 2006 17:32   

Re: Czemu taki błąd? Problem z kompilacją


Dobra to błąd z UL zniknął ale czemu pojawia się ten z portem przecież ustawiłem procesor czy nie powinien się plik makefile odpowiednio zmodyfikować a poza tym pojawia się inny błąd:

AVR Simulator: MCUCR register missing in XML partdescription

I ostrzeżenie:

AVR Simulator: Unsupported instruction 'jmp' at address 0x000000
AVR Simulator: Unsupported instruction 'jmp' at address 0x000043
Back to top
   
Guest
Poziom 10
Poziom 10





Post#5 22 May 2006 22:36   

Re: Czemu taki błąd? Problem z kompilacją


Nie programuję w WinAvr, ale zwykle trzeba dodać jakiegoś includa z typem mikrokontrolera typu (strzelam):
Code:
#include <mega8.h>

Back to top
   
Google

Google Adsense


Post# 22 May 2006 22:36   





Back to top
   
squall0
Poziom 11
Poziom 11


Joined: 19 May 2006
Posts: 68

Post#6 Post from the author of the topic 23 May 2006 19:15   

Re: Czemu taki błąd? Problem z kompilacją


Już wiem, o co biega!!

Sam do tego doszłem :P Trzeba ustawić procesor w Debug->Select Platform and Device

Chociaż to powinno się ustawiać jak się zmienia procesor w Edit Current Configuration Options a się nie ustawia :( no ale nic wszystko działa i o to chodzi :D
Back to top
   
Post new topic  Reply to topic      Main Page -> Forum Index -> Microcontrollers Generally -> Czemu taki błąd? Problem z kompilacją
Page 1 of 1
Similar topics
Problem podstawowy z kompilacją (1)
Problem z kompilacją w Bascomie (2)
VHDL,czemu wyświetla mi błąd? (listing poniżej) (3)
AVT2250 błąd przerwania 24-com2 czemu, pomocy!!! (4)
Problem z kompilacją. (2)
C++ problem z kompilacją (10)
Problem z kompilacją (4)
No czemu taki wolny? :/ 89C2051 (5)
devc++ Problem z kompilacją (4)
Problem z kompilacją w Yagarto (4)

Page generation time: 0.11 seconds


FAQ || Administrator || Moderators || Widgets and banners || Contact
elektroda.pl topic RSS feed