Debugging Microcontrollers (camp2023)

Published: Aug. 18, 2023, 7 p.m.

b'Debugging and Profiling ARM Cortex-M microcontrollers with GDB and Python.\\n\\nThis talk gives you an overview of debugging ARM Cortex-M microcontrollers with a focus on the *practical* configuration and usage of the relevant tools.\\nIn particular, I will present:\\n\\n- 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)).\\n- How to install and configure [arm-none-eabi-gdb(-py3)](https://developer.arm.com/Tools%20and%20Software/GNU%20Toolchain) for debugging your ELF.\\n- Commonly used [GDB commands and scripts](https://sourceware.org/gdb/onlinedocs/gdb/index.html).\\n- Advanced [GDB scripting via its Python API](https://sourceware.org/gdb/onlinedocs/gdb/Python.html).\\n- Inspecting [peripheral state](https://github.com/pengi/arm_gdb) with\\xa0[CMSIS-SVD files](https://www.keil.com/pack/doc/CMSIS/SVD/html/index.html) and custom visualizations.\\n- Dynamic call stack tracing and graphing.\\n- Coredumping for post-mortem debugging via [CrashDebug](https://github.com/adamgreen/CrashDebug).\\n- [Remote GDB scripting](https://github.com/cs01/pygdbmi) via the [Machine Interface](https://sourceware.org/gdb/onlinedocs/gdb/GDB_002fMI.html).\\n- [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/).\\n- Thread/IRQ/Workqueue scheduling visualization and latency analysis using [perfetto](https://perfetto.dev).\\n- 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/).\\n- Interesting related projects and possible future work.\\n\\nThis talk is meant to introduce you to what is possible with embedded debug tools in practice, rather than to give you a comprehensive lecture.\\nabout this event: https://pretalx.c3voc.de/camp2023/talk/BQF8TR/'