Initial commit
mbed-dev-master/targets/TARGET_STM/mbed_rtx.h@0:bb348c97df44, 2020-09-16 (annotated)
- Committer:
- lypinator
- Date:
- Wed Sep 16 01:11:49 2020 +0000
- Revision:
- 0:bb348c97df44
Added PWM
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
lypinator | 0:bb348c97df44 | 1 | /* mbed Microcontroller Library |
lypinator | 0:bb348c97df44 | 2 | * Copyright (c) 2017 ARM Limited |
lypinator | 0:bb348c97df44 | 3 | * |
lypinator | 0:bb348c97df44 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
lypinator | 0:bb348c97df44 | 5 | * you may not use this file except in compliance with the License. |
lypinator | 0:bb348c97df44 | 6 | * You may obtain a copy of the License at |
lypinator | 0:bb348c97df44 | 7 | * |
lypinator | 0:bb348c97df44 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
lypinator | 0:bb348c97df44 | 9 | * |
lypinator | 0:bb348c97df44 | 10 | * Unless required by applicable law or agreed to in writing, software |
lypinator | 0:bb348c97df44 | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
lypinator | 0:bb348c97df44 | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
lypinator | 0:bb348c97df44 | 13 | * See the License for the specific language governing permissions and |
lypinator | 0:bb348c97df44 | 14 | * limitations under the License. |
lypinator | 0:bb348c97df44 | 15 | */ |
lypinator | 0:bb348c97df44 | 16 | |
lypinator | 0:bb348c97df44 | 17 | #ifndef MBED_MBED_RTX_H |
lypinator | 0:bb348c97df44 | 18 | #define MBED_MBED_RTX_H |
lypinator | 0:bb348c97df44 | 19 | |
lypinator | 0:bb348c97df44 | 20 | #include <stdint.h> |
lypinator | 0:bb348c97df44 | 21 | |
lypinator | 0:bb348c97df44 | 22 | #ifndef INITIAL_SP |
lypinator | 0:bb348c97df44 | 23 | |
lypinator | 0:bb348c97df44 | 24 | #if (defined(TARGET_STM32L475VG) ||\ |
lypinator | 0:bb348c97df44 | 25 | defined(TARGET_STM32L476RG) ||\ |
lypinator | 0:bb348c97df44 | 26 | defined(TARGET_STM32L476JG) ||\ |
lypinator | 0:bb348c97df44 | 27 | defined(TARGET_STM32L476VG) ||\ |
lypinator | 0:bb348c97df44 | 28 | defined(TARGET_STM32L486RG)) |
lypinator | 0:bb348c97df44 | 29 | /* only GCC_ARM and IAR toolchains have the stack on SRAM2 */ |
lypinator | 0:bb348c97df44 | 30 | #if (((defined(__GNUC__) && !defined(__CC_ARM)) ||\ |
lypinator | 0:bb348c97df44 | 31 | defined(__IAR_SYSTEMS_ICC__ )) &&\ |
lypinator | 0:bb348c97df44 | 32 | defined(TWO_RAM_REGIONS)) |
lypinator | 0:bb348c97df44 | 33 | #define INITIAL_SP (0x10008000UL) |
lypinator | 0:bb348c97df44 | 34 | #else |
lypinator | 0:bb348c97df44 | 35 | #define INITIAL_SP (0x20018000UL) |
lypinator | 0:bb348c97df44 | 36 | #endif /* toolchains */ |
lypinator | 0:bb348c97df44 | 37 | |
lypinator | 0:bb348c97df44 | 38 | #elif (defined(TARGET_STM32F051R8) ||\ |
lypinator | 0:bb348c97df44 | 39 | defined(TARGET_STM32F100RB) ||\ |
lypinator | 0:bb348c97df44 | 40 | defined(TARGET_STM32L031K6) ||\ |
lypinator | 0:bb348c97df44 | 41 | defined(TARGET_STM32L053C8) ||\ |
lypinator | 0:bb348c97df44 | 42 | defined(TARGET_STM32L053R8)) |
lypinator | 0:bb348c97df44 | 43 | #define INITIAL_SP (0x20002000UL) |
lypinator | 0:bb348c97df44 | 44 | |
lypinator | 0:bb348c97df44 | 45 | #elif (defined(TARGET_STM32F303K8) ||\ |
lypinator | 0:bb348c97df44 | 46 | defined(TARGET_STM32F334C8) ||\ |
lypinator | 0:bb348c97df44 | 47 | defined(TARGET_STM32F334R8)) |
lypinator | 0:bb348c97df44 | 48 | #define INITIAL_SP (0x20003000UL) |
lypinator | 0:bb348c97df44 | 49 | |
lypinator | 0:bb348c97df44 | 50 | #elif (defined(TARGET_STM32F070RB) ||\ |
lypinator | 0:bb348c97df44 | 51 | defined(TARGET_STM32F072RB) ||\ |
lypinator | 0:bb348c97df44 | 52 | defined(TARGET_STM32F302R8)) |
lypinator | 0:bb348c97df44 | 53 | #define INITIAL_SP (0x20004000UL) |
lypinator | 0:bb348c97df44 | 54 | |
lypinator | 0:bb348c97df44 | 55 | #elif (defined(TARGET_STM32F103RB) ||\ |
lypinator | 0:bb348c97df44 | 56 | defined(TARGET_STM32F103C8) ||\ |
lypinator | 0:bb348c97df44 | 57 | defined(TARGET_STM32L072CZ) ||\ |
lypinator | 0:bb348c97df44 | 58 | defined(TARGET_STM32L073RZ) ||\ |
lypinator | 0:bb348c97df44 | 59 | defined(TARGET_STM32L0x2xZ)) |
lypinator | 0:bb348c97df44 | 60 | #define INITIAL_SP (0x20005000UL) |
lypinator | 0:bb348c97df44 | 61 | |
lypinator | 0:bb348c97df44 | 62 | #elif (defined(TARGET_STM32F091RC) ||\ |
lypinator | 0:bb348c97df44 | 63 | defined(TARGET_STM32F410RB) ||\ |
lypinator | 0:bb348c97df44 | 64 | defined(TARGET_STM32L151CBA)||\ |
lypinator | 0:bb348c97df44 | 65 | defined(TARGET_STM32L151CC) ||\ |
lypinator | 0:bb348c97df44 | 66 | defined(TARGET_STM32L151RC) ||\ |
lypinator | 0:bb348c97df44 | 67 | defined(TARGET_STM32L152RC)) |
lypinator | 0:bb348c97df44 | 68 | #define INITIAL_SP (0x20008000UL) |
lypinator | 0:bb348c97df44 | 69 | |
lypinator | 0:bb348c97df44 | 70 | #elif defined(TARGET_STM32F303VC) |
lypinator | 0:bb348c97df44 | 71 | #define INITIAL_SP (0x2000A000UL) |
lypinator | 0:bb348c97df44 | 72 | |
lypinator | 0:bb348c97df44 | 73 | #elif defined(TARGET_STM32L443RC) |
lypinator | 0:bb348c97df44 | 74 | #define INITIAL_SP (0x2000C000UL) |
lypinator | 0:bb348c97df44 | 75 | |
lypinator | 0:bb348c97df44 | 76 | #elif defined(TARGET_STM32L432KC) ||\ |
lypinator | 0:bb348c97df44 | 77 | defined (TARGET_STM32L433RC) |
lypinator | 0:bb348c97df44 | 78 | #define INITIAL_SP (0x20010000UL) |
lypinator | 0:bb348c97df44 | 79 | |
lypinator | 0:bb348c97df44 | 80 | #elif (defined(TARGET_STM32F303RE) ||\ |
lypinator | 0:bb348c97df44 | 81 | defined(TARGET_STM32F303ZE) ||\ |
lypinator | 0:bb348c97df44 | 82 | defined(TARGET_STM32F401VC)) |
lypinator | 0:bb348c97df44 | 83 | #define INITIAL_SP (0x20010000UL) |
lypinator | 0:bb348c97df44 | 84 | |
lypinator | 0:bb348c97df44 | 85 | #elif defined(TARGET_STM32L152RE) |
lypinator | 0:bb348c97df44 | 86 | #define INITIAL_SP (0x20014000UL) |
lypinator | 0:bb348c97df44 | 87 | |
lypinator | 0:bb348c97df44 | 88 | #elif (defined(TARGET_STM32F401RE) ||\ |
lypinator | 0:bb348c97df44 | 89 | defined(TARGET_STM32F401VE)) |
lypinator | 0:bb348c97df44 | 90 | #define INITIAL_SP (0x20018000UL) |
lypinator | 0:bb348c97df44 | 91 | |
lypinator | 0:bb348c97df44 | 92 | #elif (defined(TARGET_STM32F207ZG) ||\ |
lypinator | 0:bb348c97df44 | 93 | defined(TARGET_STM32F405RG) ||\ |
lypinator | 0:bb348c97df44 | 94 | defined(TARGET_STM32F407VG) ||\ |
lypinator | 0:bb348c97df44 | 95 | defined(TARGET_STM32F411RE) ||\ |
lypinator | 0:bb348c97df44 | 96 | defined(TARGET_STM32F446RE) ||\ |
lypinator | 0:bb348c97df44 | 97 | defined(TARGET_STM32F446VE) ||\ |
lypinator | 0:bb348c97df44 | 98 | defined(TARGET_STM32F446ZE)) |
lypinator | 0:bb348c97df44 | 99 | #define INITIAL_SP (0x20020000UL) |
lypinator | 0:bb348c97df44 | 100 | |
lypinator | 0:bb348c97df44 | 101 | #elif (defined(TARGET_STM32F429ZI) ||\ |
lypinator | 0:bb348c97df44 | 102 | defined(TARGET_STM32F437VG) ||\ |
lypinator | 0:bb348c97df44 | 103 | defined(TARGET_STM32F439VI) ||\ |
lypinator | 0:bb348c97df44 | 104 | defined(TARGET_STM32F439ZI)) |
lypinator | 0:bb348c97df44 | 105 | #define INITIAL_SP (0x20030000UL) |
lypinator | 0:bb348c97df44 | 106 | |
lypinator | 0:bb348c97df44 | 107 | #elif defined(TARGET_STM32F412ZG) |
lypinator | 0:bb348c97df44 | 108 | #define INITIAL_SP (0x20040000UL) |
lypinator | 0:bb348c97df44 | 109 | |
lypinator | 0:bb348c97df44 | 110 | #elif (defined(TARGET_STM32F413ZH) ||\ |
lypinator | 0:bb348c97df44 | 111 | defined(TARGET_STM32F469NI) ||\ |
lypinator | 0:bb348c97df44 | 112 | defined(TARGET_STM32F746NG) ||\ |
lypinator | 0:bb348c97df44 | 113 | defined(TARGET_STM32F746ZG) ||\ |
lypinator | 0:bb348c97df44 | 114 | defined(TARGET_STM32F756ZG) ||\ |
lypinator | 0:bb348c97df44 | 115 | defined(TARGET_STM32L496AG) ||\ |
lypinator | 0:bb348c97df44 | 116 | defined(TARGET_STM32L496ZG)) |
lypinator | 0:bb348c97df44 | 117 | #define INITIAL_SP (0x20050000UL) |
lypinator | 0:bb348c97df44 | 118 | |
lypinator | 0:bb348c97df44 | 119 | #elif (defined(TARGET_STM32F767ZI) ||\ |
lypinator | 0:bb348c97df44 | 120 | defined(TARGET_STM32F769NI)) |
lypinator | 0:bb348c97df44 | 121 | #define INITIAL_SP (0x20080000UL) |
lypinator | 0:bb348c97df44 | 122 | |
lypinator | 0:bb348c97df44 | 123 | #else |
lypinator | 0:bb348c97df44 | 124 | #error "INITIAL_SP is not defined for this target in the mbed_rtx.h file" |
lypinator | 0:bb348c97df44 | 125 | #endif |
lypinator | 0:bb348c97df44 | 126 | |
lypinator | 0:bb348c97df44 | 127 | #endif // INITIAL_SP |
lypinator | 0:bb348c97df44 | 128 | #if (defined(__GNUC__) && !defined(__CC_ARM) && !defined(__ARMCC_VERSION) && defined(TWO_RAM_REGIONS)) |
lypinator | 0:bb348c97df44 | 129 | extern uint32_t __StackLimit[]; |
lypinator | 0:bb348c97df44 | 130 | extern uint32_t __StackTop[]; |
lypinator | 0:bb348c97df44 | 131 | extern uint32_t __end__[]; |
lypinator | 0:bb348c97df44 | 132 | extern uint32_t __HeapLimit[]; |
lypinator | 0:bb348c97df44 | 133 | #define HEAP_START ((unsigned char*)__end__) |
lypinator | 0:bb348c97df44 | 134 | #define HEAP_SIZE ((uint32_t)((uint32_t)__HeapLimit - (uint32_t)HEAP_START)) |
lypinator | 0:bb348c97df44 | 135 | #define ISR_STACK_START ((unsigned char*)__StackLimit) |
lypinator | 0:bb348c97df44 | 136 | #define ISR_STACK_SIZE ((uint32_t)((uint32_t)__StackTop - (uint32_t)__StackLimit)) |
lypinator | 0:bb348c97df44 | 137 | #endif |
lypinator | 0:bb348c97df44 | 138 | |
lypinator | 0:bb348c97df44 | 139 | #endif // MBED_MBED_RTX_H |