From 213c318e624a2886f5b839ce0d43872a309236d5 Mon Sep 17 00:00:00 2001 From: Erhan Kurubas Date: Tue, 8 Oct 2024 13:08:41 +0200 Subject: [PATCH] fix(apptrace): replace esp32p4 ctrl block into noncache-able TCM memory --- components/app_trace/port/riscv/port.c | 14 ++++++++++---- examples/system/.build-test-rules.yml | 4 ---- examples/system/app_trace_basic/README.md | 4 ++-- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/components/app_trace/port/riscv/port.c b/components/app_trace/port/riscv/port.c index 3e5ceca966..14fe223623 100644 --- a/components/app_trace/port/riscv/port.c +++ b/components/app_trace/port/riscv/port.c @@ -57,7 +57,13 @@ static bool esp_apptrace_riscv_host_data_pending(void); const static char *TAG = "esp_apptrace"; -static esp_apptrace_riscv_ctrl_block_t s_tracing_ctrl[CONFIG_FREERTOS_NUMBER_OF_CORES]; +#if SOC_CACHE_INTERNAL_MEM_VIA_L1CACHE +#define APPTRACE_DRAM_ATTR TCM_DRAM_ATTR +#else +#define APPTRACE_DRAM_ATTR +#endif + +static APPTRACE_DRAM_ATTR esp_apptrace_riscv_ctrl_block_t s_tracing_ctrl[CONFIG_FREERTOS_NUMBER_OF_CORES]; esp_apptrace_hw_t *esp_apptrace_jtag_hw_get(void **data) { @@ -92,7 +98,7 @@ esp_apptrace_hw_t *esp_apptrace_jtag_hw_get(void **data) } /* Advertises apptrace control block address to host. - This function can be overriden with custom implementation, + This function can be overridden with custom implementation, e.g. OpenOCD flasher stub use own implementation of it. */ __attribute__((weak)) int esp_apptrace_advertise_ctrl_block(void *ctrl_block_addr) { @@ -103,7 +109,7 @@ __attribute__((weak)) int esp_apptrace_advertise_ctrl_block(void *ctrl_block_add } /* Returns up buffers config. - This function can be overriden with custom implementation, + This function can be overridden with custom implementation, e.g. OpenOCD flasher stub use own implementation of it. */ __attribute__((weak)) void esp_apptrace_get_up_buffers(esp_apptrace_mem_block_t mem_blocks_cfg[2]) { @@ -165,7 +171,7 @@ static esp_err_t esp_apptrace_riscv_init(esp_apptrace_riscv_data_t *hw_data) } // notify host about control block address int res = esp_apptrace_advertise_ctrl_block(&s_tracing_ctrl[core_id]); - assert(res == 0 && "Falied to send config to host!"); + assert(res == 0 && "Failed to send config to host!"); return ESP_OK; } diff --git a/examples/system/.build-test-rules.yml b/examples/system/.build-test-rules.yml index 3152b243fd..d0cf7db720 100644 --- a/examples/system/.build-test-rules.yml +++ b/examples/system/.build-test-rules.yml @@ -1,10 +1,6 @@ # Documentation: .gitlab/ci/README.md#manifest-file-to-control-the-buildtest-apps examples/system/app_trace_basic: - disable: - - if: IDF_TARGET == "esp32p4" - temporary: true - reason: not ready yet. IDF-8107 disable_test: - if: IDF_TARGET in ["esp32c6", "esp32h2", "esp32p4", "esp32c5", "esp32c61"] temporary: true diff --git a/examples/system/app_trace_basic/README.md b/examples/system/app_trace_basic/README.md index 72abab1b8d..151e992d1a 100644 --- a/examples/system/app_trace_basic/README.md +++ b/examples/system/app_trace_basic/README.md @@ -1,5 +1,5 @@ -| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-C61 | ESP32-H2 | ESP32-S2 | ESP32-S3 | -| ----------------- | ----- | -------- | -------- | -------- | -------- | --------- | -------- | -------- | -------- | +| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-C61 | ESP32-H2 | ESP32-P4 | ESP32-S2 | ESP32-S3 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | --------- | -------- | -------- | -------- | -------- | # Application Level Tracing Example (Basic)