mirror of
https://github.com/espressif/esp-idf.git
synced 2026-05-06 08:37:29 +02:00
refactor(esp32c61): bus_monitor backward compatible refactor
This commit is contained in:
@@ -8,17 +8,20 @@ endif()
|
||||
|
||||
|
||||
if(BOOTLOADER_BUILD)
|
||||
set(priv_requires soc)
|
||||
set(priv_requires soc hal)
|
||||
set(srcs "rv_utils.c")
|
||||
elseif(esp_tee_build)
|
||||
set(priv_requires soc)
|
||||
set(priv_requires soc hal)
|
||||
set(srcs "rv_utils.c")
|
||||
if(CONFIG_SOC_INT_PLIC_SUPPORTED)
|
||||
set(srcs "interrupt_plic.c")
|
||||
list(APPEND srcs "interrupt_plic.c")
|
||||
endif()
|
||||
else()
|
||||
set(priv_requires soc)
|
||||
set(priv_requires soc hal)
|
||||
set(srcs
|
||||
"instruction_decode.c"
|
||||
"interrupt.c"
|
||||
"rv_utils.c"
|
||||
"vectors.S")
|
||||
|
||||
if(CONFIG_SOC_INT_CLIC_SUPPORTED)
|
||||
|
||||
@@ -9,9 +9,6 @@
|
||||
#include <stdint.h>
|
||||
|
||||
#include "soc/soc_caps.h"
|
||||
#if SOC_ASSIST_DEBUG_SUPPORTED
|
||||
#include "soc/assist_debug_reg.h"
|
||||
#endif
|
||||
#include "soc/interrupt_reg.h"
|
||||
#include "esp_attr.h"
|
||||
#include "riscv/csr.h"
|
||||
@@ -405,14 +402,10 @@ FORCE_INLINE_ATTR bool rv_utils_is_trigger_fired(int id)
|
||||
|
||||
// ---------------------- Debugger -------------------------
|
||||
|
||||
FORCE_INLINE_ATTR bool rv_utils_dbgr_is_attached(void)
|
||||
{
|
||||
#if SOC_ASSIST_DEBUG_SUPPORTED
|
||||
return REG_GET_BIT(ASSIST_DEBUG_CORE_0_DEBUG_MODE_REG, ASSIST_DEBUG_CORE_0_DEBUG_MODULE_ACTIVE);
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
/** To use hal function for compatibility meanwhile keep hal dependency private,
|
||||
* this function is implemented in rv_utils.c
|
||||
*/
|
||||
bool rv_utils_dbgr_is_attached(void);
|
||||
|
||||
FORCE_INLINE_ATTR void rv_utils_dbgr_break(void)
|
||||
{
|
||||
|
||||
@@ -5,3 +5,4 @@ entries:
|
||||
interrupt:intr_handler_get (default)
|
||||
interrupt:intr_handler_set (default)
|
||||
vectors (noflash_text)
|
||||
rv_utils (noflash_text)
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <stdbool.h>
|
||||
#include "soc/soc_caps.h"
|
||||
#if SOC_ASSIST_DEBUG_SUPPORTED
|
||||
#include "hal/assist_debug_ll.h"
|
||||
#endif
|
||||
#include "esp_attr.h"
|
||||
|
||||
bool rv_utils_dbgr_is_attached(void)
|
||||
{
|
||||
#if SOC_ASSIST_DEBUG_SUPPORTED
|
||||
return assist_debug_ll_is_debugger_active();
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
Reference in New Issue
Block a user