Debuggers available for ARM Cortex-M devices range from low end units which allow intrusive debugging by running to a breakpoint, to higher-end units which allow debugging without halting the CPU by using the ETM interface available in many ARM cores. This course describes the various debugging and code profiling techniques available by using a KeilULINKpro debugger with an ARM Cortex-M device which supports ETM.
Initially 1/2 day with plans to extend it to one day in the future
Who should Attend:
Engineers who are developing firmware for ARM Cortex-M3, M4, M7 and M33 devices.
Attendees should be familiar with developing firmware in C for any embedded device.
Software Tools and Hardware Requirements:
Keil MDK-ARM uVision5 IDE, KeilULINKpro debugger and Nordic nRF52 PCA10040 development board.
Attendees will have the skills to use the various debugging and code profiling techniques available when using a ULINKpro debugger and a compatible Cortex-M micro with ETM capability. Using these techniques should reduce the time required to find certain program bugs and also to perform code profiling and other analysis which will aid in finding bugs that may not otherwise be seen before product release.
- Describe what is covered in this course on ULINKpro trace techniques Coresight Technology
- Describe Coresight features and capability
- How to connect ULINKpro to the target hardware
Connecting to the target
- Use 20 pin Cortex debug+ETM connector
Configure Cortex-M device for tracing
- Enable 4-Pin Trace (ETM)
- Enable Trace port interface
- Invasive debugging – usually has a great effect on program flow
o Program halting, single stepping
o Data watchpoints
o Internal registers
o Debug monitor exceptions
- Non-invasive debugging – has little or no effect on the program flow o On the fly memory and peripheral access
o Instruction trace
o Data trace
o Software generated trace
Code and Data Trace
- Trace Features
- Tracepoint expressions
ETM Instruction Trace using KeilULINKpro and Blinky
Configuring the ETM example
Connecting a ULINKpro to the target
Configure ETM Trace in μVision
Compile, RUN and View the ETM Instruction Trace
Finding the Trace Frames you are looking for
Instruction Trace Triggers and Data Trace Triggers
Setting Trace Triggers: Capture only the frames you want
Performance Analysis (PA):
In-the-Weeds Example: A most important feature of ETM Trace ETM Trace Summary
Using Cortex-M3/M4/M7 Fault Exceptions