I have been trying to understand the various trace options with the iMXRT1021, IAR Embedded Workbench, and J-Link connected via SWD (just SWDIO and SWCLK pins).
(As an aside, with the 100pin iMXRT1021, you cannot use SWO or TRACE if you want to use Ethernet in your application - this seems like a very poor choice of pin allocation for a communications processor!!)
I believe I can use ETM configured to fill the ETB, and get the information out through the J-Link.
Am I right? Is there any code I need to run in my project to configure the ETM / ETB? Or should it be done by the IAR tools?
You are correct. Unfortunately, the SWO function is not present on the debug header. This will be fixed on newer RT parts, such as RT1064.
In addition, there is a community document regarding SWO on i.MX RT1064 EVK that you may find useful.