[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] Position Independent Code / Data (PIC /PID)

From: Moritz Struebe
Subject: [avr-gcc-list] Position Independent Code / Data (PIC /PID)
Date: Wed, 21 May 2008 09:54:18 +0200
User-agent: Thunderbird (Windows/20080421)

I already posted this to avr-libc, but I didn't get an answer jet and it probably was the wrong group.

Hi there,

I developed module support for Nut/OS running on a ATmega128. At the
moment I allocate memory and then link against this information. Using
PIC would save me this trouble.

I did some research on PIC/PID & AVR, but mostly found guesswork and/or
even false information. (Or people complaining that someone posted in an
AVR and not in the Microchip-Forum. ;-) )
Dunkels et al. say that PIC is limited to 4K [1]. I'm not sure why this
is the case. Looking at the documentation I come up with +-2^16 words =

I'm also not sure how to interpret the -mshort-calls option. Does this
mean I get only rjmps and the linker will complain if the jumps get too
long, or will the Linker silently fail.

Further on I curious whether it would be (theoretically) possible to let
the linker decide whether to use jmp or rjmp or even do double rjmps to
cover the full range. I know, the latter is a bit strange, but would
enable code > 64K to be position independent.

I was wondering whether PID is supported because it came up in one or
two threads. But I assume not.

Thanks for your advice.


[1] http://www.sics.se/~adam/dunkels06runtime.pdf
AVR-libc-dev mailing list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]