target/xtensa: virtualize XDM registers
[openocd.git] / src / target / armv7m_trace.h
blob5abb0b9406c2198e9d55c7a26d7fa795f15c08ef
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 /***************************************************************************
4 * Copyright (C) 2015 Paul Fertser <fercerpav@gmail.com> *
5 ***************************************************************************/
7 #ifndef OPENOCD_TARGET_ARMV7M_TRACE_H
8 #define OPENOCD_TARGET_ARMV7M_TRACE_H
10 #include <helper/command.h>
11 #include <target/target.h>
13 /**
14 * @file
15 * Holds the interface to ITM and DWT configuration functions.
18 enum itm_ts_prescaler {
19 ITM_TS_PRESCALE1, /**< no prescaling for the timestamp counter */
20 ITM_TS_PRESCALE4, /**< refclock divided by 4 for the timestamp counter */
21 ITM_TS_PRESCALE16, /**< refclock divided by 16 for the timestamp counter */
22 ITM_TS_PRESCALE64, /**< refclock divided by 64 for the timestamp counter */
25 struct armv7m_trace_config {
26 /** Bitmask of currently enabled ITM stimuli */
27 uint32_t itm_ter[8];
28 /** Identifier for multi-source trace stream formatting */
29 unsigned int trace_bus_id;
30 /** Prescaler for the timestamp counter */
31 enum itm_ts_prescaler itm_ts_prescale;
32 /** Enable differential timestamps */
33 bool itm_diff_timestamps;
34 /** Enable async timestamps model */
35 bool itm_async_timestamps;
36 /** Enable synchronisation packet transmission (for sync port only) */
37 bool itm_synchro_packets;
38 /** Config ITM after target examine */
39 bool itm_deferred_config;
42 extern const struct command_registration armv7m_trace_command_handlers[];
44 /**
45 * Configure hardware accordingly to the current ITM target settings
47 int armv7m_trace_itm_config(struct target *target);
49 #endif /* OPENOCD_TARGET_ARMV7M_TRACE_H */