gnupic: Re: [gnupic] Relocatable code and EXTERN


Previous by date: 2 Jan 2006 02:35:18 +0000 Re: [gnupic] Relocatable code and EXTERN, Frank Sergeant
Next by date: 2 Jan 2006 02:35:18 +0000 Re: [gnupic] Potential PIC project ?, easlab.absamail.co.za
Previous in thread: 2 Jan 2006 02:35:18 +0000 Re: [gnupic] Relocatable code and EXTERN, Frank Sergeant
Next in thread: 2 Jan 2006 02:35:18 +0000 Re: [gnupic] Relocatable code and EXTERN, Iain Dooley

Subject: Re: [gnupic] Relocatable code and EXTERN
From: "Scott Dattalo" ####@####.####
Date: 2 Jan 2006 02:35:18 +0000
Message-Id: <60211.71.139.109.92.1136169251.squirrel@71.139.109.92>

On Sun, 2006-01-01 at 18:29 -0600, Frank Sergeant wrote:
> John De Villiers ####@####.#### wrote:
>
> > It seems not. Any ideas how to do it?
> >
> > In the code that i have i want to add a literal to a value in a routine
> > that will become part of a library. I dont want to have to change the
> > library for every project, nor make copies of it all the time. The
> > literal contains the amount of defined strings ( screen.asm in the lcd
> > samples of gpsim - WS_TABLE_MASK)
>
> My first thought is to wonder if you might be able to use an include
> file for this purpose?

An include file for just the equates will not work John's case. I think
John wants to do something like make the LCD pin assignments externally
defined. This way, the same library can be used for different I/O pin
configurations.

There are at least two other approaches. One is to change the equates to
variables. However, this can eat up RAM. The other approach is to stub out
the project dependent configuration. For example, all I/O access can go
into a separate file that is part of the project but not part of the
library. This file can be custom tailored. The library code will make
calls to these user supplied functions. Perhaps this is the type of
include Frank and Craig are recommending too?

Scott

Previous by date: 2 Jan 2006 02:35:18 +0000 Re: [gnupic] Relocatable code and EXTERN, Frank Sergeant
Next by date: 2 Jan 2006 02:35:18 +0000 Re: [gnupic] Potential PIC project ?, easlab.absamail.co.za
Previous in thread: 2 Jan 2006 02:35:18 +0000 Re: [gnupic] Relocatable code and EXTERN, Frank Sergeant
Next in thread: 2 Jan 2006 02:35:18 +0000 Re: [gnupic] Relocatable code and EXTERN, Iain Dooley


Powered by ezmlm-browse 0.20.