mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-01 18:50:34 +03:00
refactor(hal): extract assist_debug, debug_probe and trace into esp_hal_debug_assist
Move the following modules from the hal component into a new dedicated esp_hal_debug_assist component, following the esp_hal_timg pattern: - assist_debug (hal + target-specific LL headers) - debug_probe (types + target-specific LL headers) - riscv_trace (hal + types + source + target-specific LL headers) - trace_ll (esp32/esp32s2/esp32s3 target-specific LL headers) Update the following components to depend on esp_hal_debug_assist: esp_system, riscv, bootloader_support, esp_hw_support, esp_riscv_trace Remove riscv_trace_hal.c from the hal component.
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2020-2026 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include "soc/dport_reg.h"
|
||||
#include "soc/tracemem_config.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
static inline void trace_ll_set_mem_block(int cpu, int block)
|
||||
{
|
||||
uint32_t block_bits = 0;
|
||||
|
||||
if (cpu == 0) {
|
||||
block_bits = TRACEMEM_CORE0_MUX_BLK_BITS(block);
|
||||
} else {
|
||||
block_bits = TRACEMEM_CORE1_MUX_BLK_BITS(block);
|
||||
}
|
||||
DPORT_SET_PERI_REG_MASK(SENSITIVE_INTERNAL_SRAM_USAGE_2_REG, block_bits);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user