Modification of Mbed-dev library for LQFP48 package microcontrollers: STM32F103C8 (STM32F103C8T6) and STM32F103CB (STM32F103CBT6) (Bluepill boards, Maple mini etc. )

Fork of mbed-STM32F103C8_org by Nothing Special

Library for STM32F103C8 (Bluepill boards etc.).
Use this instead of mbed library.
This library allows the size of the code in the FLASH up to 128kB. Therefore, code also runs on microcontrollers STM32F103CB (eg. Maple mini).
But in the case of STM32F103C8, check the size of the resulting code would not exceed 64kB.

To compile a program with this library, use NUCLEO-F103RB as the target name. !

Changes:

  • Corrected initialization of the HSE + crystal clock (mbed permanent bug), allowing the use of on-board xtal (8MHz).(1)
  • Additionally, it also set USB clock (48Mhz).(2)
  • Definitions of pins and peripherals adjusted to LQFP48 case.
  • Board led LED1 is now PC_13 (3)
  • USER_BUTTON is now PC_14 (4)

    Now the library is complete rebuilt based on mbed-dev v160 (and not yet fully tested).

notes
(1) - In case 8MHz xtal on board, CPU frequency is 72MHz. Without xtal is 64MHz.
(2) - Using the USB interface is only possible if STM32 is clocking by on-board 8MHz xtal or external clock signal 8MHz on the OSC_IN pin.
(3) - On Bluepill board led operation is reversed, i.e. 0 - led on, 1 - led off.
(4) - Bluepill board has no real user button

Information

After export to SW4STM (AC6):

  • add line #include "mbed_config.h" in files Serial.h and RawSerial.h
  • in project properties change Optimisation Level to Optimise for size (-Os)
Committer:
mega64
Date:
Thu Mar 16 06:15:53 2017 +0000
Revision:
146:03e976389d16
fully rebuild, now based on mbed-dev v160

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mega64 146:03e976389d16 1 /* mbed Microcontroller Library
mega64 146:03e976389d16 2 * Copyright (c) 2016 ARM Limited
mega64 146:03e976389d16 3 *
mega64 146:03e976389d16 4 * Licensed under the Apache License, Version 2.0 (the "License");
mega64 146:03e976389d16 5 * you may not use this file except in compliance with the License.
mega64 146:03e976389d16 6 * You may obtain a copy of the License at
mega64 146:03e976389d16 7 *
mega64 146:03e976389d16 8 * http://www.apache.org/licenses/LICENSE-2.0
mega64 146:03e976389d16 9 *
mega64 146:03e976389d16 10 * Unless required by applicable law or agreed to in writing, software
mega64 146:03e976389d16 11 * distributed under the License is distributed on an "AS IS" BASIS,
mega64 146:03e976389d16 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
mega64 146:03e976389d16 13 * See the License for the specific language governing permissions and
mega64 146:03e976389d16 14 * limitations under the License.
mega64 146:03e976389d16 15 */
mega64 146:03e976389d16 16
mega64 146:03e976389d16 17 #ifndef MBED_MBED_RTX_H
mega64 146:03e976389d16 18 #define MBED_MBED_RTX_H
mega64 146:03e976389d16 19
mega64 146:03e976389d16 20 #if defined(TARGET_STM32F051R8)
mega64 146:03e976389d16 21
mega64 146:03e976389d16 22 #ifndef INITIAL_SP
mega64 146:03e976389d16 23 #define INITIAL_SP (0x20002000UL)
mega64 146:03e976389d16 24 #endif
mega64 146:03e976389d16 25 #ifndef OS_TASKCNT
mega64 146:03e976389d16 26 #define OS_TASKCNT 6
mega64 146:03e976389d16 27 #endif
mega64 146:03e976389d16 28 #ifndef OS_MAINSTKSIZE
mega64 146:03e976389d16 29 #define OS_MAINSTKSIZE 128
mega64 146:03e976389d16 30 #endif
mega64 146:03e976389d16 31 #ifndef OS_CLOCK
mega64 146:03e976389d16 32 #define OS_CLOCK 48000000
mega64 146:03e976389d16 33 #endif
mega64 146:03e976389d16 34
mega64 146:03e976389d16 35 #elif defined(TARGET_STM32L031K6)
mega64 146:03e976389d16 36
mega64 146:03e976389d16 37 #ifndef INITIAL_SP
mega64 146:03e976389d16 38 #define INITIAL_SP (0x20002000UL)
mega64 146:03e976389d16 39 #endif
mega64 146:03e976389d16 40 #ifndef OS_TASKCNT
mega64 146:03e976389d16 41 #define OS_TASKCNT 6
mega64 146:03e976389d16 42 #endif
mega64 146:03e976389d16 43 #ifndef OS_MAINSTKSIZE
mega64 146:03e976389d16 44 #define OS_MAINSTKSIZE 112
mega64 146:03e976389d16 45 #endif
mega64 146:03e976389d16 46 #ifndef OS_CLOCK
mega64 146:03e976389d16 47 #define OS_CLOCK 32000000
mega64 146:03e976389d16 48 #endif
mega64 146:03e976389d16 49
mega64 146:03e976389d16 50 #elif defined(TARGET_STM32F070RB)
mega64 146:03e976389d16 51
mega64 146:03e976389d16 52 #ifndef INITIAL_SP
mega64 146:03e976389d16 53 #define INITIAL_SP (0x20004000UL)
mega64 146:03e976389d16 54 #endif
mega64 146:03e976389d16 55 #ifndef OS_TASKCNT
mega64 146:03e976389d16 56 #define OS_TASKCNT 6
mega64 146:03e976389d16 57 #endif
mega64 146:03e976389d16 58 #ifndef OS_MAINSTKSIZE
mega64 146:03e976389d16 59 #define OS_MAINSTKSIZE 128
mega64 146:03e976389d16 60 #endif
mega64 146:03e976389d16 61 #ifndef OS_CLOCK
mega64 146:03e976389d16 62 #define OS_CLOCK 48000000
mega64 146:03e976389d16 63 #endif
mega64 146:03e976389d16 64
mega64 146:03e976389d16 65 #elif defined(TARGET_STM32F072RB)
mega64 146:03e976389d16 66
mega64 146:03e976389d16 67 #ifndef INITIAL_SP
mega64 146:03e976389d16 68 #define INITIAL_SP (0x20004000UL)
mega64 146:03e976389d16 69 #endif
mega64 146:03e976389d16 70 #ifndef OS_TASKCNT
mega64 146:03e976389d16 71 #define OS_TASKCNT 6
mega64 146:03e976389d16 72 #endif
mega64 146:03e976389d16 73 #ifndef OS_MAINSTKSIZE
mega64 146:03e976389d16 74 #define OS_MAINSTKSIZE 128
mega64 146:03e976389d16 75 #endif
mega64 146:03e976389d16 76 #ifndef OS_CLOCK
mega64 146:03e976389d16 77 #define OS_CLOCK 48000000
mega64 146:03e976389d16 78 #endif
mega64 146:03e976389d16 79
mega64 146:03e976389d16 80 #elif defined(TARGET_STM32F091RC)
mega64 146:03e976389d16 81
mega64 146:03e976389d16 82 #ifndef INITIAL_SP
mega64 146:03e976389d16 83 #define INITIAL_SP (0x20008000UL)
mega64 146:03e976389d16 84 #endif
mega64 146:03e976389d16 85 #ifndef OS_TASKCNT
mega64 146:03e976389d16 86 #define OS_TASKCNT 6
mega64 146:03e976389d16 87 #endif
mega64 146:03e976389d16 88 #ifndef OS_MAINSTKSIZE
mega64 146:03e976389d16 89 #define OS_MAINSTKSIZE 128
mega64 146:03e976389d16 90 #endif
mega64 146:03e976389d16 91 #ifndef OS_CLOCK
mega64 146:03e976389d16 92 #define OS_CLOCK 48000000
mega64 146:03e976389d16 93 #endif
mega64 146:03e976389d16 94
mega64 146:03e976389d16 95 #elif defined(TARGET_STM32F100RB)
mega64 146:03e976389d16 96
mega64 146:03e976389d16 97 #ifndef INITIAL_SP
mega64 146:03e976389d16 98 #define INITIAL_SP (0x20002000UL)
mega64 146:03e976389d16 99 #endif
mega64 146:03e976389d16 100 #ifndef OS_TASKCNT
mega64 146:03e976389d16 101 #define OS_TASKCNT 6
mega64 146:03e976389d16 102 #endif
mega64 146:03e976389d16 103 #ifndef OS_MAINSTKSIZE
mega64 146:03e976389d16 104 #define OS_MAINSTKSIZE 128
mega64 146:03e976389d16 105 #endif
mega64 146:03e976389d16 106 #ifndef OS_CLOCK
mega64 146:03e976389d16 107 #define OS_CLOCK 24000000
mega64 146:03e976389d16 108 #endif
mega64 146:03e976389d16 109
mega64 146:03e976389d16 110 #elif defined(TARGET_STM32F103RB)
mega64 146:03e976389d16 111
mega64 146:03e976389d16 112 #ifndef INITIAL_SP
mega64 146:03e976389d16 113 #define INITIAL_SP (0x20005000UL)
mega64 146:03e976389d16 114 #endif
mega64 146:03e976389d16 115 #ifndef OS_TASKCNT
mega64 146:03e976389d16 116 #define OS_TASKCNT 6
mega64 146:03e976389d16 117 #endif
mega64 146:03e976389d16 118 #ifndef OS_MAINSTKSIZE
mega64 146:03e976389d16 119 #define OS_MAINSTKSIZE 128
mega64 146:03e976389d16 120 #endif
mega64 146:03e976389d16 121 #ifndef OS_CLOCK
mega64 146:03e976389d16 122 #define OS_CLOCK 72000000
mega64 146:03e976389d16 123 #endif
mega64 146:03e976389d16 124
mega64 146:03e976389d16 125 #elif defined(TARGET_STM32F207ZG)
mega64 146:03e976389d16 126
mega64 146:03e976389d16 127 #ifndef INITIAL_SP
mega64 146:03e976389d16 128 #define INITIAL_SP (0x20020000UL)
mega64 146:03e976389d16 129 #endif
mega64 146:03e976389d16 130 #ifndef OS_TASKCNT
mega64 146:03e976389d16 131 #define OS_TASKCNT 14
mega64 146:03e976389d16 132 #endif
mega64 146:03e976389d16 133 #ifndef OS_MAINSTKSIZE
mega64 146:03e976389d16 134 #define OS_MAINSTKSIZE 256
mega64 146:03e976389d16 135 #endif
mega64 146:03e976389d16 136 #ifndef OS_CLOCK
mega64 146:03e976389d16 137 #define OS_CLOCK 120000000
mega64 146:03e976389d16 138 #endif
mega64 146:03e976389d16 139
mega64 146:03e976389d16 140 #elif defined(TARGET_STM32F303VC)
mega64 146:03e976389d16 141
mega64 146:03e976389d16 142 #ifndef INITIAL_SP
mega64 146:03e976389d16 143 #define INITIAL_SP (0x2000A000UL)
mega64 146:03e976389d16 144 #endif
mega64 146:03e976389d16 145 #ifndef OS_TASKCNT
mega64 146:03e976389d16 146 #define OS_TASKCNT 14
mega64 146:03e976389d16 147 #endif
mega64 146:03e976389d16 148 #ifndef OS_MAINSTKSIZE
mega64 146:03e976389d16 149 #define OS_MAINSTKSIZE 256
mega64 146:03e976389d16 150 #endif
mega64 146:03e976389d16 151 #ifndef OS_CLOCK
mega64 146:03e976389d16 152 #define OS_CLOCK 72000000
mega64 146:03e976389d16 153 #endif
mega64 146:03e976389d16 154
mega64 146:03e976389d16 155 #elif defined(TARGET_STM32F334C8)
mega64 146:03e976389d16 156
mega64 146:03e976389d16 157 #ifndef INITIAL_SP
mega64 146:03e976389d16 158 #define INITIAL_SP (0x20003000UL)
mega64 146:03e976389d16 159 #endif
mega64 146:03e976389d16 160 #ifndef OS_TASKCNT
mega64 146:03e976389d16 161 #define OS_TASKCNT 6
mega64 146:03e976389d16 162 #endif
mega64 146:03e976389d16 163 #ifndef OS_MAINSTKSIZE
mega64 146:03e976389d16 164 #define OS_MAINSTKSIZE 112
mega64 146:03e976389d16 165 #endif
mega64 146:03e976389d16 166 #ifndef OS_CLOCK
mega64 146:03e976389d16 167 #define OS_CLOCK 72000000
mega64 146:03e976389d16 168 #endif
mega64 146:03e976389d16 169
mega64 146:03e976389d16 170 #elif defined(TARGET_STM32F302R8)
mega64 146:03e976389d16 171
mega64 146:03e976389d16 172 #ifndef INITIAL_SP
mega64 146:03e976389d16 173 #define INITIAL_SP (0x20004000UL)
mega64 146:03e976389d16 174 #endif
mega64 146:03e976389d16 175 #ifndef OS_TASKCNT
mega64 146:03e976389d16 176 #define OS_TASKCNT 6
mega64 146:03e976389d16 177 #endif
mega64 146:03e976389d16 178 #ifndef OS_MAINSTKSIZE
mega64 146:03e976389d16 179 #define OS_MAINSTKSIZE 128
mega64 146:03e976389d16 180 #endif
mega64 146:03e976389d16 181 #ifndef OS_CLOCK
mega64 146:03e976389d16 182 #define OS_CLOCK 72000000
mega64 146:03e976389d16 183 #endif
mega64 146:03e976389d16 184
mega64 146:03e976389d16 185 #elif defined(TARGET_STM32F303K8)
mega64 146:03e976389d16 186
mega64 146:03e976389d16 187 #ifndef INITIAL_SP
mega64 146:03e976389d16 188 #define INITIAL_SP (0x20003000UL)
mega64 146:03e976389d16 189 #endif
mega64 146:03e976389d16 190 #ifndef OS_TASKCNT
mega64 146:03e976389d16 191 #define OS_TASKCNT 6
mega64 146:03e976389d16 192 #endif
mega64 146:03e976389d16 193 #ifndef OS_MAINSTKSIZE
mega64 146:03e976389d16 194 #define OS_MAINSTKSIZE 112
mega64 146:03e976389d16 195 #endif
mega64 146:03e976389d16 196 #ifndef OS_CLOCK
mega64 146:03e976389d16 197 #define OS_CLOCK 64000000
mega64 146:03e976389d16 198 #endif
mega64 146:03e976389d16 199
mega64 146:03e976389d16 200 #elif defined(TARGET_STM32F303RE)
mega64 146:03e976389d16 201
mega64 146:03e976389d16 202 #ifndef INITIAL_SP
mega64 146:03e976389d16 203 #define INITIAL_SP (0x20010000UL)
mega64 146:03e976389d16 204 #endif
mega64 146:03e976389d16 205 #ifndef OS_TASKCNT
mega64 146:03e976389d16 206 #define OS_TASKCNT 6
mega64 146:03e976389d16 207 #endif
mega64 146:03e976389d16 208 #ifndef OS_MAINSTKSIZE
mega64 146:03e976389d16 209 #define OS_MAINSTKSIZE 112
mega64 146:03e976389d16 210 #endif
mega64 146:03e976389d16 211 #ifndef OS_CLOCK
mega64 146:03e976389d16 212 #define OS_CLOCK 72000000
mega64 146:03e976389d16 213 #endif
mega64 146:03e976389d16 214
mega64 146:03e976389d16 215 #elif defined(TARGET_STM32F303ZE)
mega64 146:03e976389d16 216
mega64 146:03e976389d16 217 #ifndef INITIAL_SP
mega64 146:03e976389d16 218 #define INITIAL_SP (0x20010000UL)
mega64 146:03e976389d16 219 #endif
mega64 146:03e976389d16 220 #ifndef OS_TASKCNT
mega64 146:03e976389d16 221 #define OS_TASKCNT 6
mega64 146:03e976389d16 222 #endif
mega64 146:03e976389d16 223 #ifndef OS_MAINSTKSIZE
mega64 146:03e976389d16 224 #define OS_MAINSTKSIZE 112
mega64 146:03e976389d16 225 #endif
mega64 146:03e976389d16 226 #ifndef OS_CLOCK
mega64 146:03e976389d16 227 #define OS_CLOCK 72000000
mega64 146:03e976389d16 228 #endif
mega64 146:03e976389d16 229
mega64 146:03e976389d16 230 #elif defined(TARGET_STM32F334R8)
mega64 146:03e976389d16 231
mega64 146:03e976389d16 232 #ifndef INITIAL_SP
mega64 146:03e976389d16 233 #define INITIAL_SP (0x20003000UL)
mega64 146:03e976389d16 234 #endif
mega64 146:03e976389d16 235 #ifndef OS_TASKCNT
mega64 146:03e976389d16 236 #define OS_TASKCNT 6
mega64 146:03e976389d16 237 #endif
mega64 146:03e976389d16 238 #ifndef OS_MAINSTKSIZE
mega64 146:03e976389d16 239 #define OS_MAINSTKSIZE 112
mega64 146:03e976389d16 240 #endif
mega64 146:03e976389d16 241 #ifndef OS_CLOCK
mega64 146:03e976389d16 242 #define OS_CLOCK 72000000
mega64 146:03e976389d16 243 #endif
mega64 146:03e976389d16 244
mega64 146:03e976389d16 245 #elif defined(TARGET_STM32F446VE)
mega64 146:03e976389d16 246
mega64 146:03e976389d16 247 #ifndef INITIAL_SP
mega64 146:03e976389d16 248 #define INITIAL_SP (0x20020000UL)
mega64 146:03e976389d16 249 #endif
mega64 146:03e976389d16 250 #ifndef OS_TASKCNT
mega64 146:03e976389d16 251 #define OS_TASKCNT 14
mega64 146:03e976389d16 252 #endif
mega64 146:03e976389d16 253 #ifndef OS_MAINSTKSIZE
mega64 146:03e976389d16 254 #define OS_MAINSTKSIZE 256
mega64 146:03e976389d16 255 #endif
mega64 146:03e976389d16 256 #ifndef OS_CLOCK
mega64 146:03e976389d16 257 #define OS_CLOCK 180000000
mega64 146:03e976389d16 258 #endif
mega64 146:03e976389d16 259
mega64 146:03e976389d16 260 #elif defined(TARGET_STM32F401VC)
mega64 146:03e976389d16 261
mega64 146:03e976389d16 262 #ifndef INITIAL_SP
mega64 146:03e976389d16 263 #define INITIAL_SP (0x20010000UL)
mega64 146:03e976389d16 264 #endif
mega64 146:03e976389d16 265 #ifndef OS_TASKCNT
mega64 146:03e976389d16 266 #define OS_TASKCNT 14
mega64 146:03e976389d16 267 #endif
mega64 146:03e976389d16 268 #ifndef OS_MAINSTKSIZE
mega64 146:03e976389d16 269 #define OS_MAINSTKSIZE 256
mega64 146:03e976389d16 270 #endif
mega64 146:03e976389d16 271 #ifndef OS_CLOCK
mega64 146:03e976389d16 272 #define OS_CLOCK 84000000
mega64 146:03e976389d16 273 #endif
mega64 146:03e976389d16 274
mega64 146:03e976389d16 275 #elif (defined(TARGET_STM32F429ZI) || defined(TARGET_STM32F439ZI))
mega64 146:03e976389d16 276
mega64 146:03e976389d16 277 #ifndef INITIAL_SP
mega64 146:03e976389d16 278 #define INITIAL_SP (0x20030000UL)
mega64 146:03e976389d16 279 #endif
mega64 146:03e976389d16 280 #ifndef OS_TASKCNT
mega64 146:03e976389d16 281 #define OS_TASKCNT 14
mega64 146:03e976389d16 282 #endif
mega64 146:03e976389d16 283 #ifndef OS_MAINSTKSIZE
mega64 146:03e976389d16 284 #define OS_MAINSTKSIZE 256
mega64 146:03e976389d16 285 #endif
mega64 146:03e976389d16 286 #ifndef OS_CLOCK
mega64 146:03e976389d16 287 #define OS_CLOCK 168000000
mega64 146:03e976389d16 288 #endif
mega64 146:03e976389d16 289
mega64 146:03e976389d16 290 #elif defined(TARGET_UBLOX_EVK_ODIN_W2)
mega64 146:03e976389d16 291
mega64 146:03e976389d16 292 #ifndef INITIAL_SP
mega64 146:03e976389d16 293 #define INITIAL_SP (0x20030000UL)
mega64 146:03e976389d16 294 #endif
mega64 146:03e976389d16 295 #ifndef OS_TASKCNT
mega64 146:03e976389d16 296 #define OS_TASKCNT 14
mega64 146:03e976389d16 297 #endif
mega64 146:03e976389d16 298 #ifndef OS_MAINSTKSIZE
mega64 146:03e976389d16 299 #define OS_MAINSTKSIZE 512
mega64 146:03e976389d16 300 #endif
mega64 146:03e976389d16 301 #ifndef OS_CLOCK
mega64 146:03e976389d16 302 #define OS_CLOCK 168000000
mega64 146:03e976389d16 303 #endif
mega64 146:03e976389d16 304
mega64 146:03e976389d16 305 #elif defined(TARGET_STM32F469NI)
mega64 146:03e976389d16 306
mega64 146:03e976389d16 307 #ifndef INITIAL_SP
mega64 146:03e976389d16 308 #define INITIAL_SP (0x20050000UL)
mega64 146:03e976389d16 309 #endif
mega64 146:03e976389d16 310 #ifndef OS_TASKCNT
mega64 146:03e976389d16 311 #define OS_TASKCNT 14
mega64 146:03e976389d16 312 #endif
mega64 146:03e976389d16 313 #ifndef OS_MAINSTKSIZE
mega64 146:03e976389d16 314 #define OS_MAINSTKSIZE 256
mega64 146:03e976389d16 315 #endif
mega64 146:03e976389d16 316 #ifndef OS_CLOCK
mega64 146:03e976389d16 317 #define OS_CLOCK 168000000
mega64 146:03e976389d16 318 #endif
mega64 146:03e976389d16 319
mega64 146:03e976389d16 320 #elif defined(TARGET_STM32F405RG)
mega64 146:03e976389d16 321
mega64 146:03e976389d16 322 #ifndef INITIAL_SP
mega64 146:03e976389d16 323 #define INITIAL_SP (0x20020000UL)
mega64 146:03e976389d16 324 #endif
mega64 146:03e976389d16 325 #ifndef OS_TASKCNT
mega64 146:03e976389d16 326 #define OS_TASKCNT 14
mega64 146:03e976389d16 327 #endif
mega64 146:03e976389d16 328 #ifndef OS_MAINSTKSIZE
mega64 146:03e976389d16 329 #define OS_MAINSTKSIZE 256
mega64 146:03e976389d16 330 #endif
mega64 146:03e976389d16 331 #ifndef OS_CLOCK
mega64 146:03e976389d16 332 #define OS_CLOCK 48000000
mega64 146:03e976389d16 333 #endif
mega64 146:03e976389d16 334
mega64 146:03e976389d16 335 #elif defined(TARGET_STM32F401RE)
mega64 146:03e976389d16 336
mega64 146:03e976389d16 337 #ifndef INITIAL_SP
mega64 146:03e976389d16 338 #define INITIAL_SP (0x20018000UL)
mega64 146:03e976389d16 339 #endif
mega64 146:03e976389d16 340 #ifndef OS_TASKCNT
mega64 146:03e976389d16 341 #define OS_TASKCNT 14
mega64 146:03e976389d16 342 #endif
mega64 146:03e976389d16 343 #ifndef OS_MAINSTKSIZE
mega64 146:03e976389d16 344 #define OS_MAINSTKSIZE 256
mega64 146:03e976389d16 345 #endif
mega64 146:03e976389d16 346 #ifndef OS_CLOCK
mega64 146:03e976389d16 347 #define OS_CLOCK 84000000
mega64 146:03e976389d16 348 #endif
mega64 146:03e976389d16 349
mega64 146:03e976389d16 350 #elif defined(TARGET_STM32F410RB)
mega64 146:03e976389d16 351
mega64 146:03e976389d16 352 #ifndef INITIAL_SP
mega64 146:03e976389d16 353 #define INITIAL_SP (0x20008000UL)
mega64 146:03e976389d16 354 #endif
mega64 146:03e976389d16 355 #ifndef OS_TASKCNT
mega64 146:03e976389d16 356 #define OS_TASKCNT 14
mega64 146:03e976389d16 357 #endif
mega64 146:03e976389d16 358 #ifndef OS_MAINSTKSIZE
mega64 146:03e976389d16 359 #define OS_MAINSTKSIZE 256
mega64 146:03e976389d16 360 #endif
mega64 146:03e976389d16 361 #ifndef OS_CLOCK
mega64 146:03e976389d16 362 #define OS_CLOCK 100000000
mega64 146:03e976389d16 363 #endif
mega64 146:03e976389d16 364
mega64 146:03e976389d16 365 #elif defined(TARGET_MTS_MDOT_F411RE) || defined (TARGET_MTS_DRAGONFLY_F411RE)
mega64 146:03e976389d16 366
mega64 146:03e976389d16 367 #ifndef INITIAL_SP
mega64 146:03e976389d16 368 #define INITIAL_SP (0x20020000UL)
mega64 146:03e976389d16 369 #endif
mega64 146:03e976389d16 370 #ifndef OS_TASKCNT
mega64 146:03e976389d16 371 #define OS_TASKCNT 14
mega64 146:03e976389d16 372 #endif
mega64 146:03e976389d16 373 #ifndef OS_MAINSTKSIZE
mega64 146:03e976389d16 374 #define OS_MAINSTKSIZE 1024
mega64 146:03e976389d16 375 #endif
mega64 146:03e976389d16 376 #ifndef OS_CLOCK
mega64 146:03e976389d16 377 #define OS_CLOCK 96000000
mega64 146:03e976389d16 378 #endif
mega64 146:03e976389d16 379
mega64 146:03e976389d16 380 #elif defined(TARGET_STM32F411RE)
mega64 146:03e976389d16 381
mega64 146:03e976389d16 382 #ifndef INITIAL_SP
mega64 146:03e976389d16 383 #define INITIAL_SP (0x20020000UL)
mega64 146:03e976389d16 384 #endif
mega64 146:03e976389d16 385 #ifndef OS_TASKCNT
mega64 146:03e976389d16 386 #define OS_TASKCNT 14
mega64 146:03e976389d16 387 #endif
mega64 146:03e976389d16 388 #ifndef OS_MAINSTKSIZE
mega64 146:03e976389d16 389 #define OS_MAINSTKSIZE 256
mega64 146:03e976389d16 390 #endif
mega64 146:03e976389d16 391 #ifndef OS_CLOCK
mega64 146:03e976389d16 392 #define OS_CLOCK 100000000
mega64 146:03e976389d16 393 #endif
mega64 146:03e976389d16 394
mega64 146:03e976389d16 395 #elif defined(TARGET_STM32F412ZG)
mega64 146:03e976389d16 396
mega64 146:03e976389d16 397 #ifndef INITIAL_SP
mega64 146:03e976389d16 398 #define INITIAL_SP (0x20040000UL)
mega64 146:03e976389d16 399 #endif
mega64 146:03e976389d16 400 #ifndef OS_TASKCNT
mega64 146:03e976389d16 401 #define OS_TASKCNT 14
mega64 146:03e976389d16 402 #endif
mega64 146:03e976389d16 403 #ifndef OS_MAINSTKSIZE
mega64 146:03e976389d16 404 #define OS_MAINSTKSIZE 256
mega64 146:03e976389d16 405 #endif
mega64 146:03e976389d16 406 #ifndef OS_CLOCK
mega64 146:03e976389d16 407 #define OS_CLOCK 100000000
mega64 146:03e976389d16 408 #endif
mega64 146:03e976389d16 409
mega64 146:03e976389d16 410 #elif defined(TARGET_STM32F446RE)
mega64 146:03e976389d16 411
mega64 146:03e976389d16 412 #ifndef INITIAL_SP
mega64 146:03e976389d16 413 #define INITIAL_SP (0x20020000UL)
mega64 146:03e976389d16 414 #endif
mega64 146:03e976389d16 415 #ifndef OS_TASKCNT
mega64 146:03e976389d16 416 #define OS_TASKCNT 14
mega64 146:03e976389d16 417 #endif
mega64 146:03e976389d16 418 #ifndef OS_MAINSTKSIZE
mega64 146:03e976389d16 419 #define OS_MAINSTKSIZE 256
mega64 146:03e976389d16 420 #endif
mega64 146:03e976389d16 421 #ifndef OS_CLOCK
mega64 146:03e976389d16 422 #define OS_CLOCK 180000000
mega64 146:03e976389d16 423 #endif
mega64 146:03e976389d16 424
mega64 146:03e976389d16 425 #elif defined(TARGET_STM32F446ZE)
mega64 146:03e976389d16 426
mega64 146:03e976389d16 427 #ifndef INITIAL_SP
mega64 146:03e976389d16 428 #define INITIAL_SP (0x20020000UL)
mega64 146:03e976389d16 429 #endif
mega64 146:03e976389d16 430 #ifndef OS_TASKCNT
mega64 146:03e976389d16 431 #define OS_TASKCNT 14
mega64 146:03e976389d16 432 #endif
mega64 146:03e976389d16 433 #ifndef OS_MAINSTKSIZE
mega64 146:03e976389d16 434 #define OS_MAINSTKSIZE 256
mega64 146:03e976389d16 435 #endif
mega64 146:03e976389d16 436 #ifndef OS_CLOCK
mega64 146:03e976389d16 437 #define OS_CLOCK 180000000
mega64 146:03e976389d16 438 #endif
mega64 146:03e976389d16 439
mega64 146:03e976389d16 440 #elif defined(TARGET_STM32F407VG)
mega64 146:03e976389d16 441
mega64 146:03e976389d16 442 #ifndef INITIAL_SP
mega64 146:03e976389d16 443 #define INITIAL_SP (0x20020000UL)
mega64 146:03e976389d16 444 #endif
mega64 146:03e976389d16 445 #ifndef OS_TASKCNT
mega64 146:03e976389d16 446 #define OS_TASKCNT 14
mega64 146:03e976389d16 447 #endif
mega64 146:03e976389d16 448 #ifndef OS_MAINSTKSIZE
mega64 146:03e976389d16 449 #define OS_MAINSTKSIZE 256
mega64 146:03e976389d16 450 #endif
mega64 146:03e976389d16 451 #ifndef OS_CLOCK
mega64 146:03e976389d16 452 #define OS_CLOCK 168000000
mega64 146:03e976389d16 453 #endif
mega64 146:03e976389d16 454
mega64 146:03e976389d16 455 #elif defined(TARGET_STM32F746NG)
mega64 146:03e976389d16 456
mega64 146:03e976389d16 457 #ifndef INITIAL_SP
mega64 146:03e976389d16 458 #define INITIAL_SP (0x20050000UL)
mega64 146:03e976389d16 459 #endif
mega64 146:03e976389d16 460 #ifndef OS_TASKCNT
mega64 146:03e976389d16 461 #define OS_TASKCNT 14
mega64 146:03e976389d16 462 #endif
mega64 146:03e976389d16 463 #ifndef OS_MAINSTKSIZE
mega64 146:03e976389d16 464 #define OS_MAINSTKSIZE 256
mega64 146:03e976389d16 465 #endif
mega64 146:03e976389d16 466 #ifndef OS_CLOCK
mega64 146:03e976389d16 467 #define OS_CLOCK 216000000
mega64 146:03e976389d16 468 #endif
mega64 146:03e976389d16 469
mega64 146:03e976389d16 470 #elif (defined(TARGET_STM32F746ZG) || defined(TARGET_STM32F756ZG))
mega64 146:03e976389d16 471
mega64 146:03e976389d16 472 #ifndef INITIAL_SP
mega64 146:03e976389d16 473 #define INITIAL_SP (0x20050000UL)
mega64 146:03e976389d16 474 #endif
mega64 146:03e976389d16 475 #ifndef OS_TASKCNT
mega64 146:03e976389d16 476 #define OS_TASKCNT 14
mega64 146:03e976389d16 477 #endif
mega64 146:03e976389d16 478 #ifndef OS_MAINSTKSIZE
mega64 146:03e976389d16 479 #define OS_MAINSTKSIZE 256
mega64 146:03e976389d16 480 #endif
mega64 146:03e976389d16 481 #ifndef OS_CLOCK
mega64 146:03e976389d16 482 #define OS_CLOCK 216000000
mega64 146:03e976389d16 483 #endif
mega64 146:03e976389d16 484
mega64 146:03e976389d16 485 #elif defined(TARGET_STM32F767ZI)
mega64 146:03e976389d16 486
mega64 146:03e976389d16 487 #ifndef INITIAL_SP
mega64 146:03e976389d16 488 #define INITIAL_SP (0x20080000UL)
mega64 146:03e976389d16 489 #endif
mega64 146:03e976389d16 490 #ifndef OS_TASKCNT
mega64 146:03e976389d16 491 #define OS_TASKCNT 14
mega64 146:03e976389d16 492 #endif
mega64 146:03e976389d16 493 #ifndef OS_MAINSTKSIZE
mega64 146:03e976389d16 494 #define OS_MAINSTKSIZE 256
mega64 146:03e976389d16 495 #endif
mega64 146:03e976389d16 496 #ifndef OS_CLOCK
mega64 146:03e976389d16 497 #define OS_CLOCK 216000000
mega64 146:03e976389d16 498 #endif
mega64 146:03e976389d16 499
mega64 146:03e976389d16 500 #elif defined(TARGET_STM32F769NI)
mega64 146:03e976389d16 501
mega64 146:03e976389d16 502 #ifndef INITIAL_SP
mega64 146:03e976389d16 503 #define INITIAL_SP (0x20080000UL)
mega64 146:03e976389d16 504 #endif
mega64 146:03e976389d16 505 #ifndef OS_TASKCNT
mega64 146:03e976389d16 506 #define OS_TASKCNT 14
mega64 146:03e976389d16 507 #endif
mega64 146:03e976389d16 508 #ifndef OS_MAINSTKSIZE
mega64 146:03e976389d16 509 #define OS_MAINSTKSIZE 256
mega64 146:03e976389d16 510 #endif
mega64 146:03e976389d16 511 #ifndef OS_CLOCK
mega64 146:03e976389d16 512 #define OS_CLOCK 216000000
mega64 146:03e976389d16 513 #endif
mega64 146:03e976389d16 514
mega64 146:03e976389d16 515 #elif defined(TARGET_STM32L053C8)
mega64 146:03e976389d16 516
mega64 146:03e976389d16 517 #ifndef INITIAL_SP
mega64 146:03e976389d16 518 #define INITIAL_SP (0x20002000UL)
mega64 146:03e976389d16 519 #endif
mega64 146:03e976389d16 520 #ifndef OS_TASKCNT
mega64 146:03e976389d16 521 #define OS_TASKCNT 6
mega64 146:03e976389d16 522 #endif
mega64 146:03e976389d16 523 #ifndef OS_MAINSTKSIZE
mega64 146:03e976389d16 524 #define OS_MAINSTKSIZE 112
mega64 146:03e976389d16 525 #endif
mega64 146:03e976389d16 526 #ifndef OS_CLOCK
mega64 146:03e976389d16 527 #define OS_CLOCK 32000000
mega64 146:03e976389d16 528 #endif
mega64 146:03e976389d16 529
mega64 146:03e976389d16 530 #elif defined(TARGET_STM32L031K6)
mega64 146:03e976389d16 531
mega64 146:03e976389d16 532 #ifndef INITIAL_SP
mega64 146:03e976389d16 533 #define INITIAL_SP (0x20002000UL)
mega64 146:03e976389d16 534 #endif
mega64 146:03e976389d16 535 #ifndef OS_TASKCNT
mega64 146:03e976389d16 536 #define OS_TASKCNT 6
mega64 146:03e976389d16 537 #endif
mega64 146:03e976389d16 538 #ifndef OS_MAINSTKSIZE
mega64 146:03e976389d16 539 #define OS_MAINSTKSIZE 112
mega64 146:03e976389d16 540 #endif
mega64 146:03e976389d16 541 #ifndef OS_CLOCK
mega64 146:03e976389d16 542 #define OS_CLOCK 32000000
mega64 146:03e976389d16 543 #endif
mega64 146:03e976389d16 544
mega64 146:03e976389d16 545 #elif defined(TARGET_STM32L053R8)
mega64 146:03e976389d16 546
mega64 146:03e976389d16 547 #ifndef INITIAL_SP
mega64 146:03e976389d16 548 #define INITIAL_SP (0x20002000UL)
mega64 146:03e976389d16 549 #endif
mega64 146:03e976389d16 550 #ifndef OS_TASKCNT
mega64 146:03e976389d16 551 #define OS_TASKCNT 6
mega64 146:03e976389d16 552 #endif
mega64 146:03e976389d16 553 #ifndef OS_MAINSTKSIZE
mega64 146:03e976389d16 554 #define OS_MAINSTKSIZE 112
mega64 146:03e976389d16 555 #endif
mega64 146:03e976389d16 556 #ifndef OS_CLOCK
mega64 146:03e976389d16 557 #define OS_CLOCK 32000000
mega64 146:03e976389d16 558 #endif
mega64 146:03e976389d16 559
mega64 146:03e976389d16 560 #elif defined(TARGET_STM32L073RZ)
mega64 146:03e976389d16 561
mega64 146:03e976389d16 562 #ifndef INITIAL_SP
mega64 146:03e976389d16 563 #define INITIAL_SP (0x20005000UL)
mega64 146:03e976389d16 564 #endif
mega64 146:03e976389d16 565 #ifndef OS_TASKCNT
mega64 146:03e976389d16 566 #define OS_TASKCNT 6
mega64 146:03e976389d16 567 #endif
mega64 146:03e976389d16 568 #ifndef OS_MAINSTKSIZE
mega64 146:03e976389d16 569 #define OS_MAINSTKSIZE 112
mega64 146:03e976389d16 570 #endif
mega64 146:03e976389d16 571 #ifndef OS_CLOCK
mega64 146:03e976389d16 572 #define OS_CLOCK 32000000
mega64 146:03e976389d16 573 #endif
mega64 146:03e976389d16 574
mega64 146:03e976389d16 575 #elif defined(TARGET_STM32L152RC)
mega64 146:03e976389d16 576
mega64 146:03e976389d16 577 #ifndef INITIAL_SP
mega64 146:03e976389d16 578 #define INITIAL_SP (0x20008000UL)
mega64 146:03e976389d16 579 #endif
mega64 146:03e976389d16 580 #ifndef OS_TASKCNT
mega64 146:03e976389d16 581 #define OS_TASKCNT 14
mega64 146:03e976389d16 582 #endif
mega64 146:03e976389d16 583 #ifndef OS_MAINSTKSIZE
mega64 146:03e976389d16 584 #define OS_MAINSTKSIZE 256
mega64 146:03e976389d16 585 #endif
mega64 146:03e976389d16 586 #ifndef OS_CLOCK
mega64 146:03e976389d16 587 #define OS_CLOCK 24000000
mega64 146:03e976389d16 588 #endif
mega64 146:03e976389d16 589
mega64 146:03e976389d16 590 #elif defined(TARGET_STM32L152RE)
mega64 146:03e976389d16 591
mega64 146:03e976389d16 592 #ifndef INITIAL_SP
mega64 146:03e976389d16 593 #define INITIAL_SP (0x20014000UL)
mega64 146:03e976389d16 594 #endif
mega64 146:03e976389d16 595 #ifndef OS_TASKCNT
mega64 146:03e976389d16 596 #define OS_TASKCNT 14
mega64 146:03e976389d16 597 #endif
mega64 146:03e976389d16 598 #ifndef OS_MAINSTKSIZE
mega64 146:03e976389d16 599 #define OS_MAINSTKSIZE 256
mega64 146:03e976389d16 600 #endif
mega64 146:03e976389d16 601 #ifndef OS_CLOCK
mega64 146:03e976389d16 602 #define OS_CLOCK 32000000
mega64 146:03e976389d16 603 #endif
mega64 146:03e976389d16 604
mega64 146:03e976389d16 605 #elif defined(TARGET_NZ32_SC151)
mega64 146:03e976389d16 606
mega64 146:03e976389d16 607 #ifndef INITIAL_SP
mega64 146:03e976389d16 608 #define INITIAL_SP (0x20008000UL)
mega64 146:03e976389d16 609 #endif
mega64 146:03e976389d16 610 #ifndef OS_TASKCNT
mega64 146:03e976389d16 611 #define OS_TASKCNT 6
mega64 146:03e976389d16 612 #endif
mega64 146:03e976389d16 613 #ifndef OS_MAINSTKSIZE
mega64 146:03e976389d16 614 #define OS_MAINSTKSIZE 128
mega64 146:03e976389d16 615 #endif
mega64 146:03e976389d16 616 #ifndef OS_CLOCK
mega64 146:03e976389d16 617 #define OS_CLOCK 32000000
mega64 146:03e976389d16 618 #endif
mega64 146:03e976389d16 619
mega64 146:03e976389d16 620 #elif defined(TARGET_XDOT_L151CC)
mega64 146:03e976389d16 621
mega64 146:03e976389d16 622 #ifndef INITIAL_SP
mega64 146:03e976389d16 623 #define INITIAL_SP (0x20008000UL)
mega64 146:03e976389d16 624 #endif
mega64 146:03e976389d16 625 #ifndef OS_TASKCNT
mega64 146:03e976389d16 626 #define OS_TASKCNT 6
mega64 146:03e976389d16 627 #endif
mega64 146:03e976389d16 628 #ifndef OS_MAINSTKSIZE
mega64 146:03e976389d16 629 #define OS_MAINSTKSIZE 128
mega64 146:03e976389d16 630 #endif
mega64 146:03e976389d16 631 #ifndef OS_CLOCK
mega64 146:03e976389d16 632 #define OS_CLOCK 32000000
mega64 146:03e976389d16 633 #endif
mega64 146:03e976389d16 634
mega64 146:03e976389d16 635 #elif defined(TARGET_STM32L476VG)
mega64 146:03e976389d16 636
mega64 146:03e976389d16 637 #ifndef INITIAL_SP
mega64 146:03e976389d16 638 #define INITIAL_SP (0x20018000UL)
mega64 146:03e976389d16 639 #endif
mega64 146:03e976389d16 640 #ifndef OS_TASKCNT
mega64 146:03e976389d16 641 #define OS_TASKCNT 14
mega64 146:03e976389d16 642 #endif
mega64 146:03e976389d16 643 #ifndef OS_MAINSTKSIZE
mega64 146:03e976389d16 644 #define OS_MAINSTKSIZE 256
mega64 146:03e976389d16 645 #endif
mega64 146:03e976389d16 646 #ifndef OS_CLOCK
mega64 146:03e976389d16 647 #define OS_CLOCK 80000000
mega64 146:03e976389d16 648 #endif
mega64 146:03e976389d16 649
mega64 146:03e976389d16 650 #elif defined(TARGET_STM32L432KC)
mega64 146:03e976389d16 651
mega64 146:03e976389d16 652 #ifndef INITIAL_SP
mega64 146:03e976389d16 653 #define INITIAL_SP (0x2000C000UL)
mega64 146:03e976389d16 654 #endif
mega64 146:03e976389d16 655 #ifndef OS_TASKCNT
mega64 146:03e976389d16 656 #define OS_TASKCNT 14
mega64 146:03e976389d16 657 #endif
mega64 146:03e976389d16 658 #ifndef OS_MAINSTKSIZE
mega64 146:03e976389d16 659 #define OS_MAINSTKSIZE 256
mega64 146:03e976389d16 660 #endif
mega64 146:03e976389d16 661 #ifndef OS_CLOCK
mega64 146:03e976389d16 662 #define OS_CLOCK 80000000
mega64 146:03e976389d16 663 #endif
mega64 146:03e976389d16 664
mega64 146:03e976389d16 665 #elif (defined(TARGET_STM32L476RG) || defined(TARGET_STM32L486RG))
mega64 146:03e976389d16 666
mega64 146:03e976389d16 667 #ifndef INITIAL_SP
mega64 146:03e976389d16 668 #define INITIAL_SP (0x20018000UL)
mega64 146:03e976389d16 669 #endif
mega64 146:03e976389d16 670 #ifndef OS_TASKCNT
mega64 146:03e976389d16 671 #define OS_TASKCNT 14
mega64 146:03e976389d16 672 #endif
mega64 146:03e976389d16 673 #ifndef OS_MAINSTKSIZE
mega64 146:03e976389d16 674 #define OS_MAINSTKSIZE 256
mega64 146:03e976389d16 675 #endif
mega64 146:03e976389d16 676 #ifndef OS_CLOCK
mega64 146:03e976389d16 677 #define OS_CLOCK 80000000
mega64 146:03e976389d16 678 #endif
mega64 146:03e976389d16 679
mega64 146:03e976389d16 680 #endif
mega64 146:03e976389d16 681
mega64 146:03e976389d16 682 #endif // MBED_MBED_RTX_H