git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@205 35acf78f-673a-0410-8e92-d51de3d6d3f4

This commit is contained in:
gdisirio 2008-02-25 16:29:25 +00:00
parent ef79349ec1
commit a40f3424bd
3 changed files with 9 additions and 9 deletions

View File

@ -94,6 +94,8 @@ extern void chSysUnlock(void);
#define WorkingArea(s, n) ULONG32 s[UserStackSize(n) >> 2]; #define WorkingArea(s, n) ULONG32 s[UserStackSize(n) >> 2];
#ifdef THUMB #ifdef THUMB
#define chSysSwitchI chSysSwitchI_thumb
#define chSysIRQEnterI() { \ #define chSysIRQEnterI() { \
asm(".code 32 \n\t" \ asm(".code 32 \n\t" \
"stmfd sp!, {r0-r3, r12, lr} \n\t" \ "stmfd sp!, {r0-r3, r12, lr} \n\t" \
@ -107,6 +109,8 @@ extern void chSysUnlock(void);
"bx r0 \n\t"); \ "bx r0 \n\t"); \
} }
#else /* !THUMB */ #else /* !THUMB */
#define chSysSwitchI chSysSwitchI_arm
#define chSysIRQEnterI() { \ #define chSysIRQEnterI() { \
asm("stmfd sp!, {r0-r3, r12, lr} \n\t"); \ asm("stmfd sp!, {r0-r3, r12, lr} \n\t"); \
} }
@ -116,10 +120,6 @@ extern void chSysUnlock(void);
} }
#endif /* !THUMB */ #endif /* !THUMB */
#ifdef THUMB
#define chSysSwitchI chSysSwitchI_thumb
#endif /* THUMB */
/* It requires zero bytes, but better be safe.*/ /* It requires zero bytes, but better be safe.*/
#define IDLE_THREAD_STACK_SIZE 8 #define IDLE_THREAD_STACK_SIZE 8
void _IdleThread(void *p) __attribute__((noreturn)); void _IdleThread(void *p) __attribute__((noreturn));

View File

@ -75,8 +75,8 @@ chSysSwitchI_thumb:
// Jumps into chSysSwitchI in ARM mode // Jumps into chSysSwitchI in ARM mode
#endif #endif
.code 32 .code 32
.global chSysSwitchI .global chSysSwitchI_arm
chSysSwitchI: chSysSwitchI_arm:
#ifdef CH_CURRP_REGISTER_CACHE #ifdef CH_CURRP_REGISTER_CACHE
stmfd sp!, {r4, r5, r6, r8, r9, r10, r11, lr} stmfd sp!, {r4, r5, r6, r8, r9, r10, r11, lr}
str sp, [r0, #16] str sp, [r0, #16]
@ -112,8 +112,8 @@ chSysSwitchI:
* | R2 | | External context: IRQ handler frame * | R2 | | External context: IRQ handler frame
* | R1 | | * | R1 | |
* | R0 | | * | R0 | |
* | LR_IRQ | | (user code return address) * | PC | | (user code return address)
* | SPSR | -+ (user code status) * | PSR_USR | -+ (user code status)
* | .... | <- mk_DoRescheduleI() stack frame, optimize it for space * | .... | <- mk_DoRescheduleI() stack frame, optimize it for space
* | LR | -+ (system code return address) * | LR | -+ (system code return address)
* | R11 | | * | R11 | |

View File

@ -102,7 +102,7 @@ AVR-AT90CANx-GCC - Port on AVR AT90CAN128, not complete yet.
behavior). behavior).
Note: This option brings a small overhead when sending a message regardless 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 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 - Added to the ARM demos load scripts the capability to load code in RAM
instead flash, the function must be marked as: instead flash, the function must be marked as:
__attribute__((section(".ramtext"))) __attribute__((section(".ramtext")))