gnupic: SDCC
Subject:
rep: SDCC
From:
Mikaël ####@####.####
Date:
31 Dec 2004 13:41:15 +0000
Message-Id: <B8A9FE90-5B31-11D9-A9D0-000D934FD434@free.fr>
I run sdcc on Mac Os X and had some problems to compile the pic16
library. I use the snapshot of 23 / 12 /2004.
You can do:
./configure --prefix=/home/mik/tools/sdcc
make
make install
for the normal installation. Then, may 'cp' command does not understand
the '-u' flag. You can do:
cd sdcc/device/lib/pic16 ///in the source dir
./configure
make
mikmac:~/Desktop/sdcc/device/lib/pic16 mik$ cp bin/*
~/programmation/sdcc/share/sdcc/lib/pic16/
And it must work with that.
You can try with the following code (test.c), that blink a LED (port E,
bit 1) at nearly 1 Hz.
/* compile with:
sdcc -mpic16 -p18f452 test.c
*/
/* initializes stack at RAM address 0x5ff */
#pragma stack 0x5ff 64
#include <pic18fregs.h>
void timerIT() interrupt 1 _naked
{
static unsigned char t=0;
INTCONbits.T0IF = 0;
if(t++ == 0x98) //un switch tous les 0x98.
{
LATE ^= 0x1; /*switch LED 1 */
t = 0;
}
_asm
RETFIE
_endasm;
}
void init()
{
/* configuration LED */
LATE = 0;
TRISE= 0xF8;
/*timer config: 8bit, prescaler: 256
T0CON = 0xC7;
/* use interrupt */
INTCONbits.T0IE = 1;
/*activation des ITS*/
INTCONbits.GIE = 1;
INTCONbits.PEIE = 1;
}
void main()
{
init();
while(1);
}
Le 30 déc. 04, à 14:52, Timothy Lee a écrit :
>
> Thanks for your contributions Vangelis!! Unfortunately the
> documentation on
> the SDCC website is a bit outdated. I can compile the sdcc snapshots
> (linux)
> but it seems to be that the pic16 libraries
> $prefix/share/sdcc/lib/pic16 are
> not installing. I don't know if this affects sdcc-pic16 operation or
> not.
> I've read the sdcc doc's - but I'm not sure how much applies to the
> pic16
> port. Is it possible for someone to post a quick cookbook list of how
> to
> compile a small C program targeted for the PIC18F452 based on the
> latest
> sdcc snapshot??
>
> Cheers
> Timothy
>
>
> -----Original Message-----
> From: Vangelis Rokas ####@####.####
> Sent: Thursday, December 30, 2004 4:52 AM
> To: ####@####.####
> Subject: Re: SDCC
>
> There are some issues with pic16 port such as bugs
> that occur now and then, but *in general* its supports
> the chips quite fine. Recently we've managed to solve
> a critical bug with comparing variables and most things
> seem to work nice.
>
> I can't promise that it will compile your projects 'out
> of the box', but as you might have seen there is currently
> active support for it.
>
> regards,
> Vangelis Rokas
>
>
>
> ----- Original Message -----
> From: "Philippe BEAU" ####@####.####
> To: ####@####.####
> Subject: sdcc & PIC18F452 18F458 support
>
>
>> Is anyone can say me if the latest sdcc snapshot support fine the
>> PIC18F452 & 18F458 ?
>
>
>
>
> ----- Original Message -----
> From: "Timothy Lee" ####@####.####
> To: ####@####.####
> Subject: SDCC
>
>
>> It seems that sdcc has been discussed frequently on this list. I am
>> using
> a
>> PIC18F452 and was wondering how near-to-completion the sdcc-pic
>> compiler
> is.
>> I have read the documentation for the project and even looked at some
>> of
> the
>> change logs, however I am still unable to determine how "ready" sdcc
>> is.
> If
>> someone on this list is in "the know" maybe they can should some
>> light on
>> what is complete, what features the compiler offers, what is not
>> currently
>> functional and what has not been included thus far.
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ####@####.####
> For additional commands, e-mail: ####@####.####
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ####@####.####
> For additional commands, e-mail: ####@####.####
>
>
>
--
Mikaël
"Programmers are tools for converting caffeine into code."
[anonymous]