From f2ee56661c6dbdb3b797d8f3df43137bdd20ec39 Mon Sep 17 00:00:00 2001 From: inmarket Date: Wed, 8 Jul 2015 09:53:16 +1000 Subject: Alternate Raw32 scheduler. Works for main thread + one other thread. Currently fails with 2 other threads. STM32M4 code tested and working. --- src/gos/gos_raw32.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/gos/gos_raw32.h') diff --git a/src/gos/gos_raw32.h b/src/gos/gos_raw32.h index a37b78ff..0661bd37 100644 --- a/src/gos/gos_raw32.h +++ b/src/gos/gos_raw32.h @@ -37,6 +37,25 @@ #define GOS_RAW_HEAP_SIZE 0 #endif +/** + * @brief Scheduler cpu support + */ +#define SCHED_USE_SETJMP 0 +#define SCHED_USE_CORTEX_M0 1 +#define SCHED_USE_CORTEX_M1 2 +#define SCHED_USE_CORTEX_M2 3 +#define SCHED_USE_CORTEX_M3 4 +#define SCHED_USE_CORTEX_M4 5 + +/** + * @brief Set the preferred scheduler method + * @note If not defined the SCHED_USE_SETJMP is used which should work for most platforms. + */ +#ifndef GOS_RAW_SCHEDULER + #define GOS_RAW_SCHEDULER SCHED_USE_SETJMP +#endif + + /*===========================================================================*/ /* Type definitions */ /*===========================================================================*/ -- cgit v1.2.3