Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
07/09/07 11:59
Read: times


 
#141608 - Your program generates error on compile
Responding to: ???'s previous message
Hello,

I took your program and tried to compile with SDCC. It generates the following error.

Regards,

Charles Bannister

SDCC : mcs51/gbz80/z80/avr/ds390/pic16/pic14/TININative/xa51/ds400/hc08 2.5.4 #1174 (Nov 26 2005) (MINGW32)

Compiling...
C:/SDCCtest/PAPAS/PAPAS.C(33) : error 16: variable 'i' must be static to have storage class in reentrant function
-:0: error 103: code not generated for 'init_timer' due to previous errors
C:/SDCCtest/PAPAS/PAPAS.C(41) : error 103: code not generated for 'initial' due to previous errors
-:0: error 103: code not generated for 'main' due to previous errors

Compile error! Output not generated.

#include <at89c51ed2.h> 
#include <stdio.h> 
void initial(void); 
void init_timer (void) interrupt 3; 

void init_timer (void) interrupt 3 
{ 
	unsigned char idata i;      // Something wrong here
	i++; 
	while(i==20){ 
	P1=~P1; 
	i=0; 
	}
} 
void initial(void)
{ 
	TMOD=0x10; 
	TL1=0xAF; 
	TH1=0x3C; 
	IE=0x88; 
	TR1=1; 
	P1=0x00; 
} 

void main(void)
{ 
	initial(); 
	while(1){} 
} 



List of 12 messages in thread
TopicAuthorDate
SDCC and FLIP Programmer from ATMEL            01/01/70 00:00      
   "work"            01/01/70 00:00      
      i tested            01/01/70 00:00      
         packihx            01/01/70 00:00      
            still nothing            01/01/70 00:00      
            nope!            01/01/70 00:00      
   Your program generates error on compile            01/01/70 00:00      
      a question for Charles Bannister            01/01/70 00:00      
      Thank you Charles Bannister!            01/01/70 00:00      
         version            01/01/70 00:00      
   FLIP Translation?            01/01/70 00:00      
   Unsafe assumption!            01/01/70 00:00      

Back to Subject List