I managed to access the HAB event logs via JTAG.
This is how I extracted the data (RT1020-EVK board, HAB closed):
In a windows command window:
I ran gdb. E.g.:
c:\nxp\MCUXpressoIDE_11.0.1_2563\ide\plugins\com.nxp.mcuxpresso.tools.win32_11.0.1.201907311258\tools\bin\arm-none-eabi-gdb.exe
Then I entered these commands:
(gdb) set remotetimeout 100000
(gdb) target extended-remote | c:/nxp/MCUXpressoIDE_11.0.1_2563/ide/plugins/com.nxp.mcuxpresso.tools.bin.win32_11.0.1.201908271452/binaries/crt_emu_cm_redlink.exe -pMIMXRT1021xxxxx -vendor=NXP -x "." -attach --args --probehandle 1
(gdb) set mem inaccessible-by-default off
(gdb) dump binary memory memdump_0x20201000_0x0B80.bin 0x20201000 0x20201B80
You probably don't need the "--probehandle 1" argument if you have only one probe connected. I was going via a LPC-LINK2 probe.
And you don't really need the "--args" argument.
So the file memdump_0x20201000_0x0B80.bin contains the contents of the HAB logs.
You can interpret this file using the following utility that comes with the CST package I downloaded (I ran this from a Ubuntu linux terminal running on windows 10):
<your path>/cst/cst-3.1.0/release/linux64/bin/hab_log_parser -b memdump_0x20201000_0x0B80.bin -o hab_log_parsed.txt
The location of the HAB event log for a particular device is found in the document:
AN12263.pdf, "HABv4 RVT Guidelines and Recommendations, Application Note, Rev. 0, 10/2018"
Section: "3. HAB Persistent Data"
Also to interpret the error events look at:
HAB4_API.pdf, "High Assurance Boot Version 4 Application Programming Interface Reference Manual"
For my case I found these sections helpful: "4.4 Events", "3.3 Check Target"
I hope this helps someone.