Skip to content

gsmcmullin/magictpa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 

Repository files navigation

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>.

About

Trace port extention for GDB

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages