avr-gcc-list
[Top][All Lists]
Advanced

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

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


From: Raj Sharma
Subject: Re: [avr-gcc-list] Position Independent Code / Data (PIC /PID)
Date: Wed, 21 May 2008 08:08:04 -0700 (PDT)

Hi Morty,

As far as I know, if you implement PIC using rjmp, then your PIC will be limited to 4K because rjmp accepts 12 bit operand.

Raj

--- On Wed, 5/21/08, Moritz Struebe <address@hidden> wrote:
From: Moritz Struebe <address@hidden>
Subject: [avr-gcc-list] Position Independent Code / Data (PIC /PID)
To: "avr-gcc-list" <address@hidden>
Date: Wednesday, May 21, 2008, 7:54 AM

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 =
64K.

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.

Cheers
Morty

[1] http://www.sics.se/~adam/dunkels06runtime.pdf
_______________________________________________
AVR-libc-dev mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/avr-libc-dev



_______________________________________________
AVR-GCC-list mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list


reply via email to

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