[En-Nut-Discussion] Move some code parts from an application running in ROM to RAM

Matthias Wilde ethernut at stockelache.de
Fri Nov 16 11:13:48 CET 2007


Dear Harald,

thank you for the quick reply and support.

Unfortunately  I still have some problems. In the linker script you refer
to "__ramfunc_image" which is an undefined symbol for the linker. So I
guess this area has to be defined somewhere. I tried to introduce this in
different ways in the .S file also in the .ld, but without success. The
linker scripts and me we are not in love ;-) May be you remember my last
C++ modification took also a long time.

Do you have one more hint for me where I have to define __ramfunc_image.
Or should I just go for the newest NutOS (I am stil using 4.2.1).

Thank you again


Matthias




> Matthias Wilde schrieb:
>> I have running on an Ethernut 3 an large application in ROM. Especially
>> for the interrupt service routines I would like to move some routines to
>> RAM to execute faster.
>> I wonder if I need to define these routines in the linker script
>> explicit
>> or is there a easier way out like a flag "prog_char" to prepare a
>> function
>> for RAM?
>>
>>
> The following addition is required in the linker script:
>
> .ramfunc : AT (__ramfunc_image)
> {
>         PROVIDE (__ramfunc_start = .);
>         *(.ramfunc)
>         . = ALIGN(4);
>         PROVIDE (__ramfunc_end = .);
> } >ram
>
> Add the following attribute to the function that should run in RAM:
>
>  __attribute__ ((section(".ramfunc")))
>
> Harald
>
> _______________________________________________
> http://lists.egnite.de/mailman/listinfo/en-nut-discussion
>
>


-- 




More information about the En-Nut-Discussion mailing list