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