X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fcpu%2Fcortex-m3%2Fscripts%2Fstm32f103rb_rom.ld;h=4d0884b983463623540df83334210ac05108b884;hb=aa23c5d7c7b2b79e8ff74eb00bb12531b35731b4;hp=334d81182253a74ab234a9a3174b0387b6c9bea8;hpb=11f14621bcd59a2de4564b0e9804b15acd11ea75;p=bertos.git diff --git a/bertos/cpu/cortex-m3/scripts/stm32f103rb_rom.ld b/bertos/cpu/cortex-m3/scripts/stm32f103rb_rom.ld index 334d8118..4d0884b9 100644 --- a/bertos/cpu/cortex-m3/scripts/stm32f103rb_rom.ld +++ b/bertos/cpu/cortex-m3/scripts/stm32f103rb_rom.ld @@ -36,9 +36,11 @@ * */ -SEARCH_DIR(.) -OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm") -OUTPUT_ARCH(arm) +/* + * Define stack size here + * Variable used in the cortex-m3_rom.ld file + */ +STACK_SIZE = 0x1000; /* * Define memory configuration for STM32F103R8 @@ -49,70 +51,5 @@ MEMORY ram(rwx) : org = 0x20000000, len = 20k } -/* - * Define stack size here - */ -STACK_SIZE = 0x1000; - -/* - * Allocate section memory - */ -SECTIONS -{ - .text : - { - KEEP(*(.vectors)); - . = ALIGN (4); - KEEP(*(.init)); - . = ALIGN (4); - *(.rodata .rodata.*); - . = ALIGN (4); - *(.text .text.*); - . = ALIGN (4); - *(.glue_7t); - . = ALIGN(4); - *(.glue_7); - . = ALIGN(4); - } > rom - - __text_end = .; - PROVIDE (__text_end = .); - - .data : AT (__text_end) - { - PROVIDE (__data_start = .); - . = ALIGN (0x400); - *(vtable) - *(.data .data.*) - . = ALIGN (4); - _edata = .; - PROVIDE (__data_end = .); - } > ram +INCLUDE "bertos/cpu/cortex-m3/scripts/cortex-m3_rom.ld" - .bss : - { - PROVIDE (__bss_start = .); - *(.bss .bss.*) - . = ALIGN(4); - *(COMMON) - . = ALIGN(4); - PROVIDE (__bss_end = .); - } > ram - - /* - * Allocated stack at the end of bss section. - * Data heap is allocate at end of stack. - */ - PROVIDE (__msp_start = .); - . = ALIGN(8); - . += STACK_SIZE; - PROVIDE (__msp_end = .); - - PROVIDE (__psp_start = .); - . = ALIGN(8); - . += STACK_SIZE; - PROVIDE (__psp_end = .); - - PROVIDE (__heap_start = .); - . = ALIGN(8); -}