tcl/target: replace event trace-config
[fw/openocd] / tcl / target / stm32x5x_common.cfg
index 276d0cca0ccd6b21d6221e7dc6e505c36d57f83c..c506e224bbaf08ab21fc5c2c4d6aff61bec760db 100644 (file)
@@ -146,9 +146,16 @@ $_TARGETNAME configure -event gdb-flash-erase-start {
        $_TARGETNAME configure -work-area-phys $workarea_addr
 }
 
-$_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 0xE0044004 0x00000020 0
 }
+
+$_CHIPNAME.tpiu configure -event pre-enable "_proc_pre_enable_$_CHIPNAME.tpiu $_TARGETNAME"