gnupic: relocatable data


Previous by date: 4 May 2004 01:59:04 +0100 relocatable data, Gabor Kiss [Bitman]
Next by date: 4 May 2004 01:59:04 +0100 gputils-0.12.1, Craig Franklin
Previous in thread: 4 May 2004 01:59:04 +0100 relocatable data, Gabor Kiss [Bitman]
Next in thread: 4 May 2004 01:59:04 +0100 Re: relocatable data, Gabor Kiss [Bitman]

Subject: Re: relocatable data
From: Craig Franklin ####@####.####
Date: 4 May 2004 01:59:04 +0100
Message-Id: <1083632314.2202.28.camel@r2d2>

On Mon, 2004-05-03 at 03:47, Gabor Kiss [Bitman] wrote:
> I've conceptional problems with gpasm relocatable mode.
> I found no way to define data segments in different source files
> that will be concatenated at link phase.
> 
> I mean I need a construction like this
> 
> --------------------------------------------------------------
> source1.asm:
> 	data-segment 0x30	; a non-existent directive (intentionally)
> var1:2
> var2:1
> --------------------------------------------------------------
> source2.asm:
> 	data-segment
> var3:4
> --------------------------------------------------------------
> 
> After linking I expect var3 at address 0x33, that is 0x30 plus the length of
> previous data segment.
> 
> At this moment nor "cblock" neither "udata" does this.
> 

Sections can be named.  For instance:

--------------------------------------------------------------
source1.asm:
MYDATA udata
var1 res 2
var2 res 1
--------------------------------------------------------------
source2.asm:
MYDATA udata
var3 res 4
--------------------------------------------------------------

The sections will be merged before relocation.  They will be merged
according to the gplink file list.

Your example has one absolute and one relocatable section.  This mode
is not supported (by gplink and mplink).  This can be achieved by
creating a section in a custom linker script.

--------------------------------------------------------------
script.lkr:

include 16f877a.lkr

SECTION    NAME=MYDATA    RAM=sfr0
--------------------------------------------------------------

This example puts the data anywhere on bank0.  You could also
rewrite the provided script to split up the bank.  Although, that isn't
always necessary.

I recommend reading the mplink sections of:

http://gputils.sourceforge.net/33014g.pdf

> 
> Anyway I need a "Gputils Relocatable Tutorial for Dummies". :-)
> With a lot of examples please.
> 

You found my horribly incomplete HOWTO on the website.

http://gputils.sourceforge.net/reloc_howto.html

That is the closest thing I have.

> Gabor
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ####@####.####
> For additional commands, e-mail: ####@####.####
> 


Previous by date: 4 May 2004 01:59:04 +0100 relocatable data, Gabor Kiss [Bitman]
Next by date: 4 May 2004 01:59:04 +0100 gputils-0.12.1, Craig Franklin
Previous in thread: 4 May 2004 01:59:04 +0100 relocatable data, Gabor Kiss [Bitman]
Next in thread: 4 May 2004 01:59:04 +0100 Re: relocatable data, Gabor Kiss [Bitman]


Powered by ezmlm-browse 0.20.