From: <nic...@ne...> - 2007-11-30 21:06:36
|
Hello, I am trying to use SDCC to compile a simple blink led program, but I get s= tuck with the =23define LED something I tried to put PORTA=5Fbits.RA4 (instead of something). And in my main hea= der file I defined : typedef union =7B struct =7B unsigned char RA0:1; unsigned char RA1:1; unsigned char RA2:1; unsigned char RA3:1; unsigned char RA4:1; unsigned char RA5:1; unsigned char RA6:1; unsigned char RA7:1; =7D; =7D =5F=5FPORTA=5Fbits=5Ft; extern volatile =5F=5FPORTA=5Fbits=5Ft =5F=5Fat(PORTA=5FADDR) PORTA=5Fbits= ; But I get this error : missing definition for symbol =22=5FPORTA=5Fbits=22, required by =22led.o=22 So I edited my main c file (main.c) and added : volatile =5F=5FPORTA=5Fbits=5Ft =5F=5Fat(PORTA=5FADDR) PORTA=5Fbits; Now I get this error : multiple sections using address 0x5 I really don't know how to do this =23define so I can simply test and set = a pin. I looked and the pic16f88.h and pic16f88.c in the share/sdcc/ folder and c= hanged thing but still no improvement. I also found a pic16f88.lib which I= think should be modify (re-compiled) to add the PORTA=5Fbits structure, b= ut I don't know how to do it. Thanks for your help. PS: I am not on the mailing list so please reply to that adress. |