aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2008-02-25 16:29:25 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2008-02-25 16:29:25 +0000
commita40f3424bd4c24f28f43746af79eafdc3faf76ce (patch)
tree2ad473287753337ae12ffb96020cfefb60d4e1b6
parentef79349ec13b036003e78c8b7585f9b4808efa63 (diff)
downloadChibiOS-a40f3424bd4c24f28f43746af79eafdc3faf76ce.tar.gz
ChibiOS-a40f3424bd4c24f28f43746af79eafdc3faf76ce.tar.bz2
ChibiOS-a40f3424bd4c24f28f43746af79eafdc3faf76ce.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@205 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r--ports/ARM7/chcore.h8
-rw-r--r--ports/ARM7/chsys.s8
-rw-r--r--readme.txt2
3 files changed, 9 insertions, 9 deletions
diff --git a/ports/ARM7/chcore.h b/ports/ARM7/chcore.h
index 2917428f3..d03d6aaba 100644
--- a/ports/ARM7/chcore.h
+++ b/ports/ARM7/chcore.h
@@ -94,6 +94,8 @@ extern void chSysUnlock(void);
#define WorkingArea(s, n) ULONG32 s[UserStackSize(n) >> 2];
#ifdef THUMB
+#define chSysSwitchI chSysSwitchI_thumb
+
#define chSysIRQEnterI() { \
asm(".code 32 \n\t" \
"stmfd sp!, {r0-r3, r12, lr} \n\t" \
@@ -107,6 +109,8 @@ extern void chSysUnlock(void);
"bx r0 \n\t"); \
}
#else /* !THUMB */
+#define chSysSwitchI chSysSwitchI_arm
+
#define chSysIRQEnterI() { \
asm("stmfd sp!, {r0-r3, r12, lr} \n\t"); \
}
@@ -116,10 +120,6 @@ extern void chSysUnlock(void);
}
#endif /* !THUMB */
-#ifdef THUMB
-#define chSysSwitchI chSysSwitchI_thumb
-#endif /* THUMB */
-
/* It requires zero bytes, but better be safe.*/
#define IDLE_THREAD_STACK_SIZE 8
void _IdleThread(void *p) __attribute__((noreturn));
diff --git a/ports/ARM7/chsys.s b/ports/ARM7/chsys.s
index 770edaaec..d1de7d100 100644
--- a/ports/ARM7/chsys.s
+++ b/ports/ARM7/chsys.s
@@ -75,8 +75,8 @@ chSysSwitchI_thumb:
// Jumps into chSysSwitchI in ARM mode
#endif
.code 32
-.global chSysSwitchI
-chSysSwitchI:
+.global chSysSwitchI_arm
+chSysSwitchI_arm:
#ifdef CH_CURRP_REGISTER_CACHE
stmfd sp!, {r4, r5, r6, r8, r9, r10, r11, lr}
str sp, [r0, #16]
@@ -112,8 +112,8 @@ chSysSwitchI:
* | R2 | | External context: IRQ handler frame
* | R1 | |
* | R0 | |
- * | LR_IRQ | | (user code return address)
- * | SPSR | -+ (user code status)
+ * | PC | | (user code return address)
+ * | PSR_USR | -+ (user code status)
* | .... | <- mk_DoRescheduleI() stack frame, optimize it for space
* | LR | -+ (system code return address)
* | R11 | |
diff --git a/readme.txt b/readme.txt
index 8d15bd76d..3c437155a 100644
--- a/readme.txt
+++ b/readme.txt
@@ -102,7 +102,7 @@ AVR-AT90CANx-GCC - Port on AVR AT90CAN128, not complete yet.
behavior).
Note: This option brings a small overhead when sending a message regardless
if in FIFO or priority order, if you dont need priority ordering for your
- messages it is better to keep disabled the feature in chconf.h.
+ messages it is better to keep the feature disabled in chconf.h.
- Added to the ARM demos load scripts the capability to load code in RAM
instead flash, the function must be marked as:
__attribute__((section(".ramtext")))