summaryrefslogtreecommitdiffstats
path: root/nuttx/configs/twr-k60n512
diff options
context:
space:
mode:
authorpatacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679>2011-08-18 18:16:47 +0000
committerpatacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679>2011-08-18 18:16:47 +0000
commit1a8c4db82c8e846dbd1dfbb9faa80c3b15fa7f33 (patch)
tree6df68855420ba2ab06385b2c0f3d72c7729d38ab /nuttx/configs/twr-k60n512
parent281e5ef78303264ae0b59f1958be1fd210414102 (diff)
Several important Kinetis build fixes
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@3891 7fd9a85b-ad96-42d3-883c-3090e2eb8679
Diffstat (limited to 'nuttx/configs/twr-k60n512')
-rw-r--r--nuttx/configs/twr-k60n512/ostest/Make.defs8
-rwxr-xr-xnuttx/configs/twr-k60n512/ostest/defconfig4
-rwxr-xr-xnuttx/configs/twr-k60n512/ostest/ld.script46
3 files changed, 39 insertions, 19 deletions
diff --git a/nuttx/configs/twr-k60n512/ostest/Make.defs b/nuttx/configs/twr-k60n512/ostest/Make.defs
index 76e942b401..5299bbd54c 100644
--- a/nuttx/configs/twr-k60n512/ostest/Make.defs
+++ b/nuttx/configs/twr-k60n512/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/twr-k60n512/ostest/defconfig b/nuttx/configs/twr-k60n512/ostest/defconfig
index 94ef1e82f3..9770e91ca7 100755
--- a/nuttx/configs/twr-k60n512/ostest/defconfig
+++ b/nuttx/configs/twr-k60n512/ostest/defconfig
@@ -77,8 +77,8 @@ CONFIG_ARCH_CHIP_MK60N512VMD100=y
CONFIG_ARCH_BOARD=twr-k60n512
CONFIG_ARCH_BOARD_TWR_K60N512=y
CONFIG_BOARD_LOOPSPERMSEC=5483
-CONFIG_DRAM_SIZE=0x18000000
-CONFIG_DRAM_START=0x00020000
+CONFIG_DRAM_START=0x1fff0000
+CONFIG_DRAM_SIZE=0x00020000
CONFIG_DRAM_END=(CONFIG_DRAM_START+CONFIG_DRAM_SIZE)
CONFIG_ARCH_IRQPRIO=y
CONFIG_ARCH_INTERRUPTSTACK=n
diff --git a/nuttx/configs/twr-k60n512/ostest/ld.script b/nuttx/configs/twr-k60n512/ostest/ld.script
index a9172e5695..d7692e1d38 100755
--- a/nuttx/configs/twr-k60n512/ostest/ld.script
+++ b/nuttx/configs/twr-k60n512/ostest/ld.script
@@ -34,22 +34,42 @@
****************************************************************************/
/* The K60N512VMD100 has 512Kb of FLASH beginning at address 0x0000:0000 and
- * 128Kb of SRAM beginning at address 0x1800:0000.
+ * 128Kb 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 = 512K
- sram (rwx) : ORIGIN = 0x18000000, LENGTH = 128K
+ vectflash (rx) : ORIGIN = 0x00000000, LENGTH = 1K - 16
+ cfmprotect (rx) : ORIGIN = 0x00000400, LENGTH = 16
+ progflash (rx) : ORIGIN = 0x00000800, LENGTH = 512K - 2K
+ datasram (rwx) : ORIGIN = 0x1fff0000, LENGTH = 128K
}
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) }