diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2008-08-25 14:17:38 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2008-08-25 14:17:38 +0000 |
commit | 65baafa9e6e82293a202c96e832c7779b7216550 (patch) | |
tree | 5e8168a51d1d8f8e54deb9d2b9394f9955e18705 /ports | |
parent | 01afd268a5f8bb48007b44e6c2aa7c0d3eafe757 (diff) | |
download | ChibiOS-65baafa9e6e82293a202c96e832c7779b7216550.tar.gz ChibiOS-65baafa9e6e82293a202c96e832c7779b7216550.tar.bz2 ChibiOS-65baafa9e6e82293a202c96e832c7779b7216550.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@404 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'ports')
-rw-r--r-- | ports/ARM7-AT91SAM7X/chcore.c | 3 | ||||
-rw-r--r-- | ports/ARM7-AT91SAM7X/crt0.s | 3 | ||||
-rw-r--r-- | ports/ARM7-LPC214x/chcore.c | 5 | ||||
-rw-r--r-- | ports/ARM7-LPC214x/crt0.s | 3 |
4 files changed, 9 insertions, 5 deletions
diff --git a/ports/ARM7-AT91SAM7X/chcore.c b/ports/ARM7-AT91SAM7X/chcore.c index 053cc4831..af8bad20f 100644 --- a/ports/ARM7-AT91SAM7X/chcore.c +++ b/ports/ARM7-AT91SAM7X/chcore.c @@ -46,7 +46,8 @@ __attribute__((naked, weak)) void chSysHalt(void) {
#ifdef THUMB
- asm("b _halt16");
+ asm volatile ("ldr r0, =_halt16");
+ asm volatile ("bx r0");
#else
asm("b _halt32");
#endif
diff --git a/ports/ARM7-AT91SAM7X/crt0.s b/ports/ARM7-AT91SAM7X/crt0.s index 73f84319c..dcee3587c 100644 --- a/ports/ARM7-AT91SAM7X/crt0.s +++ b/ports/ARM7-AT91SAM7X/crt0.s @@ -32,7 +32,7 @@ .equ I_BIT, 0x80
.equ F_BIT, 0x40
-.text
+.section .startup
.code 32
.balign 4
/*
@@ -66,6 +66,7 @@ _fiq: /*
* Reset handler.
*/
+.text
ResetHandler:
/*
* Stack pointers initialization.
diff --git a/ports/ARM7-LPC214x/chcore.c b/ports/ARM7-LPC214x/chcore.c index fb627500b..8803c47e3 100644 --- a/ports/ARM7-LPC214x/chcore.c +++ b/ports/ARM7-LPC214x/chcore.c @@ -46,8 +46,9 @@ __attribute__((naked, weak)) void chSysHalt(void) {
#ifdef THUMB
- asm("b _halt16");
+ asm volatile ("ldr r0, =_halt16");
+ asm volatile ("bx r0");
#else
- asm("b _halt32");
+ asm volatile ("b _halt32");
#endif
}
diff --git a/ports/ARM7-LPC214x/crt0.s b/ports/ARM7-LPC214x/crt0.s index 3aea74abf..ca81adb55 100644 --- a/ports/ARM7-LPC214x/crt0.s +++ b/ports/ARM7-LPC214x/crt0.s @@ -32,7 +32,7 @@ .equ I_BIT, 0x80
.equ F_BIT, 0x40
-.text
+.section .startup
.code 32
.balign 4
/*
@@ -66,6 +66,7 @@ _fiq: /*
* Reset handler.
*/
+.text
ResetHandler:
/*
* Stack pointers initialization.
|