Hi,
I am trying to enable the ETM on the iMX53 qsb. From the manual, i see that the trace stream is outputted to both ETB and TPIU via an ATB replicator. Since i am not using an external debugger, i am going to read the trace stream from the ETB. However, after i configure the ETM according to http://infocenter.arm.com/help/topic/com.arm.doc.ihi0014q/IHI0014Q_etm_architecture_spec.pdf section 3.5.7, and enable the ETB according to ARM Information Center, I cannot get any output from the ETB. The reading to the ETB Read Data Register always returns 0xFFFFFFFF. Is that due to the ATB replicator? Is there anyone happen to know how to use the ETM on the iMX53 qsb?
Thanks for any help and discussion!
Best,
Zhenyu
Hi Zhenyu
Maybe you are already aware of this but there is some coresight support in the kernel. Not
sure if the kernel you run supports this but the implementation might give you some more insight.
Here is some info :
https://www.kernel.org/doc/Documentation/trace/coresight.txt
Hope this helps
Best regards
Sinan Akman
Hi Sinan,
Thanks for your reply. I know there already some drivers for ETMv3 and ETMv4 in the Linux kernel, and my setup steps are following the steps in the driver. However, since the device tree for the iMX53 in the Linux kernel does not contain the ETM, we cannot directly use the ETM with the driver in the Linux. And I also attempted to add the ETM to the iMX53 device tree, however, it was not as simple as I thought, and unfortunately i messed it up. Do you have any idea in adding a device to the kernel device tree?
Appreciate for your help!
Best Regards,
Zhenyu
Hi Zhenyu
one can use ETB trace feature. The ETB allows to load up to 4k of ETM stream
data to i.MX53 internal RAM, and then retrieve it using JTAG and debug tools.
For example one can look at:
http://infocenter.arm.com/help/topic/com.arm.doc.dui0155e/DUI0155.pdf
More information about ETB can be found in i.MX53 Reference Manual.
(Chapter 11, Cortex-A8 Platform, Chapter 12 Platform Debug)
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Igor,
Thanks for your reply. I have read the iMX RM and the ARM RM of the ETM and ETB for several times, and configure the ETM and ETB exactly following the manual. However, it seems like the trace output is not in the ETB, that's why i asked this question.
According to the iMX53 RM, there is a replicator between the ETM and ETB, and the ARM RM tells that there are some configurable registers in the replicator to enable it. However, the iMX53 RM tells there is no configurable registers in the replicator. So I am not sure whether it is due to the replicator. Moreover, I am not reading the buffer with JTAG or other debugging tools, I directly read the ETB RRD register to drain the ETB.
Would you please do not mark my question as assumed answered since the question is not really solved, and I guess i need some more insight and discussions.
Best,
Zhenyu
Hi Zhenyu
unfortunately I am not aware of efforts of ETM usage, suggest to apply for extended support
to NXP Professional Services:
http://www.nxp.com/support/nxp-professional-services:PROFESSIONAL-SERVICE
Best regards
igor
Hi Igor,
Ok, thanks for your help and the suggestions.
Best Regards,
Zhenyu