Re: MPLAB linker problem for PIC18



On Fri, 16 Nov 2007 11:35:34 -0800, larkmore wrote:

Ok, something doesn't make sense. I have an .inc file with my variable
definitions in it as follows

UDATA 0x000
VAR1 RES 1
VAR2 RES 1
VAR3 RES 1
.
.
.
VARn RES 1

I definitely have less than 0xFF (255) variables declared which means it
should fit all nice and snug in the first RAM bank of the PIC18F2431 that
I'm using. Yet when I go to compile/assemble/link it I get:

MPLINK 4.06, Linker
Copyright (c) 2006 Microchip Technology Inc. Error - section '.udata' can
not fit the absolute section. Section '.udata' start=0x00000000,
length=0x000000dc Errors : 1

What gives? Why can't 0xdc bytes of data fit into 0xff worth of memory?
Did I declare something wrong? Short of using a whole hell of a lot of
EQU statements (shudder), is there another way to make the linker put all
of my variables in Bank 0? -Will

I suspect the problem is in the linker script, the .lkr file. It probably
has an access section already setup that is causing the link error. Look
at some of the examples in the MPASM and the MPLINK manuals.


--
Joe Chisolm
Marble Falls, TX

.



Relevant Pages

  • Re: MPLAB linker problem for PIC18
    ... variable definitions in it as follows ... MPLINK 4.06, Linker ... Error - section '.udata' can not fit the absolute section. ... something wrong with the ORG statement somwhere maybe? ...
    (sci.electronics.design)
  • Re: Mem usage on AVR?
    ... >>although in terms of code space and pin usage it should fit onto a 2313. ... I didn't know that the linker would tell me that it wouldn't ...
    (comp.arch.embedded)

Quantcast