From ab0905cbd880f94d17cc06413b19df5b537cd43a Mon Sep 17 00:00:00 2001 From: patacongo Date: Wed, 17 Sep 2008 20:27:29 +0000 Subject: [PATCH] LPC2148 oots partially into NuttX git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@924 42af7a65-404d-4744-a932-0658087f49c3 --- configs/mcu123-lpc214x/defconfig | 2 +- configs/mcu123-lpc214x/ld.script | 15 ++++++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/configs/mcu123-lpc214x/defconfig b/configs/mcu123-lpc214x/defconfig index 1229ec525a..a1f0b9086b 100644 --- a/configs/mcu123-lpc214x/defconfig +++ b/configs/mcu123-lpc214x/defconfig @@ -347,7 +347,7 @@ CONFIG_EXAMPLES_NSH_NETMASK=(255<<24|255<<16|255<<8|0) # CONFIG_HEAP_BASE - The beginning of the heap # CONFIG_HEAP_SIZE - The size of the heap # -CONFIG_BOOT_FROM_FLASH=n +CONFIG_BOOT_FROM_FLASH=y CONFIG_CUSTOM_STACK=n CONFIG_STACK_POINTER= CONFIG_PROC_STACK_SIZE=4096 diff --git a/configs/mcu123-lpc214x/ld.script b/configs/mcu123-lpc214x/ld.script index 80138e3b3a..cf802e8039 100644 --- a/configs/mcu123-lpc214x/ld.script +++ b/configs/mcu123-lpc214x/ld.script @@ -37,7 +37,10 @@ OUTPUT_ARCH(arm) ENTRY(_stext) SECTIONS { - /* The OS entry point is here (default MEMMAP mode assumed) */ + /* The lpc2148 has 512Kb of non-volatile memory beginning at address + * 0x00000000. The OS entry point is via the reset vector at address + * 0x00000000 (default MEMMAP mode assumed) + */ . = 0x00000000; .text : { @@ -51,10 +54,16 @@ SECTIONS *(.got) /* Global offset table */ _etext = ABSOLUTE(.); } + _eronly = ABSOLUTE(.); /* This is where the .data section + * is relocated for execution out + * FLASH */ - _eronly = ABSOLUTE(.); /* See below */ - . = ALIGN(4096); + /* The lpc2148 has 32Kb of on-chip static RAM beginning at address + * 0x40000000. The .data section will be relocated from _eronly + * to _sdata at boot time. + */ + . = 0x40000000; .data : { _sdata = ABSOLUTE(.); *(.data)