Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to dump Gcov data on ESP32-P4 (OCD-1125) #360

Closed
RCapolungo opened this issue Mar 12, 2025 · 2 comments
Closed

Unable to dump Gcov data on ESP32-P4 (OCD-1125) #360

RCapolungo opened this issue Mar 12, 2025 · 2 comments

Comments

@RCapolungo
Copy link

RCapolungo commented Mar 12, 2025

Development Kit

ESP32-P4-Function-EV-Board

Module or chip used

ESP32-P4

Debug Adapter

ESP-PROG

OpenOCD version

v0.12.0-esp32-20241016 (2024-10-16-14:17)

Operating System

Ubuntu 24.04

Using an IDE ?

VSCode

OpenOCD command line

openocd -f board/esp32p4-ftdi.cfg

JTAG Clock Speed

Clock Speed 10000 kHz

ESP-IDF version

5.4

Problem Description

  1. First of all i burned the DIS_USB_JTAG efuse.
  2. then i set in the sdkconfig these values:
CONFIG_APPTRACE_DEST_JTAG=y
CONFIG_APPTRACE_DEST_UART_NONE=y
CONFIG_APPTRACE_UART_TASK_PRIO=1
CONFIG_APPTRACE_MEMBUFS_APPTRACE_PROTO_ENABLE=y
CONFIG_APPTRACE_ENABLE=y
CONFIG_APPTRACE_LOCK_ENABLE=y
CONFIG_APPTRACE_ONPANIC_HOST_FLUSH_TMO=100
CONFIG_APPTRACE_POSTMORTEM_FLUSH_THRESH=16384
CONFIG_APPTRACE_BUF_SIZE=16384
CONFIG_APPTRACE_PENDING_DATA_SIZE_MAX=0
CONFIG_APPTRACE_GCOV_ENABLE=y

added target_compile_options(${COMPONENT_LIB} PRIVATE --coverage) and REQUIRES app_trace in every component that needs to be compiled with --coverage option
4. I connected the relative pins of the ESP-PROG to the board (GPIO2 to GPIO5).
5. I run the openocd command
6. run on another terminal telnet localhost 4444
7. Sent the reset command to synchronize the MCU with openocd
8. Sent gcov dump
9. On the telent terminal i got

Total trace memory: 16384 bytes
Connect targets...
[esp32p4.hp.cpu0] Target halted, PC=0x4FC18DCE, debug_reason=00000000
[esp32p4.hp.cpu1] Target halted, PC=0x4FF06142, debug_reason=00000000
Targets connected.
Connection closed by foreign host.

And this is what was printed out in the openocd terminal

openocd: ../src/target/xtensa/xtensa.h:294: target_to_xtensa: Assertion `xtensa->common_magic == 0x54E4E555U' failed.
Aborted (core dumped)

Debug Logs

openocd_log.txt

Expected behavior

openocd doen't crash and receive the gcov data

Screenshots

No response

@github-actions github-actions bot changed the title Unable to dump Gcov data on ESP32-P4 Unable to dump Gcov data on ESP32-P4 (OCD-1125) Mar 12, 2025
@sobuch
Copy link
Collaborator

sobuch commented Mar 12, 2025

Hi @RCapolungo I was able to reproduce with the same version, but not with a newer one.

Could you please try whether updating openocd (to master in this repo or at least latest release) solves the issue for you?

@RCapolungo
Copy link
Author

Hi @sobuch, I tried with latest release and worked, thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants