Daoyu_Sofiane Yao_Belouka / mbed-rtos

Dependents:   Mecatro_Gyro_Programme_Codeur_HC06

Committer:
daoyu_sofiane
Date:
Fri Apr 16 09:25:33 2021 +0000
Revision:
0:a8ed743bc1e1
Projet Gyropode

Who changed what in which revision?

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