From 1764b2db55a2d35f1e394c6f8edf1beebc5f326e Mon Sep 17 00:00:00 2001 From: gdisirio Date: Thu, 29 May 2014 14:02:06 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@6970 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/common/ports/ARM/compilers/GCC/crt0.s | 6 +++--- os/common/ports/ARM/compilers/GCC/irq.s | 6 +++++- os/common/ports/ARM/compilers/GCC/rules.ld | 3 ++- 3 files changed, 10 insertions(+), 5 deletions(-) (limited to 'os/common/ports/ARM/compilers') diff --git a/os/common/ports/ARM/compilers/GCC/crt0.s b/os/common/ports/ARM/compilers/GCC/crt0.s index 8eae3452d..c5fb53092 100644 --- a/os/common/ports/ARM/compilers/GCC/crt0.s +++ b/os/common/ports/ARM/compilers/GCC/crt0.s @@ -146,7 +146,7 @@ bssloop: ldr r1, =_main_exit_handler bx r1 .code 32 -#else /* !defined(THUMB_NO_INTERWORKING) +#else /* !defined(THUMB_NO_INTERWORKING) */ bl main b _main_exit_handler #endif /* !defined(THUMB_NO_INTERWORKING) */ @@ -172,7 +172,6 @@ _main_exit_handler: __early_init: bx lr .code 32 -#endif /* * Default late initialization code. It is declared weak in order to be @@ -188,6 +187,7 @@ __early_init: __late_init: bx lr .code 32 -#endif + +#endif /* !defined(__DOXYGEN__) */ /** @} */ diff --git a/os/common/ports/ARM/compilers/GCC/irq.s b/os/common/ports/ARM/compilers/GCC/irq.s index 8490beb8c..8bce5cc67 100644 --- a/os/common/ports/ARM/compilers/GCC/irq.s +++ b/os/common/ports/ARM/compilers/GCC/irq.s @@ -26,6 +26,9 @@ * @{ */ +#define __FROM_ASM__ +#include "armparams.h" + #if !defined(__DOXYGEN__) .section irq @@ -39,7 +42,8 @@ .global IrqHandler IrqHandler: stmfd sp!, {r0-r3, r12, lr} - ldr r0, [pc, #ARM_IRQ_REGISTER_OFFSET] + ldr r0, =ARM_IRQ_VECTOR_REG + ldr r0, [r0] ldr lr, =_port_irq_common bx r0 diff --git a/os/common/ports/ARM/compilers/GCC/rules.ld b/os/common/ports/ARM/compilers/GCC/rules.ld index 8d131b75b..8c32a27a3 100644 --- a/os/common/ports/ARM/compilers/GCC/rules.ld +++ b/os/common/ports/ARM/compilers/GCC/rules.ld @@ -37,9 +37,10 @@ SECTIONS . = 0; _text = .; - startup : ALIGN(16) SUBALIGN(16) + boot : ALIGN(16) SUBALIGN(16) { KEEP(*(vectors)) + KEEP(*(irq)) } > flash constructors : ALIGN(4) SUBALIGN(4) -- cgit v1.2.3