gnupic: Re: [gnupic] Relocatable code and EXTERN


Previous by date: 2 Jan 2006 10:38:52 +0000 Re: [gnupic] Potential PIC project ?, Peter
Next by date: 2 Jan 2006 10:38:52 +0000 Re: [gnupic] Relocatable code and EXTERN, John De Villiers
Previous in thread: 2 Jan 2006 10:38:52 +0000 Re: [gnupic] Relocatable code and EXTERN, Iain Dooley
Next in thread: 2 Jan 2006 10:38:52 +0000 Re: [gnupic] Relocatable code and EXTERN, John De Villiers

Subject: Re: [gnupic] Relocatable code and EXTERN
From: John De Villiers ####@####.####
Date: 2 Jan 2006 10:38:52 +0000
Message-Id: <1136198309.4886.217.camel@bbj.inet>

Scott, youre the closest. In this case all i wanted to do was replace
the limit checking of the number of strings that the write_string
function uses. I got around it by commenting it out  ;-) Its not a
problem right now.

Your idea of being able to change the port assignments for later
projects is probably something i'd consider as well, but those are
addresses, and i can just define those as extern ( IE extern LCDPORT )
and define its address in the main module, but thats not a real biggie
right now.

The whole idea is to create a set of relocatable libraries for often
used code, that dont need compiling each time etc.

I envisage creating a seperate code object for each funtion or group of
functions, and then sticking them into a library archive that i can then
just refrence from there onwards. Each code object will still have its
own include that will be unique, but similar, for each project.

I then also want to figure out a way of automagically creating a library
Makefile that will make a new lib for a specified processor type so that
when i start a new project for a processor that i havent used before,
the makefile will generate a new library for that processor. Care will
obviously have to be taken to make sure that i dont do things that
certain processors dont support. There is no way i'll every automate the
whole process, but i'll at least be able to take the sting out starting
from scratch every time.

On Mon, 2006-01-02 at 04:34, Scott Dattalo wrote:
> 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
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ####@####.####
> For additional commands, e-mail: ####@####.####
> 
> 


Previous by date: 2 Jan 2006 10:38:52 +0000 Re: [gnupic] Potential PIC project ?, Peter
Next by date: 2 Jan 2006 10:38:52 +0000 Re: [gnupic] Relocatable code and EXTERN, John De Villiers
Previous in thread: 2 Jan 2006 10:38:52 +0000 Re: [gnupic] Relocatable code and EXTERN, Iain Dooley
Next in thread: 2 Jan 2006 10:38:52 +0000 Re: [gnupic] Relocatable code and EXTERN, John De Villiers


Powered by ezmlm-browse 0.20.