Changes

Jump to: navigation, search
History
{{AppliesTo MITO 8M AN}}
{{InfoBoxBottom}}
{{WarningMessage|text=This technical note Application Note was validated against specific versions of hardware and software. What is described here may not work with other versions.}}
[[Category:MISC-AN-TN]]
[[Category:MISC-AN]]
|June 2021
|First public release
|-
|1.0.1
|June 2021
|Added webinar recording
|}
==Introduction==
This Application Note (AN) is associated with [https://www.dave.eu/en/news-and-media/news/multicore-debug-and-trace-su-nxp-imx8 this webinar] organized by [https://www.lauterbach.com www.lauterbach.it Lauterbach Italy], [https://www.dave.eu DAVE Embedded Systems], and [https://www.nxp.com NXP ] in May 2021. The webinar showed advanced techniques used to debug, trace, and energy profile the code executed by the NXP i.MX8M SoC powering the [[MITO_8M_SOM|Mito8M system-on-module (SoM)]] with the aid of Lauterbach tools.  Specifically, this article deals with JTAG debugging, which is a stop-mode technique. Unlike run/mode debuggers such as GDB, this means that the debugger stops the processor, for example, to execute the code step-by-step or when it hits a breakpoint. Another fundamental characteristic of this mode is that the processor cooperates with the debugger for controlling the execution of the code and for accessing internal resources (CPU registers, RAM/flash memories, on-chip peripheral registers, etc.). For more details on JTAG debugging, please refer to [https://www2.lauterbach.com/pdf/training_jtag.pdf this document]. Tracing is an extremely powerful technique that comes to help not only to "enhance" the debugging. It is also an outstanding troubleshooting weapon and allows advanced measurements, profiling, and specific software-related testing like code coverage. You can think about it as a sort of "movie" that is shot in real-time and in a non-intrusive fashion while the processor is running. Later on, it allows engineers to scrutinize all the processor's activity around specific events that occurred in the past. For instance, this is astonishingly useful for analyzing errors, bugs, or other situations that do not allow to stop the processor. With respect to tracing, three different strategies are here illustrated:* Onchip trace* Offchip trace via Trace Port Interface Unit (TPIU)* Offchip trace via PCIe.In this AN, tracing will be also used to show how to carry out energy profiling in order to correlate the power consumption with the execution of the code.
The webinar showed advanced techniques used to debug and trace the code executed by the NXP i.MX8M SoC powering the [[MITO_8M_SOM|Mito8M system-on-module (SoM)]] with the aid of Lauterbach tools. Basically, the hardware platforms used for this demonstration basically consists of the [[MITO 8M Evaluation KitMITO_8M_SOM/MITO_8M_Evaluation_Kit|MITO 8M Evaluation Kit]]. This kit comprises three different boards:
* The SoM
* The [[:Category:SBC-AXEL|SBCX carrier board]]
* An adapter board.
It is also worth remembering that Mito8M SoM '''is electrically and mechanically compatible with i.MX6-based [[AXEL_Lite_SOM|AxelLite SoM]]'''. Therefore, '''Mito8M can be mated with the SBCX carrier board directly'''. Nevertheless, to fully leverage all the functionalities it provides, an adapter board is required. Namely, the adapter board allows to access physical interfaces that are used for the purposes here discussed.
It is worth remembering that Mito8M SoM '''is electrically and mechanically compatible with i.MX6-based [[AXEL_Lite_SOM|AxelLite SoM]]'''. Therefore, '''Mito8M can be mated with Regarding the SBCX carrier board directly'''. Neverthelesssoftware configuration, to leverage all the functionalities provided, an adapter board is requireda typical Linux SMP setup was used. NamelySpecifically, the adapter board allows to access physical interfaces that are used for the purposes here discussedkernel 4==Linux SMP debugging and trace==The following sections describe how to configure the Lauterbach TRACE32® debugger to support debug and trace of Linux running on the quad-core i14.MX 8M Application Processor by NXP Semiconductors98 was utilized in tandem with a root file system built with Yocto Sumo.
==The debugging/tracing/energy profiling tools==
This chapter details the Lauterbach tools used for this demonstration.
=== Prerequisites ===
* Debugger Basics – Training manual (training_debugger.pdf)
* Training HLL Debugging manual (training_hll.pdf)
 
==Debugging and tracing==
The following sections describe how to configure the Lauterbach TRACE32® debugger to support debug and trace of Linux running on the quad-core i.MX 8M Application Processor by NXP Semiconductors.
 
=== TRACE32 configuration ===
=== Startup scripts ===
Reference scripts for startup and for configuring the Analog Probe are available for download: please refer to [[#Resources|''Resources'']] section below.
For more details about the PRACTICE batch language, please refer to https://www.lauterbach.com/manual.html:
* Training PRACTICE manual (training_practice.pdf)
[[File:TRACE32 PCIe.png|center|frame]]
=== Energy profiling ===
Using a Lauterbach Analog Probe, it’s possible to measure up to 4 voltage channels (1 at a time, shared with current channels) and 3 current channels (1 at a time, shared with voltage channels; shunt resistor required).
[[File:TRACE32 energy profiling.png|center|frame]]
=== Summary view ===
In the pictures below, all the concepts previously discussed are shown as a summary global view of TRACE32 debugger.
 
 
[[File:TRACE32 summary view.png|center|frame]]
==Resources==The TRACE32 scripts used for this demonstration can be downloaded [[:File:Mito8M-TRACE32-debug-trace-energy-profiling.zip|here]]. Webinar recording is also avalaible. It is in Italian, but it is possible to enable English subtitles as well. {{#ev:youtube|FGZ7jjzzelU|600|center|Webinar recording|frame}} == Lauterbach References ===
[[File:Logo Lauterbach.png|frame]]
This chapter article has been mainly written by the Lauterbach Italian branch office.
<u>Contact information:</u>
4,650
edits

Navigation menu