Skip to content

When DWT is enabled, Orbetto's px4_trace_swo_stm32h7 GDB command results in a SIGTRAP signal and a segmentation fault. #13

@fault2000

Description

@fault2000

'm currently trying to implement a function that sends an ITM signal when a DWT trigger occurs, so developers can detect DWT events in Perfetto. However, when I enable DWT in PX4—whether using emdbg's inline pwatch function or a custom program to enable DWT—executing the px4_trace_swo_stm32h7 command to generate trace.swo causes a crash.

I checked if DWT is not enabled, it works fine. The same occurred in the opposite case as well.

Do you have any insights or suggestions on what might be causing this issue?

The detailed error is as follows:

(gdb) px4_trace_swo_stm32h7
Resets core & peripherals using RESET pin.
Temporary breakpoint 1 at 0x8023a0c: file **/platforms/nuttx/NuttX/nuttx/sched/init/nx_start.c, line 340.

Program received signal SIGTRAP, Trace/breakpoint trap.
0x08002dd8 in ?? ()


Fatal signal: Segmentation fault
----- Backtrace -----
0x5b4e82a86891 ???
0x5b4e82b6df09 ???
0x5b4e82b6e05c ???
0x7f5e8ea4251f ???
	./signal/../sysdeps/unix/sysv/linux/x86_64/libc_sigaction.c:0
0x5b4e82db4a50 ???
0x5b4e82db9818 ???
0x5b4e82b03a9d ???
0x5b4e82b04127 ???
0x5b4e82b04584 ???
0x5b4e82b058fc ???
0x5b4e82cd0aa1 ???
0x5b4e82cd4da9 ???
0x5b4e82cd4eba ???
0x5b4e82bba7c5 ???
0x5b4e82d4cf81 ???
0x5b4e82bbc71e ???
0x5b4e82bc920b ???
0x5b4e82cb82ed ???
0x5b4e82e29c55 ???
0x5b4e82e2a1f2 ???
0x5b4e82d2f673 ???
0x5b4e82d2fe7a ???
0x5b4e82ac1c62 ???
0x5b4e82ac2051 ???
0x5b4e82ac24ec ???
0x5b4e82d2fcdc ???
0x5b4e82b6ec3c ???
0x5b4e82b6ef59 ???
0x5b4e82b6f50c ???
0x5b4e82da4f6f ???
0x5b4e82b6f63d ???
0x5b4e82b6f7bf ???
0x5b4e82b6dd8f ???
0x5b4e82e29c55 ???
0x5b4e82e2a1f2 ???
0x5b4e82befa74 ???
0x5b4e82bf3434 ???
0x5b4e829f5db9 ???
0x7f5e8ea29d8f __libc_start_call_main
	../sysdeps/nptl/libc_start_call_main.h:58
0x7f5e8ea29e3f __libc_start_main_impl
	../csu/libc-start.c:392
0x5b4e829fb749 ???
0xffffffffffffffff ???
---------------------
A fatal error internal to GDB has been detected, further
debugging is not possible.  GDB will now terminate.

This is a bug, please report it.  For instructions, see:
<https://www.gnu.org/software/gdb/bugs/>.

Segmentation fault (core dumped)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions