diff options
author | Antonio Borneo <borneo.antonio@gmail.com> | 2020-12-14 17:08:06 +0100 |
---|---|---|
committer | Antonio Borneo <borneo.antonio@gmail.com> | 2020-12-26 15:47:44 +0000 |
commit | 722f5797069bc233c8e1b71bdab283766d6be9b3 (patch) | |
tree | a6a20838eab415f0d5ca1d14a8ce9a9e14c7014b /src/target/cortex_m.c | |
parent | 88592cc1a194b48946abc29503c57a6020b791e7 (diff) | |
download | riscv-openocd-722f5797069bc233c8e1b71bdab283766d6be9b3.zip riscv-openocd-722f5797069bc233c8e1b71bdab283766d6be9b3.tar.gz riscv-openocd-722f5797069bc233c8e1b71bdab283766d6be9b3.tar.bz2 |
armv7m_trace: stop getting traces from adapter at exit
If OpenOCD is reading trace data from the target, at exit it
should stop the adapter to gather data, but should left the target
still producing them.
Add a helper in armv7m_trace to disable the adapter's trace and
call it during OpenOCD teardown.
This also provides a workaround for an issue in the firmware of
ST-Link V3 till version V3J7. If the SWD connection is closed when
trace is active, at following connection the trace does not work
anymore.
Change-Id: I47ccab61405384938555096c5aca789eaa090d27
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/5978
Reviewed-by: Jonathan McDowell <noodles-openocd@earth.li>
Tested-by: jenkins
Diffstat (limited to 'src/target/cortex_m.c')
-rw-r--r-- | src/target/cortex_m.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/target/cortex_m.c b/src/target/cortex_m.c index 316089c..ac308b4 100644 --- a/src/target/cortex_m.c +++ b/src/target/cortex_m.c @@ -1648,6 +1648,8 @@ void cortex_m_deinit_target(struct target *target) { struct cortex_m_common *cortex_m = target_to_cm(target); + armv7m_trace_tpiu_exit(target); + free(cortex_m->fp_comparator_list); cortex_m_dwt_free(target); |