You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

135 lines
2.9 KiB

/* Linker script for ATMEL(R) AVR(R) ATmega328P. */
OUTPUT_FORMAT("elf32-avr","elf32-avr","elf32-avr")
OUTPUT_ARCH(avr:5)
/* The beginning and end of the program ROM area. */
/* Leave 4 bytes for the 32-bit checksum plus 0x10 extra bytes free. */
_rom_begin = 0x00000000;
_rom_end = 0x00007FEC;
/* The beginning and end (i.e., top) of the stack */
/* Set up a stack with a size of (1/2)K */
_stack_begin = 0x800500;
_stack_end = 0x8008FF; /* RAFA, en atmega328 el fin de la RAM */
/* The end of the 2K RAM stack */
__initial_stack_pointer = 0x8008FF;
MEMORY
{
ROM(rx) : ORIGIN = 0, LENGTH = 32K
RAM(rw!x) : ORIGIN = 0x800100, LENGTH = 2K
}
SECTIONS
{
. = 0x0;
/* RAFA . = ALIGN(2); */
/* ISR vectors */
.isr_vector :
{
*(.isr_vector)
. = ALIGN(0x10);
KEEP(*(.isr_vector))
} > ROM = 0xAAAA
/* Startup code */
.startup :
{
*(.startup)
. = ALIGN(0x10);
KEEP(*(.startup))
} > ROM = 0xAAAA
/* Program code (text), read-only data and static ctors */
.text :
{
/* RAFA _*/
text = ABSOLUTE(.); /* text: beginning of text segment */
__muluhisi3 = .;
start = .;
__do_copy_data = .;
__do_clear_bss = .;
_/* _data_end = .; */
__data_load_start = .;
__bss_end = .;
__bss_start = .;
__data_start = .;
/* FIN DE RAFA */
_ctors_begin = .;
*(.ctors)
. = ALIGN(2);
KEEP (*(SORT(.ctors)))
_ctors_end = .;
*(.progmem*)
. = ALIGN(2);
*(.trampolines*)
. = ALIGN(2);
*(.text)
. = ALIGN(2);
*(.text*)
. = ALIGN(2);
etext = ABSOLUTE(.) ; /* etext: end of text */
} > ROM
.text :
{
. = ALIGN(0x10);
} > ROM = 0xAAAA
.= 0x800100;
. = ALIGN(2);
/* The ROM-to-RAM initialized data section */
.data :
{
data = ABSOLUTE(.); /* data: beginning of data segment */
_data_begin = .;
*(.data)
/* rafa . = ALIGN(2); */
. = ALIGN(1);
KEEP (*(.data))
*(.data*)
/* RAafa . = ALIGN(2); todos los demas tambien */
. = ALIGN(1);
KEEP (*(.data*))
*(.rodata) /* Do *NOT* move this! Include .rodata here if gcc is used with -fdata-sections. */
. = ALIGN(1);
KEEP (*(.rodata))
*(.rodata*)
. = ALIGN(1);
KEEP (*(.rodata*))
_data_end = .;
edata = ABSOLUTE(.) ; /* edata: end of data */
} > RAM AT > ROM
/* The uninitialized (zero-cleared) data section */
.bss :
{
bss = ABSOLUTE(.); /* bss: beginning of bss segment */
_bss_begin = .;
*(.bss)
. = ALIGN(1);
KEEP (*(.bss))
*(.bss*)
. = ALIGN(1);
KEEP (*(.bss*))
_bss_end = .;
ebss = ABSOLUTE(.) ; /* ebss: end of bss */
end = ABSOLUTE(.); /* end: end of image */
_end = ABSOLUTE(.); /* _end: end of image */
} > RAM
_rom_data_begin = LOADADDR(.data);
}