git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@116 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
a134cd919e
commit
b74cb5bc1a
|
@ -71,13 +71,13 @@ typedef struct {
|
||||||
/*
|
/*
|
||||||
* Platform dependent part of the \p chThdCreate() API.
|
* Platform dependent part of the \p chThdCreate() API.
|
||||||
*/
|
*/
|
||||||
#define SETUP_CONTEXT(workspace, wsize, pf, arg) { \
|
#define SETUP_CONTEXT(workspace, wsize, pf, arg) { \
|
||||||
tp->p_ctx.r13 = (struct intctx *)((BYTE8 *)workspace + \
|
tp->p_ctx.r13 = (struct intctx *)((BYTE8 *)workspace + \
|
||||||
wsize - \
|
wsize - \
|
||||||
sizeof(struct intctx)); \
|
sizeof(struct intctx)); \
|
||||||
tp->p_ctx.r13->r4 = pf; \
|
tp->p_ctx.r13->r4 = pf; \
|
||||||
tp->p_ctx.r13->r5 = arg; \
|
tp->p_ctx.r13->r5 = arg; \
|
||||||
tp->p_ctx.r13->lr = threadstart; \
|
tp->p_ctx.r13->lr = threadstart; \
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef THUMB
|
#ifdef THUMB
|
||||||
|
@ -88,19 +88,16 @@ extern void chSysUnlock(void);
|
||||||
#define chSysUnlock() asm("msr CPSR_c, #0x1F")
|
#define chSysUnlock() asm("msr CPSR_c, #0x1F")
|
||||||
#endif /* THUMB */
|
#endif /* THUMB */
|
||||||
|
|
||||||
#define chSysPuts(msg) {}
|
|
||||||
|
|
||||||
#ifdef THUMB
|
#ifdef THUMB
|
||||||
#define INT_REQUIRED_STACK 0x10
|
#define INT_REQUIRED_STACK 0x10
|
||||||
#else /* !THUMB */
|
#else /* !THUMB */
|
||||||
#define INT_REQUIRED_STACK 0
|
#define INT_REQUIRED_STACK 0
|
||||||
#endif /* THUMB */
|
#endif /* THUMB */
|
||||||
#define UserStackSize(n) (((sizeof(Thread) + \
|
#define StackAlign(n) ((((n) - 1) | 3) + 1)
|
||||||
sizeof(struct intctx) + \
|
#define UserStackSize(n) StackAlign(sizeof(Thread) + \
|
||||||
sizeof(struct extctx) + \
|
sizeof(struct intctx) + \
|
||||||
(INT_REQUIRED_STACK) + \
|
sizeof(struct extctx) + \
|
||||||
(n) - 1) | 3) + 1)
|
(n) + (INT_REQUIRED_STACK))
|
||||||
|
|
||||||
#define WorkingArea(s, n) ULONG32 s[UserStackSize(n) >> 2];
|
#define WorkingArea(s, n) ULONG32 s[UserStackSize(n) >> 2];
|
||||||
|
|
||||||
/* It requires zero bytes, but better be safe.*/
|
/* It requires zero bytes, but better be safe.*/
|
||||||
|
@ -109,6 +106,7 @@ void _IdleThread(void *p) __attribute__((noreturn));
|
||||||
|
|
||||||
void chSysHalt(void) __attribute__((noreturn));
|
void chSysHalt(void) __attribute__((noreturn));
|
||||||
void chSysSwitchI(Context *oldp, Context *newp);
|
void chSysSwitchI(Context *oldp, Context *newp);
|
||||||
|
void chSysPuts(char *msg);
|
||||||
void threadstart(void);
|
void threadstart(void);
|
||||||
void DefFiqHandler(void);
|
void DefFiqHandler(void);
|
||||||
void DefIrqHandler(void);
|
void DefIrqHandler(void);
|
||||||
|
|
|
@ -160,11 +160,11 @@
|
||||||
* @note the debug support is port-dependent, it may be not present on some
|
* @note the debug support is port-dependent, it may be not present on some
|
||||||
* targets. In that case stub functions will be included.
|
* targets. In that case stub functions will be included.
|
||||||
*/
|
*/
|
||||||
#define CH_USE_DEBUG
|
//#define CH_USE_DEBUG
|
||||||
|
|
||||||
/** Debug option: Includes the threads context switch tracing feature.
|
/** Debug option: Includes the threads context switch tracing feature.
|
||||||
*/
|
*/
|
||||||
#define CH_USE_TRACE
|
//#define CH_USE_TRACE
|
||||||
|
|
||||||
#endif /* _CHCONF_H_ */
|
#endif /* _CHCONF_H_ */
|
||||||
|
|
||||||
|
|
|
@ -166,7 +166,7 @@ void chSysHalt(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* System console message (implemented via JTAG).
|
* System console message (not implemented).
|
||||||
*/
|
*/
|
||||||
void chSysPuts(char *msg) {
|
void chSysPuts(char *msg) {
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue