mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #2239 from pan-/fix_single_thread_rtos_test
Fix behavior when mbed-os RTOS tests are build while the system is singlet hreaded.pull/2230/head
commit
d2dbce0059
|
@ -2,6 +2,10 @@
|
||||||
#include "mbed.h"
|
#include "mbed.h"
|
||||||
#include "rtos.h"
|
#include "rtos.h"
|
||||||
|
|
||||||
|
#if defined(MBED_RTOS_SINGLE_THREAD)
|
||||||
|
#error [NOT_SUPPORTED] test not supported
|
||||||
|
#endif
|
||||||
|
|
||||||
DigitalOut led1(LED1);
|
DigitalOut led1(LED1);
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,10 @@
|
||||||
#include "greentea-client/test_env.h"
|
#include "greentea-client/test_env.h"
|
||||||
#include "rtos.h"
|
#include "rtos.h"
|
||||||
|
|
||||||
|
#if defined(MBED_RTOS_SINGLE_THREAD)
|
||||||
|
#error [NOT_SUPPORTED] test not supported
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The stack size is defined in cmsis_os.h mainly dependent on the underlying toolchain and
|
* The stack size is defined in cmsis_os.h mainly dependent on the underlying toolchain and
|
||||||
* the C standard library. For GCC, ARM_STD and IAR it is defined with a size of 2048 bytes
|
* the C standard library. For GCC, ARM_STD and IAR it is defined with a size of 2048 bytes
|
||||||
|
|
|
@ -2,6 +2,10 @@
|
||||||
#include "greentea-client/test_env.h"
|
#include "greentea-client/test_env.h"
|
||||||
#include "rtos.h"
|
#include "rtos.h"
|
||||||
|
|
||||||
|
#if defined(MBED_RTOS_SINGLE_THREAD)
|
||||||
|
#error [NOT_SUPPORTED] test not supported
|
||||||
|
#endif
|
||||||
|
|
||||||
#define QUEUE_SIZE 5
|
#define QUEUE_SIZE 5
|
||||||
#define THREAD_DELAY 250
|
#define THREAD_DELAY 250
|
||||||
#define QUEUE_PUT_ISR_VALUE 128
|
#define QUEUE_PUT_ISR_VALUE 128
|
||||||
|
|
|
@ -2,6 +2,10 @@
|
||||||
#include "greentea-client/test_env.h"
|
#include "greentea-client/test_env.h"
|
||||||
#include "rtos.h"
|
#include "rtos.h"
|
||||||
|
|
||||||
|
#if defined(MBED_RTOS_SINGLE_THREAD)
|
||||||
|
#error [NOT_SUPPORTED] test not supported
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
float voltage; /* AD result of measured voltage */
|
float voltage; /* AD result of measured voltage */
|
||||||
float current; /* AD result of measured current */
|
float current; /* AD result of measured current */
|
||||||
|
|
|
@ -2,6 +2,10 @@
|
||||||
#include "greentea-client/test_env.h"
|
#include "greentea-client/test_env.h"
|
||||||
#include "rtos.h"
|
#include "rtos.h"
|
||||||
|
|
||||||
|
#if defined(MBED_RTOS_SINGLE_THREAD)
|
||||||
|
#error [NOT_SUPPORTED] test not supported
|
||||||
|
#endif
|
||||||
|
|
||||||
#define THREAD_DELAY 50
|
#define THREAD_DELAY 50
|
||||||
#define SIGNALS_TO_EMIT 100
|
#define SIGNALS_TO_EMIT 100
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,10 @@
|
||||||
#include "greentea-client/test_env.h"
|
#include "greentea-client/test_env.h"
|
||||||
#include "rtos.h"
|
#include "rtos.h"
|
||||||
|
|
||||||
|
#if defined(MBED_RTOS_SINGLE_THREAD)
|
||||||
|
#error [NOT_SUPPORTED] test not supported
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
float voltage; /* AD result of measured voltage */
|
float voltage; /* AD result of measured voltage */
|
||||||
float current; /* AD result of measured current */
|
float current; /* AD result of measured current */
|
||||||
|
|
|
@ -2,6 +2,10 @@
|
||||||
#include "greentea-client/test_env.h"
|
#include "greentea-client/test_env.h"
|
||||||
#include "rtos.h"
|
#include "rtos.h"
|
||||||
|
|
||||||
|
#if defined(MBED_RTOS_SINGLE_THREAD)
|
||||||
|
#error [NOT_SUPPORTED] test not supported
|
||||||
|
#endif
|
||||||
|
|
||||||
#define THREAD_DELAY 75
|
#define THREAD_DELAY 75
|
||||||
#define SEMAPHORE_SLOTS 2
|
#define SEMAPHORE_SLOTS 2
|
||||||
#define SEM_CHANGES 100
|
#define SEM_CHANGES 100
|
||||||
|
|
|
@ -2,6 +2,10 @@
|
||||||
#include "greentea-client/test_env.h"
|
#include "greentea-client/test_env.h"
|
||||||
#include "rtos.h"
|
#include "rtos.h"
|
||||||
|
|
||||||
|
#if defined(MBED_RTOS_SINGLE_THREAD)
|
||||||
|
#error [NOT_SUPPORTED] test not supported
|
||||||
|
#endif
|
||||||
|
|
||||||
#define SIGNAL_SET_VALUE 0x01
|
#define SIGNAL_SET_VALUE 0x01
|
||||||
const int SIGNALS_TO_EMIT = 100;
|
const int SIGNALS_TO_EMIT = 100;
|
||||||
const int SIGNAL_HANDLE_DELEY = 25;
|
const int SIGNAL_HANDLE_DELEY = 25;
|
||||||
|
|
|
@ -6,6 +6,9 @@
|
||||||
#include "SynchronizedIntegral.h"
|
#include "SynchronizedIntegral.h"
|
||||||
#include "LockGuard.h"
|
#include "LockGuard.h"
|
||||||
|
|
||||||
|
#if defined(MBED_RTOS_SINGLE_THREAD)
|
||||||
|
#error [NOT_SUPPORTED] test not supported
|
||||||
|
#endif
|
||||||
|
|
||||||
using namespace utest::v1;
|
using namespace utest::v1;
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,10 @@
|
||||||
#include "greentea-client/test_env.h"
|
#include "greentea-client/test_env.h"
|
||||||
#include "rtos.h"
|
#include "rtos.h"
|
||||||
|
|
||||||
|
#if defined(MBED_RTOS_SINGLE_THREAD)
|
||||||
|
#error [NOT_SUPPORTED] test not supported
|
||||||
|
#endif
|
||||||
|
|
||||||
DigitalOut LEDs[4] = {
|
DigitalOut LEDs[4] = {
|
||||||
DigitalOut(LED1), DigitalOut(LED2), DigitalOut(LED3), DigitalOut(LED4)
|
DigitalOut(LED1), DigitalOut(LED2), DigitalOut(LED3), DigitalOut(LED4)
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue