Hello again - I have been having various problems with this code, and so I've been looking carefully at it. I found something that I think may be a mistake. The linker script, ldscript:
Code:
OUTPUT_ARCH(ARM)
/* specify the AT91SAM7S64 memory areas */
MEMORY
{
flash : ORIGIN = 0x00000000, LENGTH = 64K /* free FLASH area */
ram : ORIGIN = 0x00200000, LENGTH = 16K /* free RAM area */
}
/* define a global symbol _stack_end <=> End of SRAM */
_stack_end = 0x00210000;
SECTIONS
{
/* Code and data are mapped at the bottom of the internal FLASH */
.text : {
_text = .; /* define a global symbol marking the start of the .text section */
*(.startup) /* define the entry point */
*(.text) /* all .text sections (code) */
_etext = .; /* define a global symbol marking the end of the .text section */
} > flash
.rodata : {
_srodata = .; /* define a global symbol marking the start of the .rodata section */
*(.rodata) /* all .rodata .rodata* sections (constants, strings, etc.) */
*(.rodata*) /* all .rodata* sections (constants, strings, etc.) */
*(.glue_7) /* all .glue_7 sections (mandatory before gcc 4.0.0) */
*(.glue_7t) /* all .glue_7t sections (mandatory before gcc 4.0.0) */
_erodata = .; /* define a global symbol marking the end of the .rodata section */
} > flash
.data : {
_sdata = .; /* define a global symbol marking the start of the .data section */
*(.data) /* all .data sections */
_edata = .; /* define a global symbol marking the end of the .data section */
} > ram
.bss : {
__bss_start = .; /* define a global symbol marking the start of the .bss section */
*(.bss) /* all .bss sections */
*(COMMON)
__bss_end = .; /* define a global symbol marking the end of the .bss section */
} > ram
_end = .; /* define a global symbol marking the end of application */
end = .;
}
Note that this file appears to be designed for an AT91SAM7S64, not an AT91SAM7XC256 like the rest of the files. Can anybody tell me how to fix this file? Are the two lengths the only things that need to be changed? What about the stack end?