Witam !!!
Zacząłem programować mikro kontroler 89C51 w KEIL. Po napisaniu krótkiego programiku:
dostaje taki rezultat przy kompilowaniu:
Build target 'Target 1'
compiling serduszko.c...
serduszko.c(1): warning C318: can't open file 'Atmel/AT89X51'
SERDUSZKO.C(7): error C141: syntax error near 'int'
SERDUSZKO.C(7): error C202: 'i': undefined identifier
SERDUSZKO.C(7): error C202: 'i': undefined identifier
SERDUSZKO.C(7): error C202: 'i': undefined identifier
SERDUSZKO.C(7): error C141: syntax error near ')'
SERDUSZKO.C(11): error C141: syntax error near 'int'
SERDUSZKO.C(11): error C202: 'i': undefined identifier
SERDUSZKO.C(11): error C202: 'i': undefined identifier
SERDUSZKO.C(11): error C202: 'i': undefined identifier
SERDUSZKO.C(11): error C141: syntax error near ')'
Target not created
Według mnie nie może otworzyć załączonego pliku. Jak w takim razie załącza się biblioteki ?? Plik napewno znajduje sie na dysku został zainstalowany wraz z programem. gdzie popełniam błąd ?
Pozdrawiam
Zacząłem programować mikro kontroler 89C51 w KEIL. Po napisaniu krótkiego programiku:
#include <Atmel/AT89X51>
void main(void)
{
while(1)
{
for(int i = 0 ;i<1000;i+1)
{
P1 = 0x00;
}
for(int i = 0 ;i<1000;i+1)
{
P1 = 0xff;
}
}
}
dostaje taki rezultat przy kompilowaniu:
Build target 'Target 1'
compiling serduszko.c...
serduszko.c(1): warning C318: can't open file 'Atmel/AT89X51'
SERDUSZKO.C(7): error C141: syntax error near 'int'
SERDUSZKO.C(7): error C202: 'i': undefined identifier
SERDUSZKO.C(7): error C202: 'i': undefined identifier
SERDUSZKO.C(7): error C202: 'i': undefined identifier
SERDUSZKO.C(7): error C141: syntax error near ')'
SERDUSZKO.C(11): error C141: syntax error near 'int'
SERDUSZKO.C(11): error C202: 'i': undefined identifier
SERDUSZKO.C(11): error C202: 'i': undefined identifier
SERDUSZKO.C(11): error C202: 'i': undefined identifier
SERDUSZKO.C(11): error C141: syntax error near ')'
Target not created
Według mnie nie może otworzyć załączonego pliku. Jak w takim razie załącza się biblioteki ?? Plik napewno znajduje sie na dysku został zainstalowany wraz z programem. gdzie popełniam błąd ?
Pozdrawiam