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