Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Fetching latest commit…
Cannot retrieve the latest commit at this time.
|Failed to load latest commit information.|
Black Magic Trace Extention for GDB (MagicTPA) Copyright (C) 2012 Black Sphere Technologies Ltd. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is an experimental extension to GDB providing trace support on ARM Cortex-M microcontrollers with the Black Magic Probe. It is still very experimental and may not be useful. It is provided for the brave ones who are keen to hack at it and improve it. Firmware support is provided by the Black Magic Probe: https://github.com/gsmcmullin/blackmagic.git To install, copy the magictpa directory from here to your GDB python directory '<prefix>/share/gdb/python'. MagicTPA can be tried out and worked on without installing by adding the repo directory to your PYTHONPATH environment variable. To load the extension from GDB, use the command 'python import magictpa'. The correct sequence must be followed: ### .gdbinit example ### set target-async on set mem inaccessible-by-default off target extended-remote ... monitor swdp_scan attach 1 python import magictpa ### end of example ### The following GDB commands are added by the module to provide trace: set tpa speed <speed> -- Sets the trace port speed. Written to TPIU_ACPR on target. set tpa log <file> -- Record decoded trace events to <file> set tpa echo (on|off) -- Write decoded trace events to stdout when logging. set tpa gate (on|off) -- Only process trace events when the target is running. set tpa rawfile <file> -- Record raw (binary) trace stream to a file. set tpa time (off|host|delta) -- Timestamping to use for recording events. tpa watch <var> [pc] -- Trace changes to variable. tpa delete <n> -- Remove trace source <n>.