gnupic: SDCC #pragma memory declarations


Previous by date: 5 Jul 2002 12:24:46 -0000 Re: SDCC #pragma memory declarations, Ricardo Amezquita Orozco
Next by date: 5 Jul 2002 12:24:46 -0000 Re: SDCC #pragma memory declarations, Scott Dattalo
Previous in thread: 5 Jul 2002 12:24:46 -0000 Re: SDCC #pragma memory declarations, Ricardo Amezquita Orozco
Next in thread: 5 Jul 2002 12:24:46 -0000 Re: SDCC #pragma memory declarations, Scott Dattalo

Subject: Re: SDCC #pragma memory declarations
From: "Kevin L. Pauba" ####@####.####
Date: 5 Jul 2002 12:24:46 -0000
Message-Id: <1025871125.6594.28.camel@dad>

Here is a portion of the p16f873.h file generated by running the
following command:

$ perl inc2h.pl /usr/share/gpasm/header/p16f873.inc >p16f873.h


#pragma maxram 0x1FF

#pragma memmap 0x0020 0x007f RAM 0x100
#pragma memmap 0x00a0 0x00ff RAM 0x100

#pragma memmap 0x0000 0x0000 SFR 0x180  // INDF
#pragma memmap 0x0001 0x0001 SFR 0x100  // TMR0
#pragma memmap 0x0002 0x0002 SFR 0x180  // PCL
#pragma memmap 0x0003 0x0003 SFR 0x180  // STATUS
#pragma memmap 0x0004 0x0004 SFR 0x180  // FSR
#pragma memmap 0x0005 0x0005 SFR 0x000  // PORTA
#pragma memmap 0x0006 0x0006 SFR 0x100  // PORTB
#pragma memmap 0x0007 0x0007 SFR 0x000  // PORTC
#pragma memmap 0x000A 0x000A SFR 0x180  // PCLATH

...

On Fri, 2002-07-05 at 07:04, Ricardo Amezquita Orozco wrote:
>  
> --Scott
> 
> This means this is usefull yet??
> 
> What is the pragma syntax??
> 
> Ricardo
> 
> On Thu, 4 Jul 2002 23:55:47   
>  Scott Dattalo wrote:
> >
> > -- now work, thanks to Kevin L. Pauba. I've applied a patch Kevin has 
> >created that will:
> >
> >  o  extract the PIC device-specific memory map from a Microchip
> >     .INC file (all of which are distributed with gpasm, btw) and 
> >     create a C .h file that can be included in an SDCC compiled
> >     C program. The memory map is defined as a series of compiler
> >     pragmas.
> >
> >  o  process the #pragmas so that SDCC understands the memory map
> >     
> >This is slick! It means that SDCC instantly now supports all mid-range PIC
> >devices (I haven't tested this out, of course). If a new (mid-range PIC)
> >device comes along, then you can create your own device-specific include
> >file without having to modify SDCC's source.
> >
> >
> >In addition to Kevin's patch, I fixed some bugs with the over-zealous 
> >register optimizer. It turns out that some registers like PCLATH really 
> >are important :).
> >
> >Scott
> >
> >ps. Linas, your a2d.c program has been a quite useful real-life example
> >application. I've mentioned it to Kevin, but in case you're interested, 
> >all of the manual bank manipulation stuff can probably be removed now (if 
> >not, then I'll fix it).
> >
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: ####@####.####
> >For additional commands, e-mail: ####@####.####
> >
> >
> 
> 
> _____________________________________________________
> Supercharge your e-mail with a 25MB Inbox, POP3 Access, No Ads
> and NoTaglines --> LYCOS MAIL PLUS.
> http://www.mail.lycos.com/brandPage.shtml?pageId=plus 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ####@####.####
> For additional commands, e-mail: ####@####.####
> 



Previous by date: 5 Jul 2002 12:24:46 -0000 Re: SDCC #pragma memory declarations, Ricardo Amezquita Orozco
Next by date: 5 Jul 2002 12:24:46 -0000 Re: SDCC #pragma memory declarations, Scott Dattalo
Previous in thread: 5 Jul 2002 12:24:46 -0000 Re: SDCC #pragma memory declarations, Ricardo Amezquita Orozco
Next in thread: 5 Jul 2002 12:24:46 -0000 Re: SDCC #pragma memory declarations, Scott Dattalo


Powered by ezmlm-browse 0.20.