collab/pb-hal
git clone https://git.julia.blue/collab/pb-hal
1dbe808
control
1/* 2Thumb2 Newlib Toolchain example project 3Written by Elias Öal <EliasOenal@gmail.com>, released as public domain. 4 5This is a minimal linkerscript that should be easy to port to new microcontrollers. 6At this point it supports only C and will lead to weird behavior when used for C++. 7*/ 8 9ENTRY(ResetHandler) 10 11MEMORY 12{ 13 FLASH (rx) : ORIGIN = 0x0000000, LENGTH = 0x00040000 14 RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 0x00008000 15} 16 17SECTIONS { 18 .isr_vector : 19 { 20 . = ALIGN(4); 21 KEEP(*(.isr_vector)) 22 . = ALIGN(4); 23 } >FLASH 24 25 .text : 26 { 27 . = ALIGN(4); 28 *(.text) 29 *(.text.*) 30 *(.rodata) 31 *(.rodata.*) 32 . = ALIGN(4); 33 _etext = .; 34 _sidata = _etext; 35 } > FLASH 36 37 .data : AT ( _sidata ) 38 { 39 . = ALIGN(4); 40 _sdata = . ; 41 _data = . ; 42 *(.data) 43 *(.data.*) 44 . = ALIGN(4); 45 _edata = . ; 46 } >RAM 47 48 .bss : 49 { 50 . = ALIGN(4); 51 _sbss = .; 52 _bss = .; 53 *(.bss) 54 *(.bss.*) 55 . = ALIGN(4); 56 _ebss = . ; 57 } >RAM 58} 59 60. = ALIGN(4); 61end = .; 62end = .; 63