Hello,

I am trying to use SDCC to compile a simple blink led program, but I get stuck 
with the #define LED something

I tried to put PORTA_bits.RA4 (instead of something). And in my main header 
file I defined :
typedef union {
   struct {
      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;
   };
} __PORTA_bits_t;
extern volatile __PORTA_bits_t __at(PORTA_ADDR) PORTA_bits;

But I get this error :
missing definition for symbol "_PORTA_bits", required by "led.o"


So I edited my main c file (main.c) and added :
volatile __PORTA_bits_t __at(PORTA_ADDR) PORTA_bits;

Now I get this error :
multiple sections using address 0x5


I really don't know how to do this #define so I can simply test and set a pin.

I looked and the pic16f88.h and pic16f88.c in the share/sdcc/ folder and 
changed thing but still no improvement. I also found a pic16f88.lib which I 
think should be modify (re-compiled) to add the PORTA_bits structure, but 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.


-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
Sdcc-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to