From e3ed2ef4e72a4a3d3fd8fd2f499ec56c4ec67bf4 Mon Sep 17 00:00:00 2001 From: Olaf Rempel Date: Sat, 1 Mar 2008 16:36:45 +0100 Subject: [PATCH] make it work without dummy --- at91_init0.s | 5 +++-- ldscript.ld | 7 +++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/at91_init0.s b/at91_init0.s index 8de788d..006acae 100644 --- a/at91_init0.s +++ b/at91_init0.s @@ -31,7 +31,7 @@ .equ I_BIT, 0x80 .equ F_BIT, 0x40 - .section .text.dummy + .section .init .global _hwstart .func _hwstart _hwstart: @@ -44,7 +44,7 @@ _hwstart: ldr pc, [pc, #4] /* 0x18 IRQ */ ldr pc, [pc, #0] /* 0x1c FIQ */ - .word InitReset + 0x13c000 + .word _blrelocate /* + 0x13c000 */ .word 0x80000000 .endfunc @@ -52,6 +52,7 @@ _hwstart: .section .init .global _blrelocate .func _blrelocate +_blrelocate: msr CPSR_c, #ARM_MODE_SVC | I_BIT | F_BIT /* Remap RAM to 0x00000000 */ diff --git a/ldscript.ld b/ldscript.ld index 681da55..9d97b20 100644 --- a/ldscript.ld +++ b/ldscript.ld @@ -1,18 +1,21 @@ MEMORY { +/* FLASH(rx) : ORIGIN = 0x00100000, LENGTH = 256k - CODE (rx) : ORIGIN = 0x0013c000, LENGTH = 16k +*/ + CODE (rx) : ORIGIN = 0x00100000, LENGTH = 16k DATA (rwx) : ORIGIN = 0x00000000, LENGTH = 64k } SECTIONS { +/* . = ORIGIN(FLASH); .text.dummy : { *(.text.dummy) } >FLASH =0 - +*/ . = ORIGIN(CODE); .init : {