git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@798 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
3139ee3c53
commit
73a6c86af1
|
@ -80,7 +80,7 @@ static const seqop_t LED3_sequence[] =
|
|||
* Any sequencer is just an instance of this class, all the details are
|
||||
* totally encapsulated and hidden to the application level.
|
||||
*/
|
||||
class SequencerThread : EnhancedThread<64> {
|
||||
class SequencerThread : EnhancedThread<128> {
|
||||
private:
|
||||
const seqop_t *base, *curr; // Thread local variables.
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
/*
|
||||
* Red LEDs blinker thread, times are in milliseconds.
|
||||
*/
|
||||
static WORKING_AREA(waThread1, 64);
|
||||
static WORKING_AREA(waThread1, 128);
|
||||
static msg_t Thread1(void *arg) {
|
||||
|
||||
while (TRUE) {
|
||||
|
@ -43,7 +43,7 @@ static msg_t Thread1(void *arg) {
|
|||
/*
|
||||
* Yellow LED blinker thread, times are in milliseconds.
|
||||
*/
|
||||
static WORKING_AREA(waThread2, 64);
|
||||
static WORKING_AREA(waThread2, 128);
|
||||
static msg_t Thread2(void *arg) {
|
||||
|
||||
while (TRUE) {
|
||||
|
|
|
@ -368,7 +368,7 @@
|
|||
* may not be implemented at all.
|
||||
*/
|
||||
#if !defined(CH_DBG_ENABLE_STACK_CHECK) || defined(__DOXYGEN__)
|
||||
#define CH_DBG_ENABLE_STACK_CHECK FALSE
|
||||
#define CH_DBG_ENABLE_STACK_CHECK TRUE
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
@ -376,7 +376,7 @@
|
|||
* pattern when a thread is created.
|
||||
*/
|
||||
#if !defined(CH_DBG_FILL_THREADS) || defined(__DOXYGEN__)
|
||||
#define CH_DBG_FILL_THREADS FALSE
|
||||
#define CH_DBG_FILL_THREADS TRUE
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
/*
|
||||
* Red LEDs blinker thread, times are in milliseconds.
|
||||
*/
|
||||
static WORKING_AREA(waThread1, 64);
|
||||
static WORKING_AREA(waThread1, 128);
|
||||
static msg_t Thread1(void *arg) {
|
||||
|
||||
while (TRUE) {
|
||||
|
@ -48,7 +48,7 @@ static msg_t Thread1(void *arg) {
|
|||
/*
|
||||
* Yellow LED blinker thread, times are in milliseconds.
|
||||
*/
|
||||
static WORKING_AREA(waThread2, 64);
|
||||
static WORKING_AREA(waThread2, 128);
|
||||
static msg_t Thread2(void *arg) {
|
||||
|
||||
while (TRUE) {
|
||||
|
|
|
@ -277,9 +277,34 @@ struct context {
|
|||
* @param ntp the thread to be switched in
|
||||
*/
|
||||
#ifdef THUMB
|
||||
#if CH_DBG_ENABLE_STACK_CHECK
|
||||
#define port_switch(otp, ntp) { \
|
||||
register Thread *_otp asm ("r0") = (otp); \
|
||||
register Thread *_ntp asm ("r1") = (ntp); \
|
||||
register char *sp asm ("sp"); \
|
||||
if (sp - sizeof(struct intctx) - sizeof(Thread) < (char *)_otp) \
|
||||
asm volatile ("mov r0, #0 \n\t" \
|
||||
"ldr r1, =chDbgPanic \n\t" \
|
||||
"bx r1"); \
|
||||
_port_switch_thumb(_otp, _ntp); \
|
||||
}
|
||||
#else /* !CH_DBG_ENABLE_STACK_CHECK */
|
||||
#define port_switch(otp, ntp) _port_switch_thumb(otp, ntp)
|
||||
#endif /* !CH_DBG_ENABLE_STACK_CHECK */
|
||||
#else /* !THUMB */
|
||||
#if CH_DBG_ENABLE_STACK_CHECK
|
||||
#define port_switch(otp, ntp) { \
|
||||
register Thread *_otp asm ("r0") = (otp); \
|
||||
register Thread *_ntp asm ("r1") = (ntp); \
|
||||
register char *sp asm ("sp"); \
|
||||
if (sp - sizeof(struct intctx) - sizeof(Thread) < (char *)_otp) \
|
||||
asm volatile ("mov r0, #0 \n\t" \
|
||||
"b chDbgPanic"); \
|
||||
_port_switch_arm(_otp, _ntp); \
|
||||
}
|
||||
#else /* !CH_DBG_ENABLE_STACK_CHECK */
|
||||
#define port_switch(otp, ntp) _port_switch_arm(otp, ntp)
|
||||
#endif /* !CH_DBG_ENABLE_STACK_CHECK */
|
||||
#endif /* !THUMB */
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -91,7 +91,7 @@ Win32-MinGW - ChibiOS/RT simulator and demo into a WIN32 process,
|
|||
is not used into the kernel, it is meant for debugging.
|
||||
- NEW: Added a debug option CH_DBG_ENABLE_STACK_CHECK for stack overflow
|
||||
checking. The check is not performed in the kernel but in the port code.
|
||||
Currently no port implements it.
|
||||
Currently only the ARM7 and ARMCM3 ports implements it.
|
||||
- NEW: Unified makefiles for ARM7 and ARMCM3 projects, the new makefiles
|
||||
share a common part making them easier to maintain. Also reorganized the
|
||||
demo-specific part of the makefile, now it is easier to configure and the
|
||||
|
|
Loading…
Reference in New Issue