Hi there, and thanks for reading.

Here's the story :

My CPU has no MMU (AVR32UC3B), very little RAM (16KB), and is running
a modified FreeRTOS. I'd like to have the ability to "load" and run
some "standalone" code from RS232 or SDCARD to FLASH as a RTOS task.
>From now, this is working, but for convenience, a fully position
independent code would be easier to maintain in future. Using the -
fPIC or -fpic option, looking at the assembler, the code seems OK : a
dynamically computed offset (using PC relative instructions) is
applied to every operations.

BUT, looking deeply, both DATA and CODE are applied the same base
offset ! While this is the expected behavior for CODE (running
anywhere in FLASH), loading my CODE 16KB farther into FLASH, doesn't
mean moving my RAM from 16KB ! This make only sense when executing CODE
+DATA from RAM.

I'm looking for a solution to generate position independent *code*,
but with position dependent *data* using GCC/LD...

Any hints ?
_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Reply via email to