Mistake on this page?
Report an issue in GitHub or email us
mbed_crash_data_offsets.h
1 /* mbed Microcontroller Library
2  * Copyright (c) 2006-2019 ARM Limited
3  * SPDX-License-Identifier: Apache-2.0
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 #ifndef MBED_CRASH_DATA_INFO_H
18 #define MBED_CRASH_DATA_INFO_H
19 
20 #include "platform/internal/mbed_fault_handler.h"
21 #include "platform/mbed_error.h"
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
27 #if MBED_CONF_PLATFORM_CRASH_CAPTURE_ENABLED
28 /** \ingroup mbed-os-internal */
29 /** \addtogroup platform-internal-api */
30 /** @{*/
31 // Any changes here must be reflected in except.S if they affect the fault handler.
32 // The fault context is first to keep it simple for the assembler.
33 typedef struct mbed_crash_data {
34  union {
35  mbed_fault_context_t context;
36  int pad[32];
37  } fault;
38  union {
39  mbed_error_ctx context;
40  int pad[32];
41  } error;
42 } mbed_crash_data_t;
43 
44 #if defined(__ARMCC_VERSION)
45 #define MBED_CRASH_DATA Image$$RW_m_crash_data$$ZI$$Base
46 #elif defined(__ICCARM__)
47 #define MBED_CRASH_DATA __CRASH_DATA_RAM_START__
48 #elif defined(__GNUC__)
49 #define MBED_CRASH_DATA __CRASH_DATA_RAM_START__
50 #endif
51 
52 extern mbed_crash_data_t MBED_CRASH_DATA;
53 /**@}*/
54 #endif
55 
56 #ifdef __cplusplus
57 }
58 #endif
59 
60 #endif
MBED_NORETURN void error(const char *format,...) MBED_PRINTF(1
To generate a fatal compile-time error, you can use the pre-processor error directive.
mbed_error_ctx struct
Definition: mbed_error.h:834
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.