From: hackbard <hackbard@staubsauger.localdomain>
Date: Sat, 15 Sep 2007 02:31:01 +0000 (+0200)
Subject: decreased available ram size due to stack usage, working interrupt vectors
X-Git-Url: https://hackdaworld.org/gitweb/?a=commitdiff_plain;h=ac35214abd7d42a7294047d1c8b7ce7552a38fbf;p=my-code%2Farm.git

decreased available ram size due to stack usage, working interrupt vectors
---

diff --git a/betty/lpc2220_rom.ld b/betty/lpc2220_rom.ld
index 92a99a0..40ed2ab 100644
--- a/betty/lpc2220_rom.ld
+++ b/betty/lpc2220_rom.ld
@@ -10,7 +10,7 @@
 MEMORY {
 	FLASH_BANK0 (rx) : ORIGIN = 0x80000000, LENGTH = 0x00100000
 	FLASH_BANK2 (rx) : ORIGIN = 0x82000000, LENGTH = 0x00100000
-	RAM (rw) : ORIGIN = 0x40000000, LENGTH = 0x00010000
+	RAM (rw) : ORIGIN = 0x40000000, LENGTH = 0x00010000 - (4 * 1024)
 }
 
 /* section definitions */
diff --git a/betty/startup.s b/betty/startup.s
index 7cf1e10..d6b0184 100644
--- a/betty/startup.s
+++ b/betty/startup.s
@@ -50,18 +50,26 @@
 
 	# exception handling must go to the very beginning
 
-	b handler_reset
-	b interrupt_handler_undef_instruction
-	b interrupt_handler_soft_ir
-	b interrupt_handler_prefetch_abort
-	b interrupt_handler_data_abort
+	ldr pc, handler_reset
+	ldr pc, handler_undef_instruction
+	ldr pc, handler_soft_ir
+	ldr pc, handler_prefetch_abort
+	ldr pc, handler_data_abort
 	nop
-	b interrupt_handler_irq
-	b interrupt_handler_fiq
+	ldr pc, handler_irq
+	ldr pc, handler_fiq
+
+handler_reset: .word handle_reset
+handler_undef_instruction: .word interrupt_handler_undef_instruction
+handler_soft_ir: .word interrupt_handler_soft_ir
+handler_prefetch_abort: .word interrupt_handler_prefetch_abort
+handler_data_abort: .word interrupt_handler_data_abort
+handler_irq: .word interrupt_handler_irq
+handler_fiq: .word interrupt_handler_fiq
 
 	# reset handling goes here
 
-handler_reset:
+handle_reset:
 
 	# init stack pointer for each mode + set stack limit