gnupic: SDCC #pragma memory declarations
Subject:
SDCC #pragma memory declarations
From:
Scott Dattalo ####@####.####
Date:
5 Jul 2002 07:08:10 -0000
Message-Id: <Pine.LNX.4.44.0207042341140.29707-100000@ruckus.brouhaha.com>
-- 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).