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