[arm-gnu] Placing variable at absolute address in RAM
42Bastian
list-bastian.schick at sciopta.com
Fri Apr 6 15:26:47 UTC 2012
Hi
> bi/4.5.2/../../../../arm-none-eabi/bin/ld.exe: section .data loaded at [00028bc0,00028bcf] overlaps section .sram1 loaded at [00028bc0,00028c7b]
> collect2: ld returned 1 exit status
> cs-make: *** [RTOSDemo.axf] Error 1
You should not mix AT > with AT(...).
> MEMORY
> {
> FLASH (rx) : ORIGIN = 0x00001000, LENGTH = 252K
> SRAM1 (rwx) : ORIGIN = 0x20000000, LENGTH = 464
> DMA (rwx) : ORIGIN = 0x200001D0, LENGTH = 16
> SRAM2 (rwx) : ORIGIN = 0x200001E0, LENGTH = 97824
> }
>
> SECTIONS
> {
> .text :
> {
> KEEP(*(.isr_vector))
> *(.text*)
> *(.rodata*)
> _etext = .;
> } > FLASH
>
> .sram1 :
> {
> *(.sram1_data)
> sram1_bss = .;
> *(.sram1_bss)
> } > SRAM1 AT > FLASH
>
> sram1_loadaddr = LOADADDR(.sram1);
>
> .data : AT (ADDR(.text) + SIZEOF(.text))
> {
> _data = .;
> *(vtable)
> *(.data*)
> _edata = .;
> } > SRAM2
.data :
{
_data = .;
*(vtable)
*(.data*)
_edata = .;
} > SRAM2 AT > FLASH
>
> .bss(NOLOAD) :
> {
> _bss = .;
> *(.bss*)
> *(COMMON)
> _ebss = .;
> . = ALIGN (8);
I suggest to move _ebss after the alignment.
> _end = .;
> } > SRAM2
>
> .dmaRegisters 0x200001D0 (NOLOAD) :
> {
> *(.dmaRegisters)
> } > DMA
>
> }
>
> /* end of allocated ram _end */
> PROVIDE( _HEAP_START = _end );
>
> /* end of the heap -> align 8 byte */
> PROVIDE ( _HEAP_END = ALIGN(ORIGIN(SRAM2) + LENGTH(SRAM2),8) );
--
42Bastian
+
| http://www.sciopta.com
| Fastest direct message passing kernel.
| IEC61508 certified.
+
More information about the arm-gnu
mailing list