[En-Nut-Discussion] Using upper 64k of flash
Lars Haack
lars.haack at gmx.de
Mon Dec 2 20:37:03 CET 2002
Hi,
I had problems using the upper 64k of the built-in flash in my projects
based on NutOS, but I think it is not releated to NutOS itself. It has not
been a problem with the programmer (uisp) like mentioned in other threads. I
found out that everything works fine if the load address of the initialized
data that is copied to the RAM lays below 64k ( see data_load_start and
data_load_end in the MAP-file). If it exceeds this limit the software
crashes. This is the case with the AVRGCC Release of June 2002 and also the
new WinAVR release from November 2002 found on AVRFreaks. As a workaround I
modified the linkerscript avr3.x in a way that the load address of the .data
segment is always lower than the .text segment. I inserted a new section
text2 thats address is higher than the address of section text und moved all
references to the segments .text to this new section. After these changes
even the projects with larger code work fine.
This is of course only a workaround I have to use until someone can explain
to me what I am doing wrong or what changes have to be made to the
startup-code gcrt1.S.
I appreciate to hear any comments on this issue.
Regards
Lars
More information about the En-Nut-Discussion
mailing list