back

Debugging Microcontrollers

If you suspend your transcription on amara.org, please add a timestamp below to indicate how far you progressed! This will help others to resume your work!

Please do not press “publish” on amara.org to save your progress, use “save draft” instead. Only press “publish” when you're done with quality control.

Video duration
00:39:05
Language
English
Abstract
Debugging and Profiling ARM Cortex-M microcontrollers with GDB and Python.

This talk gives you an overview of debugging ARM Cortex-M microcontrollers with a focus on the *practical* configuration and usage of the relevant tools.
In particular, I will present:

- Debug interfaces ([SWD](https://developer.arm.com/documentation/ihi0031/a/The-Serial-Wire-Debug-Port--SW-DP-)) and the associated debug probes ([J-Link](https://www.segger.com/products/debug-probes/j-link/), [STLink](https://www.st.com/en/development-tools/stlink-v3minie.html)) and libraries ([JLinkGDBServer](https://wiki.segger.com/J-Link_GDB_Server), [OpenOCD](https://openocd.org)).
- How to install and configure [arm-none-eabi-gdb(-py3)](https://developer.arm.com/Tools%20and%20Software/GNU%20Toolchain) for debugging your ELF.
- Commonly used [GDB commands and scripts](https://sourceware.org/gdb/onlinedocs/gdb/index.html).
- Advanced [GDB scripting via its Python API](https://sourceware.org/gdb/onlinedocs/gdb/Python.html).
- Inspecting [peripheral state](https://github.com/pengi/arm_gdb) with [CMSIS-SVD files](https://www.keil.com/pack/doc/CMSIS/SVD/html/index.html) and custom visualizations.
- Dynamic call stack tracing and graphing.
- Coredumping for post-mortem debugging via [CrashDebug](https://github.com/adamgreen/CrashDebug).
- [Remote GDB scripting](https://github.com/cs01/pygdbmi) via the [Machine Interface](https://sourceware.org/gdb/onlinedocs/gdb/GDB_002fMI.html).
- [ITM profiling](https://developer.arm.com/documentation/ddi0403/d/Appendices/Debug-ITM-and-DWT-Packet-Protocol?lang=en) over SWO pin using [Orbuculum](https://orbcode.org/orbuculum/).
- Thread/IRQ/Workqueue scheduling visualization and latency analysis using [perfetto](https://perfetto.dev).
- High-bandwidth [ETM tracing](https://developer.arm.com/documentation/ihi0014/) over TRACE pins: [J-Trace](https://www.segger.com/products/debug-probes/j-trace/) and [ORBtrace mini](https://orbcode.org/orbtrace-mini/).
- Interesting related projects and possible future work.

This talk is meant to introduce you to what is possible with embedded debug tools in practice, rather than to give you a comprehensive lecture.

Talk ID
camp2023-57321
Event:
camp2023
Day
4
Room
Milliways
Start
9 p.m.
Duration
00:45:00
Track
Milliways
Type of
Talk
Speaker
Niklas Hauser
Talk Slug & media link
camp2023-57321-debugging_microcontrollers
English
0.0% Checking done0.0%
0.0% Syncing done0.0%
0.0% Transcribing done0.0%
100.0% Nothing done yet100.0%
  

Work on this video on Amara!

English: Transcribed until

Last revision: 2 months, 4 weeks ago