diff options
author | Josh Rahm <joshuarahm@gmail.com> | 2018-01-22 00:14:20 -0700 |
---|---|---|
committer | Josh Rahm <joshuarahm@gmail.com> | 2018-01-22 00:14:20 -0700 |
commit | af0244fb51ccb608440128d0f3303ccce77c14c2 (patch) | |
tree | 4b6057fe3c3029ee4b4602e690917859c6011599 /usart/linker/linker_script.ld | |
parent | 2dcbbea5fe1e2342ce4700b3ee8dce44a360a888 (diff) | |
download | stm32l4-af0244fb51ccb608440128d0f3303ccce77c14c2.tar.gz stm32l4-af0244fb51ccb608440128d0f3303ccce77c14c2.tar.bz2 stm32l4-af0244fb51ccb608440128d0f3303ccce77c14c2.zip |
VERY simple USART set up on USART2.
Diffstat (limited to 'usart/linker/linker_script.ld')
-rw-r--r-- | usart/linker/linker_script.ld | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/usart/linker/linker_script.ld b/usart/linker/linker_script.ld new file mode 100644 index 0000000..348d03b --- /dev/null +++ b/usart/linker/linker_script.ld @@ -0,0 +1,36 @@ +MEMORY +{ + flash : org = 0x08000000, len = 256k + sram1 : org = 0x20000000, len = 48k + sram2 : org = 0x10000000, len = 16k +} + +SECTIONS +{ + /* This is where the code goes. */ + . = ORIGIN(flash); + .text : { + *(.vectors); /* All .vector sections go here. */ + *(.text); /* All .text sections go here. */ + } >flash + + .data : { + /* Data segment as defined in the flash. */ + INIT_DATA_VALUES = LOADADDR(.data); + + /* Data segment where it will be in memory. */ + DATA_SEGMENT_START = .; + *(.data); + DATA_SEGMENT_STOP = .; + + /* Align by 4 so we can optimize the copier to use uint32's. */ + . = ALIGN(0x04); + } >sram1 AT>flash + + BSS_START = .; + .bss : { + *(.bss); + . = ALIGN(0x04); + } > sram1 + BSS_END = .; +} |