1 /* 2 * Copyright (c) 2020 HiSilicon (Shanghai) Technologies CO., LIMITED. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 * Description: OAM TRACE for Suzhe BT Core 15 * 16 * Create: 2021-10-25 17 */ 18 19 #ifndef OAM_TRACE_H 20 #define OAM_TRACE_H 21 22 #include <stdint.h> 23 #ifdef USE_CMSIS_OS 24 #include "arch/exception.h" 25 #endif 26 27 #include "stdbool.h" 28 29 #ifdef __cplusplus 30 #if __cplusplus 31 extern "C" { 32 #endif /* __cplusplus */ 33 #endif /* __cplusplus */ 34 35 bool is_valid_txt_addr(uint32_t pc); 36 37 /** 38 * @brief Rigister Exception handle function. 39 */ 40 void register_os_exec_hook(void); 41 42 #ifdef USE_CMSIS_OS 43 /** 44 * @brief Invoked by exception to dump exception information. 45 * @param exc_type Exception type. 46 * @param exc_buff_addr Exception buff addr. 47 */ 48 void exec_fault_handler(uint32_t exc_type, const ExcContext *exc_buff_addr); 49 #endif 50 51 #ifdef __cplusplus 52 #if __cplusplus 53 extern "C" { 54 #endif /* __cplusplus */ 55 #endif /* __cplusplus */ 56 57 #endif