Official mbed Real Time Operating System based on the RTX implementation of the CMSIS-RTOS API open standard.

Dependents:   denki-yohou_b TestY201 Network-RTOS NTPClient_HelloWorld ... more

Deprecated

This is the mbed 2 rtos library. mbed OS 5 integrates the mbed library with mbed-rtos. With this, we have provided thread safety for all mbed APIs. If you'd like to learn about using mbed OS 5, please see the docs.

Committer:
Kojto
Date:
Tue Jul 04 13:32:20 2017 +0100
Revision:
125:5713cbbdb706
replace mbed_rtx by mbed_rtx4

Not causing a conflict with mbed_rtx that is for newer rtos

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Kojto 125:5713cbbdb706 1 /* mbed Microcontroller Library
Kojto 125:5713cbbdb706 2 * Copyright (c) 2016 ARM Limited
Kojto 125:5713cbbdb706 3 *
Kojto 125:5713cbbdb706 4 * Licensed under the Apache License, Version 2.0 (the "License");
Kojto 125:5713cbbdb706 5 * you may not use this file except in compliance with the License.
Kojto 125:5713cbbdb706 6 * You may obtain a copy of the License at
Kojto 125:5713cbbdb706 7 *
Kojto 125:5713cbbdb706 8 * http://www.apache.org/licenses/LICENSE-2.0
Kojto 125:5713cbbdb706 9 *
Kojto 125:5713cbbdb706 10 * Unless required by applicable law or agreed to in writing, software
Kojto 125:5713cbbdb706 11 * distributed under the License is distributed on an "AS IS" BASIS,
Kojto 125:5713cbbdb706 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Kojto 125:5713cbbdb706 13 * See the License for the specific language governing permissions and
Kojto 125:5713cbbdb706 14 * limitations under the License.
Kojto 125:5713cbbdb706 15 */
Kojto 125:5713cbbdb706 16
Kojto 125:5713cbbdb706 17 #ifndef MBED_MBED_RTX_H
Kojto 125:5713cbbdb706 18 #define MBED_MBED_RTX_H
Kojto 125:5713cbbdb706 19
Kojto 125:5713cbbdb706 20 #include <stdint.h>
Kojto 125:5713cbbdb706 21
Kojto 125:5713cbbdb706 22 #if defined(TARGET_NUMAKER_PFM_NUC472)
Kojto 125:5713cbbdb706 23
Kojto 125:5713cbbdb706 24 // RTX 4 only config below, for backward-compability
Kojto 125:5713cbbdb706 25
Kojto 125:5713cbbdb706 26 #ifndef OS_TASKCNT
Kojto 125:5713cbbdb706 27 #define OS_TASKCNT 14
Kojto 125:5713cbbdb706 28 #endif
Kojto 125:5713cbbdb706 29 #ifndef OS_MAINSTKSIZE
Kojto 125:5713cbbdb706 30 #define OS_MAINSTKSIZE 256
Kojto 125:5713cbbdb706 31 #endif
Kojto 125:5713cbbdb706 32 #ifndef OS_CLOCK
Kojto 125:5713cbbdb706 33 #define OS_CLOCK 84000000
Kojto 125:5713cbbdb706 34 #endif
Kojto 125:5713cbbdb706 35
Kojto 125:5713cbbdb706 36 #if defined(__CC_ARM)
Kojto 125:5713cbbdb706 37 extern uint32_t Image$$ARM_LIB_HEAP$$ZI$$Base[];
Kojto 125:5713cbbdb706 38 extern uint32_t Image$$ARM_LIB_HEAP$$ZI$$Length[];
Kojto 125:5713cbbdb706 39 extern uint32_t Image$$ARM_LIB_STACK$$ZI$$Base[];
Kojto 125:5713cbbdb706 40 extern uint32_t Image$$ARM_LIB_STACK$$ZI$$Length[];
Kojto 125:5713cbbdb706 41 #define HEAP_START ((unsigned char*) Image$$ARM_LIB_HEAP$$ZI$$Base)
Kojto 125:5713cbbdb706 42 #define HEAP_SIZE ((uint32_t) Image$$ARM_LIB_HEAP$$ZI$$Length)
Kojto 125:5713cbbdb706 43 #define ISR_STACK_START ((unsigned char*)Image$$ARM_LIB_STACK$$ZI$$Base)
Kojto 125:5713cbbdb706 44 #define ISR_STACK_SIZE ((uint32_t)Image$$ARM_LIB_STACK$$ZI$$Length)
Kojto 125:5713cbbdb706 45 #elif defined(__GNUC__)
Kojto 125:5713cbbdb706 46 extern uint32_t __StackTop[];
Kojto 125:5713cbbdb706 47 extern uint32_t __StackLimit[];
Kojto 125:5713cbbdb706 48 extern uint32_t __end__[];
Kojto 125:5713cbbdb706 49 extern uint32_t __HeapLimit[];
Kojto 125:5713cbbdb706 50 #define HEAP_START ((unsigned char*)__end__)
Kojto 125:5713cbbdb706 51 #define HEAP_SIZE ((uint32_t)((uint32_t)__HeapLimit - (uint32_t)HEAP_START))
Kojto 125:5713cbbdb706 52 #define ISR_STACK_START ((unsigned char*)__StackLimit)
Kojto 125:5713cbbdb706 53 #define ISR_STACK_SIZE ((uint32_t)((uint32_t)__StackTop - (uint32_t)__StackLimit))
Kojto 125:5713cbbdb706 54 #elif defined(__ICCARM__)
Kojto 125:5713cbbdb706 55 /* No region declarations needed */
Kojto 125:5713cbbdb706 56 #else
Kojto 125:5713cbbdb706 57 #error "no toolchain defined"
Kojto 125:5713cbbdb706 58 #endif
Kojto 125:5713cbbdb706 59
Kojto 125:5713cbbdb706 60 #elif defined(TARGET_NUMAKER_PFM_M453)
Kojto 125:5713cbbdb706 61
Kojto 125:5713cbbdb706 62 // RTX 4 only config below, for backward-compability
Kojto 125:5713cbbdb706 63
Kojto 125:5713cbbdb706 64 #ifndef OS_TASKCNT
Kojto 125:5713cbbdb706 65 #define OS_TASKCNT 14
Kojto 125:5713cbbdb706 66 #endif
Kojto 125:5713cbbdb706 67 #ifndef OS_MAINSTKSIZE
Kojto 125:5713cbbdb706 68 #define OS_MAINSTKSIZE 256
Kojto 125:5713cbbdb706 69 #endif
Kojto 125:5713cbbdb706 70 #ifndef OS_CLOCK
Kojto 125:5713cbbdb706 71 #define OS_CLOCK 72000000
Kojto 125:5713cbbdb706 72 #endif
Kojto 125:5713cbbdb706 73
Kojto 125:5713cbbdb706 74 #if defined(__CC_ARM)
Kojto 125:5713cbbdb706 75 extern uint32_t Image$$ARM_LIB_HEAP$$ZI$$Base[];
Kojto 125:5713cbbdb706 76 extern uint32_t Image$$ARM_LIB_HEAP$$ZI$$Length[];
Kojto 125:5713cbbdb706 77 extern uint32_t Image$$ARM_LIB_STACK$$ZI$$Base[];
Kojto 125:5713cbbdb706 78 extern uint32_t Image$$ARM_LIB_STACK$$ZI$$Length[];
Kojto 125:5713cbbdb706 79 #define HEAP_START ((unsigned char*) Image$$ARM_LIB_HEAP$$ZI$$Base)
Kojto 125:5713cbbdb706 80 #define HEAP_SIZE ((uint32_t) Image$$ARM_LIB_HEAP$$ZI$$Length)
Kojto 125:5713cbbdb706 81 #define ISR_STACK_START ((unsigned char*)Image$$ARM_LIB_STACK$$ZI$$Base)
Kojto 125:5713cbbdb706 82 #define ISR_STACK_SIZE ((uint32_t)Image$$ARM_LIB_STACK$$ZI$$Length)
Kojto 125:5713cbbdb706 83 #elif defined(__GNUC__)
Kojto 125:5713cbbdb706 84 extern uint32_t __StackTop[];
Kojto 125:5713cbbdb706 85 extern uint32_t __StackLimit[];
Kojto 125:5713cbbdb706 86 extern uint32_t __end__[];
Kojto 125:5713cbbdb706 87 extern uint32_t __HeapLimit[];
Kojto 125:5713cbbdb706 88 #define HEAP_START ((unsigned char*)__end__)
Kojto 125:5713cbbdb706 89 #define HEAP_SIZE ((uint32_t)((uint32_t)__HeapLimit - (uint32_t)HEAP_START))
Kojto 125:5713cbbdb706 90 #define ISR_STACK_START ((unsigned char*)__StackLimit)
Kojto 125:5713cbbdb706 91 #define ISR_STACK_SIZE ((uint32_t)((uint32_t)__StackTop - (uint32_t)__StackLimit))
Kojto 125:5713cbbdb706 92 #elif defined(__ICCARM__)
Kojto 125:5713cbbdb706 93 /* No region declarations needed */
Kojto 125:5713cbbdb706 94 #else
Kojto 125:5713cbbdb706 95 #error "no toolchain defined"
Kojto 125:5713cbbdb706 96 #endif
Kojto 125:5713cbbdb706 97
Kojto 125:5713cbbdb706 98 #endif
Kojto 125:5713cbbdb706 99
Kojto 125:5713cbbdb706 100 #endif // MBED_MBED_RTX_H