mirror of https://github.com/ARMmbed/mbed-os.git
If a target is restricted to single threaded mode, fail compilation of the test as not supported
parent
6dd11c76e4
commit
a30fac1e1e
|
@ -1,6 +1,10 @@
|
||||||
#include "mbed.h"
|
#include "mbed.h"
|
||||||
#include "cmsis_os.h"
|
#include "cmsis_os.h"
|
||||||
|
|
||||||
|
#if defined(MBED_RTOS_SINGLE_THREAD)
|
||||||
|
#error [NOT_SUPPORTED] test not supported
|
||||||
|
#endif
|
||||||
|
|
||||||
DigitalOut led1(LED1);
|
DigitalOut led1(LED1);
|
||||||
DigitalOut led2(LED2);
|
DigitalOut led2(LED2);
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,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
|
||||||
|
|
||||||
Queue<uint32_t, 5> queue;
|
Queue<uint32_t, 5> queue;
|
||||||
|
|
||||||
DigitalOut myled(LED1);
|
DigitalOut myled(LED1);
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
#include "mbed.h"
|
#include "mbed.h"
|
||||||
#include "cmsis_os.h"
|
#include "cmsis_os.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 */
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
#include "mbed.h"
|
#include "mbed.h"
|
||||||
#include "cmsis_os.h"
|
#include "cmsis_os.h"
|
||||||
|
|
||||||
|
#if defined(MBED_RTOS_SINGLE_THREAD)
|
||||||
|
#error [NOT_SUPPORTED] test not supported
|
||||||
|
#endif
|
||||||
|
|
||||||
osMutexId stdio_mutex;
|
osMutexId stdio_mutex;
|
||||||
osMutexDef(stdio_mutex);
|
osMutexDef(stdio_mutex);
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
#include "mbed.h"
|
#include "mbed.h"
|
||||||
#include "cmsis_os.h"
|
#include "cmsis_os.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 */
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
#include "mbed.h"
|
#include "mbed.h"
|
||||||
#include "cmsis_os.h"
|
#include "cmsis_os.h"
|
||||||
|
|
||||||
|
#if defined(MBED_RTOS_SINGLE_THREAD)
|
||||||
|
#error [NOT_SUPPORTED] test not supported
|
||||||
|
#endif
|
||||||
|
|
||||||
osSemaphoreId two_slots;
|
osSemaphoreId two_slots;
|
||||||
osSemaphoreDef(two_slots);
|
osSemaphoreDef(two_slots);
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
#include "mbed.h"
|
#include "mbed.h"
|
||||||
#include "cmsis_os.h"
|
#include "cmsis_os.h"
|
||||||
|
|
||||||
|
#if defined(MBED_RTOS_SINGLE_THREAD)
|
||||||
|
#error [NOT_SUPPORTED] test not supported
|
||||||
|
#endif
|
||||||
|
|
||||||
DigitalOut led(LED1);
|
DigitalOut led(LED1);
|
||||||
|
|
||||||
void led_thread(void const *argument) {
|
void led_thread(void const *argument) {
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
#include "mbed.h"
|
#include "mbed.h"
|
||||||
#include "cmsis_os.h"
|
#include "cmsis_os.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)
|
||||||
};
|
};
|
||||||
|
|
|
@ -2,6 +2,10 @@
|
||||||
#include "test_env.h"
|
#include "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
|
||||||
|
|
|
@ -3,6 +3,10 @@
|
||||||
#include "test_env.h"
|
#include "test_env.h"
|
||||||
#include "rtos.h"
|
#include "rtos.h"
|
||||||
|
|
||||||
|
#if defined(MBED_RTOS_SINGLE_THREAD)
|
||||||
|
#error [NOT_SUPPORTED] test not supported
|
||||||
|
#endif
|
||||||
|
|
||||||
DigitalOut led2(LED2);
|
DigitalOut led2(LED2);
|
||||||
|
|
||||||
#define SIZE 100
|
#define SIZE 100
|
||||||
|
|
|
@ -2,6 +2,10 @@
|
||||||
#include "test_env.h"
|
#include "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 "test_env.h"
|
#include "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 "test_env.h"
|
#include "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 "test_env.h"
|
#include "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 "test_env.h"
|
#include "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 "test_env.h"
|
#include "test_env.h"
|
||||||
#include "rtos.h"
|
#include "rtos.h"
|
||||||
|
|
||||||
|
#if defined(MBED_RTOS_SINGLE_THREAD)
|
||||||
|
#error [NOT_SUPPORTED] test not supported
|
||||||
|
#endif
|
||||||
|
|
||||||
#define SIGNALS_TO_EMIT 100
|
#define SIGNALS_TO_EMIT 100
|
||||||
#define SIGNAL_HANDLE_DELEY 25
|
#define SIGNAL_HANDLE_DELEY 25
|
||||||
#define SIGNAL_SET_VALUE 0x01
|
#define SIGNAL_SET_VALUE 0x01
|
||||||
|
|
|
@ -2,6 +2,10 @@
|
||||||
#include "test_env.h"
|
#include "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