diff options
Diffstat (limited to 'nuttx/configs/kwikstik-k40')
-rw-r--r-- | nuttx/configs/kwikstik-k40/ostest/Make.defs | 8 | ||||
-rwxr-xr-x | nuttx/configs/kwikstik-k40/ostest/defconfig | 11 | ||||
-rwxr-xr-x | nuttx/configs/kwikstik-k40/ostest/ld.script | 46 |
3 files changed, 39 insertions, 26 deletions
diff --git a/nuttx/configs/kwikstik-k40/ostest/Make.defs b/nuttx/configs/kwikstik-k40/ostest/Make.defs index 6259f67cb..ef478d80a 100644 --- a/nuttx/configs/kwikstik-k40/ostest/Make.defs +++ b/nuttx/configs/kwikstik-k40/ostest/Make.defs @@ -41,24 +41,24 @@ ifeq ($(CONFIG_KINETIS_CODESOURCERYW),y) # CodeSourcery under Windows CROSSDEV = arm-none-eabi- WINTOOL = y - ARCHCPUFLAGS = -mcpu=cortex-m4 -mthumb -mfloat-abi=soft + ARCHCPUFLAGS = -mcpu=cortex-m4 -mthumb -mfloat-abi=soft -mlong-calls endif ifeq ($(CONFIG_KINETIS_CODESOURCERYL),y) # CodeSourcery under Linux CROSSDEV = arm-none-eabi- - ARCHCPUFLAGS = -mcpu=cortex-m4 -mthumb -mfloat-abi=soft + ARCHCPUFLAGS = -mcpu=cortex-m4 -mthumb -mfloat-abi=soft -mlong-calls MAXOPTIMIZATION = -O2 endif ifeq ($(CONFIG_KINETIS_DEVKITARM),y) # devkitARM under Windows CROSSDEV = arm-eabi- WINTOOL = y - ARCHCPUFLAGS = -mcpu=cortex-m4 -mthumb -mfloat-abi=soft + ARCHCPUFLAGS = -mcpu=cortex-m4 -mthumb -mfloat-abi=soft -mlong-calls endif ifeq ($(CONFIG_KINETIS_BUILDROOT),y) # NuttX buildroot under Linux or Cygwin CROSSDEV = arm-elf- - ARCHCPUFLAGS = -mtune=cortex-m3 -march=armv7-m -mfloat-abi=soft + ARCHCPUFLAGS = -mtune=cortex-m3 -march=armv7-m -mfloat-abi=soft -mlong-calls MAXOPTIMIZATION = -Os endif diff --git a/nuttx/configs/kwikstik-k40/ostest/defconfig b/nuttx/configs/kwikstik-k40/ostest/defconfig index 9cf3af7f6..833511a87 100755 --- a/nuttx/configs/kwikstik-k40/ostest/defconfig +++ b/nuttx/configs/kwikstik-k40/ostest/defconfig @@ -77,15 +77,8 @@ CONFIG_ARCH_CHIP_MK40X256VLQ100=y CONFIG_ARCH_BOARD=kwikstik-k40 CONFIG_ARCH_BOARD_KWIKSTIK_K40=y CONFIG_BOARD_LOOPSPERMSEC=5483 -CONFIG_DRAM_SIZE=0x18000000 -CONFIG_DRAM_START=0x00008000 - -# define KINETIS_SRAML_BASE 0x18000000 /* –0x1fffffff SRAM_L: Lower SRAM - -# define KINETIS_FLASH_SIZE (256*1024) /* 256Kb */ -# define KINETIS_FLEXMEM_SIZE (256*1024) /* 256Kb */ -# define KINETIS_SRAM_SIZE (64*1024) /* 32Kb */ - +CONFIG_DRAM_START=0x1fff8000 +CONFIG_DRAM_SIZE= 0x00010000 CONFIG_DRAM_END=(CONFIG_DRAM_START+CONFIG_DRAM_SIZE) CONFIG_ARCH_IRQPRIO=y CONFIG_ARCH_INTERRUPTSTACK=n 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) } |