diff options
Diffstat (limited to 'nuttx/configs/kwikstik-k40/ostest/ld.script')
-rwxr-xr-x | nuttx/configs/kwikstik-k40/ostest/ld.script | 46 |
1 files changed, 33 insertions, 13 deletions
diff --git a/nuttx/configs/kwikstik-k40/ostest/ld.script b/nuttx/configs/kwikstik-k40/ostest/ld.script index edadb38a0..f4f3f2e69 100755 --- a/nuttx/configs/kwikstik-k40/ostest/ld.script +++ b/nuttx/configs/kwikstik-k40/ostest/ld.script @@ -34,22 +34,42 @@ ****************************************************************************/ /* The K40X256VLQ100 has 256Kb of FLASH beginning at address 0x0000:0000 and - * 32Kb of SRAM beginning at address 0x1800:0000. + * 64Kb of SRAM beginning at address 0x1800:0000 (SRAM_L) and 0x2000:000 + * (SRAM_U). + * + * NOTE: that the first part of the K40 FLASH region is reserved for + * interrupt vectflash and, following that, is a region from 0x0000:0400 + * to 0x0000:040f that is reserved for the FLASH control fields (FCF). + * + * NOTE: The on-chip RAM is split evenly among SRAM_L and SRAM_U. The RAM is + * also implemented such that the SRAM_L and SRAM_U ranges form a + * contiguous block in the memory map. */ MEMORY { - flash (rx) : ORIGIN = 0x00000000, LENGTH = 256K - sram (rwx) : ORIGIN = 0x18000000, LENGTH = 32K + vectflash (rx) : ORIGIN = 0x00000000, LENGTH = 1K - 16 + cfmprotect (rx) : ORIGIN = 0x00000400, LENGTH = 16 + progflash (rx) : ORIGIN = 0x00000800, LENGTH = 256K - 2K + datasram (rwx) : ORIGIN = 0x1fff8000, LENGTH = 64K } OUTPUT_ARCH(arm) ENTRY(_stext) SECTIONS { + .vectors : { + _svectors = ABSOLUTE(.); + *(.vectors) + _evectors = ABSOLUTE(.); + } > vectflash + + .cfmprotect : { + *(.cfmconfig) + } > cfmprotect + .text : { _stext = ABSOLUTE(.); - *(.vectors) *(.text .text.*) *(.fixup) *(.gnu.warning) @@ -61,7 +81,7 @@ SECTIONS *(.gcc_except_table) *(.gnu.linkonce.r.*) _etext = ABSOLUTE(.); - } > flash + } > progflash .data : { _sdata = ABSOLUTE(.); @@ -69,26 +89,26 @@ SECTIONS *(.gnu.linkonce.d.*) CONSTRUCTORS _edata = ABSOLUTE(.); - } > sram AT > flash + } > datasram AT > progflash _eronly = LOADADDR(.data); .ramfunc ALIGN(4): { - _sramfunc_begin = . ; + _sramfuncs = ABSOLUTE(.); *(.ramfunc .ramfunc.*) - _eramfunc_end = . ; - } > sram AT > flash + _eramfuncs = ABSOLUTE(.); + } > datasram AT > progflash - _framfunc = LOADADDR(.ramfunc); + _framfuncs = LOADADDR(.ramfunc); .ARM.extab : { *(.ARM.extab*) - } >sram + } > datasram __exidx_start = ABSOLUTE(.); .ARM.exidx : { *(.ARM.exidx*) - } >sram + } > datasram __exidx_end = ABSOLUTE(.); .bss : { @@ -97,7 +117,7 @@ SECTIONS *(.gnu.linkonce.b.*) *(COMMON) _ebss = ABSOLUTE(.); - } > sram + } > datasram /* Stabs debugging sections. */ .stab 0 : { *(.stab) } |