gnupic: #pragma for memory maps
Subject:
Re: #pragma for memory maps
From:
"Kevin L. Pauba" ####@####.####
Date:
1 Jul 2002 02:53:05 -0000
Message-Id: <1025491240.32000.32.camel@dad>
What about the bank number?
The memRange data structure includes starting address, ending address,
alias, and bank number. Wouldn't we need to include it in the pragma?
On Thu, 2002-06-27 at 23:55, Scott Dattalo wrote:
>
> Ricardo Orozco was working on a program to convert .inc files into .h
> files. But, so was Kevin. Not deterred, Ricardo proceeded to adapt his
> program to create the PIC specific memory maps that SDCC needs to allocate
> registers. In the process, Ricardo suggested that instead of hardcoding
> this info in SDCC, that we create compiler pragmas that could be placed in
> the include files. Does anyone have opinions on this?
>
> A possible syntax would be:
>
> #pragma memmap START END [ALIAS_MASK] TYPE
>
> where
>
> memmap - the pragma
>
> START, END - define the range of memory
> ALIAS_MASK - bit mask defining how/if the register range is aliased
> TYPE - type of memory in the range.
>
> For example, a partial listing for a 16F877 would look like:
>
> #pragma memmap 0x20 0x6f RAM
> #pragma memmap 0x70 0x7f 0x180 RAM
> #pragma memmap 0x02 0x04 0x180 SFR
>
>
> The benefit is that as a user you could define a new memory map without
> having to modify the SDCC source. The detriment is that somebody has to
> write the code to implement this feature. Hmm.
>
> Scott
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ####@####.####
> For additional commands, e-mail: ####@####.####
>