From 83e0a9d9a2594a3564252fa51334b4c20a44ba65 Mon Sep 17 00:00:00 2001 From: patacongo Date: Sat, 26 Feb 2011 18:58:45 +0000 Subject: Correct several m9s12x link issues git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3319 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/configs/ne64badge/ostest/ld.script.banked | 24 ++++++++++++++-------- nuttx/configs/ne64badge/ostest/ld.script.nonbanked | 22 ++++++++++++-------- 2 files changed, 30 insertions(+), 16 deletions(-) (limited to 'nuttx/configs/ne64badge') diff --git a/nuttx/configs/ne64badge/ostest/ld.script.banked b/nuttx/configs/ne64badge/ostest/ld.script.banked index 59b70293b..a0e07cb65 100755 --- a/nuttx/configs/ne64badge/ostest/ld.script.banked +++ b/nuttx/configs/ne64badge/ostest/ld.script.banked @@ -39,16 +39,20 @@ MEMORY { - /* The 8Kb SRAM is mapped to 0x2000-0x2fff. The top 256 bytes are reserved - * for the serial monitor stack space. + /* The register space resides at address 0x0000-0x03ff. The following + * address, 0x0400-0x1fff are unused. + * + * The 8Kb SRAM is mapped to 0x2000-0x2fff. */ - sram (rwx) : ORIGIN = 0x2000, LENGTH = 8K-256 + sram (rwx) : ORIGIN = 0x2000, LENGTH = 8K - /* Two fixed text flash pages (corresponding to page 3e and 3f) */ + /* Two fixed text flash pages (corresponding to page 3e and 3f). The + * top 256 bytes of page 3f is reserved to hold the interrupt vectors + */ lowtext(rx) : ORIGIN = 0x4000, LENGTH = 16K /* Page 3e */ - hitext (rx) : ORIGIN = 0xc000, LENGTH = 16K-2k /* Page 3f */ + hitext (rx) : ORIGIN = 0xc000, LENGTH = 16K-256 /* Page 3f */ /* Flash memory pages: * @@ -79,9 +83,9 @@ MEMORY page3e (rx) : ORIGIN = 0x0f8000, LENGTH = 16K /* Page 3e */ page3f (rx) : ORIGIN = 0x0fc000, LENGTH = 16K-2K /* Page 3f */ - /* Vectors. These get relocated to 0xf780-f7ff by the serial loader */ + /* Vectors */ - vectors (rx) : ORIGIN = 0xff80, LENGTH = 256 + vectors (rx) : ORIGIN = 0xff80, LENGTH = 256 } ENTRY(_stext) @@ -89,7 +93,7 @@ SECTIONS { .text : { _stext = ABSOLUTE(.); - *(.vectors) + *(nonbanked) *(.text .text.*) *(.fixup) *(.gnu.warning) @@ -113,6 +117,10 @@ SECTIONS _edata = ABSOLUTE(.); } > sram AT > lowtext + .vectors : { + *(vectors) + } > vectors + .bss : { /* BSS */ _sbss = ABSOLUTE(.); *(.bss .bss.*) diff --git a/nuttx/configs/ne64badge/ostest/ld.script.nonbanked b/nuttx/configs/ne64badge/ostest/ld.script.nonbanked index bc3004bd2..81fe56c42 100755 --- a/nuttx/configs/ne64badge/ostest/ld.script.nonbanked +++ b/nuttx/configs/ne64badge/ostest/ld.script.nonbanked @@ -39,20 +39,22 @@ MEMORY { - /* The 8Kb SRAM is mapped to 0x2000-0x2fff. The top 256 bytes are reserved - * for the serial monitor stack space. + /* The register space resides at address 0x0000-0x03ff. The following + * address, 0x0400-0x1fff are unused. + * + * The 8Kb SRAM is mapped to 0x2000-0x2fff. */ - sram (rwx) : ORIGIN = 0x2000, LENGTH = 8K-256 + sram (rwx) : ORIGIN = 0x2000, LENGTH = 8K /* Three fixed text flash pages (corresponding to page 3e, 3d, and 3f) at - * 16Kb each (minus 2Kb at the end of page 3f that is reserved at the top for - * the serial boot loader + * 16Kb each (minus 256 bytes at the end of page 3f that is reserved for + * interrupt vectors). */ - text (rx) : ORIGIN = 0x4000, LENGTH = 48K-2k /* Page 3e, 3d, and 3f */ + text (rx) : ORIGIN = 0x4000, LENGTH = 48K-256 /* Page 3e, 3d, and 3f */ - /* Vectors. These get relocated to 0xf780-f7ff by the serial loader */ + /* Vectors */ vectors (rx) : ORIGIN = 0xff80, LENGTH = 256 } @@ -62,7 +64,7 @@ SECTIONS { .text : { _stext = ABSOLUTE(.); - *(.vectors) + *(nonbanked) *(.text .text.*) *(.fixup) *(.gnu.warning) @@ -86,6 +88,10 @@ SECTIONS _edata = ABSOLUTE(.); } > sram AT > text + .vectors : { + *(vectors) + } > vectors + .bss : { /* BSS */ _sbss = ABSOLUTE(.); *(.bss .bss.*) -- cgit v1.2.3