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