mbed-dev-f303
platform/mbed_application.h@0:bdf663c61a82, 2022-06-14 (annotated)
- Committer:
- abe5b02d-a2d4-4fe9-818e-c4e57c809ea4
- Date:
- Tue Jun 14 09:21:18 2022 +0000
- Revision:
- 0:bdf663c61a82
lib
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
abe5b02d-a2d4-4fe9-818e-c4e57c809ea4 | 0:bdf663c61a82 | 1 | |
abe5b02d-a2d4-4fe9-818e-c4e57c809ea4 | 0:bdf663c61a82 | 2 | /** \addtogroup platform */ |
abe5b02d-a2d4-4fe9-818e-c4e57c809ea4 | 0:bdf663c61a82 | 3 | /** @{*/ |
abe5b02d-a2d4-4fe9-818e-c4e57c809ea4 | 0:bdf663c61a82 | 4 | /* mbed Microcontroller Library |
abe5b02d-a2d4-4fe9-818e-c4e57c809ea4 | 0:bdf663c61a82 | 5 | * Copyright (c) 2017-2017 ARM Limited |
abe5b02d-a2d4-4fe9-818e-c4e57c809ea4 | 0:bdf663c61a82 | 6 | * |
abe5b02d-a2d4-4fe9-818e-c4e57c809ea4 | 0:bdf663c61a82 | 7 | * Licensed under the Apache License, Version 2.0 (the "License"); |
abe5b02d-a2d4-4fe9-818e-c4e57c809ea4 | 0:bdf663c61a82 | 8 | * you may not use this file except in compliance with the License. |
abe5b02d-a2d4-4fe9-818e-c4e57c809ea4 | 0:bdf663c61a82 | 9 | * You may obtain a copy of the License at |
abe5b02d-a2d4-4fe9-818e-c4e57c809ea4 | 0:bdf663c61a82 | 10 | * |
abe5b02d-a2d4-4fe9-818e-c4e57c809ea4 | 0:bdf663c61a82 | 11 | * http://www.apache.org/licenses/LICENSE-2.0 |
abe5b02d-a2d4-4fe9-818e-c4e57c809ea4 | 0:bdf663c61a82 | 12 | * |
abe5b02d-a2d4-4fe9-818e-c4e57c809ea4 | 0:bdf663c61a82 | 13 | * Unless required by applicable law or agreed to in writing, software |
abe5b02d-a2d4-4fe9-818e-c4e57c809ea4 | 0:bdf663c61a82 | 14 | * distributed under the License is distributed on an "AS IS" BASIS, |
abe5b02d-a2d4-4fe9-818e-c4e57c809ea4 | 0:bdf663c61a82 | 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
abe5b02d-a2d4-4fe9-818e-c4e57c809ea4 | 0:bdf663c61a82 | 16 | * See the License for the specific language governing permissions and |
abe5b02d-a2d4-4fe9-818e-c4e57c809ea4 | 0:bdf663c61a82 | 17 | * limitations under the License. |
abe5b02d-a2d4-4fe9-818e-c4e57c809ea4 | 0:bdf663c61a82 | 18 | */ |
abe5b02d-a2d4-4fe9-818e-c4e57c809ea4 | 0:bdf663c61a82 | 19 | #ifndef MBED_APPLICATION_H |
abe5b02d-a2d4-4fe9-818e-c4e57c809ea4 | 0:bdf663c61a82 | 20 | #define MBED_APPLICATION_H |
abe5b02d-a2d4-4fe9-818e-c4e57c809ea4 | 0:bdf663c61a82 | 21 | |
abe5b02d-a2d4-4fe9-818e-c4e57c809ea4 | 0:bdf663c61a82 | 22 | #include<stdint.h> |
abe5b02d-a2d4-4fe9-818e-c4e57c809ea4 | 0:bdf663c61a82 | 23 | |
abe5b02d-a2d4-4fe9-818e-c4e57c809ea4 | 0:bdf663c61a82 | 24 | #if defined(__CORTEX_M3) || defined(__CORTEX_M4) || defined(__CORTEX_M7) |
abe5b02d-a2d4-4fe9-818e-c4e57c809ea4 | 0:bdf663c61a82 | 25 | #define MBED_APPLICATION_SUPPORT 1 |
abe5b02d-a2d4-4fe9-818e-c4e57c809ea4 | 0:bdf663c61a82 | 26 | #else |
abe5b02d-a2d4-4fe9-818e-c4e57c809ea4 | 0:bdf663c61a82 | 27 | #define MBED_APPLICATION_SUPPORT 0 |
abe5b02d-a2d4-4fe9-818e-c4e57c809ea4 | 0:bdf663c61a82 | 28 | #endif |
abe5b02d-a2d4-4fe9-818e-c4e57c809ea4 | 0:bdf663c61a82 | 29 | |
abe5b02d-a2d4-4fe9-818e-c4e57c809ea4 | 0:bdf663c61a82 | 30 | #if MBED_APPLICATION_SUPPORT |
abe5b02d-a2d4-4fe9-818e-c4e57c809ea4 | 0:bdf663c61a82 | 31 | #ifdef __cplusplus |
abe5b02d-a2d4-4fe9-818e-c4e57c809ea4 | 0:bdf663c61a82 | 32 | extern "C" { |
abe5b02d-a2d4-4fe9-818e-c4e57c809ea4 | 0:bdf663c61a82 | 33 | #endif |
abe5b02d-a2d4-4fe9-818e-c4e57c809ea4 | 0:bdf663c61a82 | 34 | |
abe5b02d-a2d4-4fe9-818e-c4e57c809ea4 | 0:bdf663c61a82 | 35 | /** |
abe5b02d-a2d4-4fe9-818e-c4e57c809ea4 | 0:bdf663c61a82 | 36 | * Start the application at the given address. This function does |
abe5b02d-a2d4-4fe9-818e-c4e57c809ea4 | 0:bdf663c61a82 | 37 | * not return. It is the applications responsibility for flushing to |
abe5b02d-a2d4-4fe9-818e-c4e57c809ea4 | 0:bdf663c61a82 | 38 | * or powering down external components such as filesystems or |
abe5b02d-a2d4-4fe9-818e-c4e57c809ea4 | 0:bdf663c61a82 | 39 | * socket connections before calling this function. For Cortex-M |
abe5b02d-a2d4-4fe9-818e-c4e57c809ea4 | 0:bdf663c61a82 | 40 | * devices this function powers down generic system components such as |
abe5b02d-a2d4-4fe9-818e-c4e57c809ea4 | 0:bdf663c61a82 | 41 | * the NVIC and set the vector table to that of the new image followed |
abe5b02d-a2d4-4fe9-818e-c4e57c809ea4 | 0:bdf663c61a82 | 42 | * by jumping to the reset handler of the new image. |
abe5b02d-a2d4-4fe9-818e-c4e57c809ea4 | 0:bdf663c61a82 | 43 | * |
abe5b02d-a2d4-4fe9-818e-c4e57c809ea4 | 0:bdf663c61a82 | 44 | * @param address Starting address of next application to run |
abe5b02d-a2d4-4fe9-818e-c4e57c809ea4 | 0:bdf663c61a82 | 45 | */ |
abe5b02d-a2d4-4fe9-818e-c4e57c809ea4 | 0:bdf663c61a82 | 46 | void mbed_start_application(uintptr_t address); |
abe5b02d-a2d4-4fe9-818e-c4e57c809ea4 | 0:bdf663c61a82 | 47 | |
abe5b02d-a2d4-4fe9-818e-c4e57c809ea4 | 0:bdf663c61a82 | 48 | #ifdef __cplusplus |
abe5b02d-a2d4-4fe9-818e-c4e57c809ea4 | 0:bdf663c61a82 | 49 | } |
abe5b02d-a2d4-4fe9-818e-c4e57c809ea4 | 0:bdf663c61a82 | 50 | #endif |
abe5b02d-a2d4-4fe9-818e-c4e57c809ea4 | 0:bdf663c61a82 | 51 | #endif |
abe5b02d-a2d4-4fe9-818e-c4e57c809ea4 | 0:bdf663c61a82 | 52 | |
abe5b02d-a2d4-4fe9-818e-c4e57c809ea4 | 0:bdf663c61a82 | 53 | #endif |
abe5b02d-a2d4-4fe9-818e-c4e57c809ea4 | 0:bdf663c61a82 | 54 | |
abe5b02d-a2d4-4fe9-818e-c4e57c809ea4 | 0:bdf663c61a82 | 55 | /** @}*/ |
abe5b02d-a2d4-4fe9-818e-c4e57c809ea4 | 0:bdf663c61a82 | 56 |