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-2013 ARM Limited
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 #ifndef MBED_CRASH_DATA_INFO_H
17 #define MBED_CRASH_DATA_INFO_H
18 
19 #include "platform/mbed_retarget.h"
20 #include "platform/mbed_toolchain.h"
21 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25 
26 #if MBED_CONF_PLATFORM_CRASH_CAPTURE_ENABLED
27 #if defined(__CC_ARM) || (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050))
28 extern uint32_t Image$$RW_m_crash_data$$ZI$$Base[];
29 extern uint32_t Image$$RW_m_crash_data$$ZI$$Size;
30 #define __CRASH_DATA_RAM_START__ Image$$RW_m_crash_data$$ZI$$Base
31 #elif defined(__ICCARM__)
32 extern uint32_t __CRASH_DATA_RAM_START__[];
33 extern uint32_t __CRASH_DATA_RAM_END__[];
34 #elif defined(__GNUC__)
35 extern uint32_t __CRASH_DATA_RAM_START__[];
36 extern uint32_t __CRASH_DATA_RAM_END__[];
37 #endif /* defined(__CC_ARM) */
38 
39 /* Offset definitions for context capture */
40 #define FAULT_CONTEXT_OFFSET (0x0)
41 #define FAULT_CONTEXT_SIZE (0x80 / 4) //32 words(128 bytes) for Fault Context
42 #define ERROR_CONTEXT_OFFSET (FAULT_CONTEXT_OFFSET + FAULT_CONTEXT_SIZE)
43 #define ERROR_CONTEXT_SIZE (0x80 / 4) //32 words(128 bytes) bytes for Error Context
44 #define FAULT_CONTEXT_LOCATION (__CRASH_DATA_RAM_START__ + FAULT_CONTEXT_OFFSET)
45 #define ERROR_CONTEXT_LOCATION (__CRASH_DATA_RAM_START__ + ERROR_CONTEXT_OFFSET)
46 #endif
47 
48 #ifdef __cplusplus
49 }
50 #endif
51 
52 #endif
53 
54 
55 
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.