gnupic: Problem with gplink/gpasm and UDATA
Subject:
Problem with gplink/gpasm and UDATA
From:
"A.J. Green,PEM" ####@####.####
Date:
22 Jul 2005 10:18:39 +0100
Message-Id: <42E0B9EA.9090101@cam.ac.uk>
Hello,
Here at Cambridge University Engineering Department we are big users of
open-source software. As such I am looking at setting up a PIC
development environment using anjuta, gputils and sdcc.
At the moment I am struggling with gplink & gpasm. I can't seem to get
gplink to link any object file that was compiled from an asm file with a
non-absolute UDATA section. If I include an absolute memory location
(as in sec_name UDATA 0x20 instead of just sec-name UDATA) then
everything works fine.
I expect I am missing some fundamental point but I cannot for the life
of me work out why this doesn't work as I am fairly sure that the
location part is optional.
I'm using gputils v0.13.2 which is installed in /home/ajg72/picdev
(rather than /usr/local) and I have /home/ajg72/picdev/bin in my $PATH.
I am using the following commandlines:
gpasm -c simple.asm
gplink simple.o
simple.asm looks like this:
;-----------------------------------
list p=16f873
radix dec
include "p16f873.inc"
__config 0x3fff
data_sec udata
fred res 1
STARTUP code
start nop
goto start
end
;------------------------------------
gpasm reports no errors, warnings or messages but gplink outputs:
message: using default linker script
"/home/ajg72/picdev//share/gputils/lkr/16f873.lkr"
error: linker script has no definition that matches the type of section
"data_sec"
thanks in advance for your help,
Anthony Green - ####@####.####