I think you also should buy Jtag connectors and adapters because there are three kinds .
You can buy similiar products.
Sorry for Korean words.
For Jtag debug probe
1. Jtag Cable 7set and adapter board( option)
https://www.coupang.com/vp/products/1958523626?itemId=3328646403&vendorItemId=71315491841&src=103203...
2. 20 Pin 2.54mm To 20 Pin 1.27mm Jtag 20 P To 20 Pin Converter Adapter Board
https://shopee.ph/20-Pin-2.54mm-To-20-Pin-1.27mm-Jtag-20-P-To-20-Pin-Converter-Adapter-Board-i.25240...
3. Jtag probe
https://www.olimex.com/Products/ARM/JTAG/ARM-USB-OCD-H/
4. Eclipse Debug IDE && OpenOCD binary
Eclipse - eclipse-cpp-2018-12-R-linux-gtk-x86_64.tar.gz for Ubuntu 18.04
Debugging - https://eclipse-embed-cdt.github.io/debug/openocd/
OpenOCD - https://github.com/ntfreak/openocd
GNU ARM Eclipse Plugin
https://m.blog.naver.com/PostView.nhn?blogId=opusk&logNo=220985229211&proxyReferer=https:%2F%2Fwww.g...
5. Olimex Arm-US-OCD Setup
USB driver should be installed.
refer to attached pdf.- chapter 3
6. Chipset configuration
For I.MX8MQ case , slightly modified as Jtag circuits differ
jhpark@jhpark-smcu-multi-VirtualBox:/data/work/ntfreak/openocd/tcl$ more board/nxp_mcimx8m-evk.cfg
#
# configuration file for NXP MC-IMX8M-EVK
#
# only JTAG supported
transport select jtag
# set a safe JTAG clock speed, can be overridden
adapter speed 1000
# default JTAG configuration has only SRST and no TRST
#reset_config srst_only srst_push_pull - fail
#reset_config trst_only trst_push_pull
reset_config trst_and_srst trst_push_pull
# delay after SRST goes inactive
#adapter srst delay 70
adapter srst delay 270
jtag_ntrst_delay 270
# board has an i.MX8MQ with 4 Cortex-A53 cores
set CHIPNAME imx8mq
set CHIPCORES 4
# source SoC configuration
source [find target/imx8m.cfg]
Thanks.