tcl/target: replace event trace-config
[fw/openocd] / tcl / target / stm32wbx.cfg
index 0c5b76148cfcf38604988dee917048d1e8842059..737b1447c04275624315d5e857f8c5dda6fe34af 100644 (file)
@@ -97,9 +97,16 @@ $_TARGETNAME configure -event examine-end {
     mmw 0xE004203C 0x00001800 0
 }
 
-$_TARGETNAME configure -event trace-config {
+tpiu create $_CHIPNAME.tpiu -dap $_CHIPNAME.dap -ap-num 0 -baseaddr 0xE0040000
+
+lappend _telnet_autocomplete_skip _proc_pre_enable_$_CHIPNAME.tpiu
+proc _proc_pre_enable_$_CHIPNAME.tpiu {_targetname} {
+    targets $_targetname
+
     # Set TRACE_IOEN; TRACE_MODE is set to async; when using sync
     # change this value accordingly to configure trace pins
     # assignment
     mmw 0xE0042004 0x00000020 0
 }
+
+$_CHIPNAME.tpiu configure -event pre-enable "_proc_pre_enable_$_CHIPNAME.tpiu $_TARGETNAME"