diff options
| author | Dave Hylands | 2014-08-16 07:45:34 -0700 |
|---|---|---|
| committer | Dave Hylands | 2014-08-16 08:00:12 -0700 |
| commit | 3688414d9d53e6a1d42d3b60e45d808cd90f04f2 (patch) | |
| tree | ccce35b6f93c450e501475afc940922743664ff7 /stmhal/stm32f405.ld | |
| parent | 8f81b5cb4bebf6aeaecf3f19a92be288f633c542 (diff) | |
Put some code into the first 16K of flash
This basically shrinks the remaining size of flash in the portion
that goes after the internal flash drive.
Diffstat (limited to 'stmhal/stm32f405.ld')
| -rw-r--r-- | stmhal/stm32f405.ld | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/stmhal/stm32f405.ld b/stmhal/stm32f405.ld index 64c46e4c2..9d9d4d508 100644 --- a/stmhal/stm32f405.ld +++ b/stmhal/stm32f405.ld @@ -34,6 +34,14 @@ SECTIONS . = ALIGN(4); KEEP(*(.isr_vector)) /* Startup code */ + /* This first flash block is 16K annd the isr vectors only take up + about 400 bytes. So we pull in a couple of object files to pad it + out. */ + + . = ALIGN(4); + */ff.o(.text*) + */stm32f4xx_hal_sd.o(.text*) + . = ALIGN(4); } >FLASH_ISR @@ -41,9 +49,7 @@ SECTIONS .text : { . = ALIGN(4); - *(.text) /* .text sections (code) */ *(.text*) /* .text* sections (code) */ - *(.rodata) /* .rodata sections (constants, strings, etc.) */ *(.rodata*) /* .rodata* sections (constants, strings, etc.) */ /* *(.glue_7) */ /* glue arm to thumb code */ /* *(.glue_7t) */ /* glue thumb to arm code */ @@ -78,7 +84,6 @@ SECTIONS . = ALIGN(4); _sdata = .; /* create a global symbol at data start; used by startup code in order to initialise the .data section in RAM */ _ram_start = .; /* create a global symbol at ram start for garbage collector */ - *(.data) /* .data sections */ *(.data*) /* .data* sections */ . = ALIGN(4); @@ -90,7 +95,6 @@ SECTIONS { . = ALIGN(4); _sbss = .; /* define a global symbol at bss start; used by startup code */ - *(.bss) *(.bss*) *(COMMON) |
