Skip to content

Instantly share code, notes, and snippets.

@esden
Last active September 17, 2020 15:26
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save esden/65cec5f8405f5b928a4ca4d3c9fe60a6 to your computer and use it in GitHub Desktop.
Save esden/65cec5f8405f5b928a4ca4d3c9fe60a6 to your computer and use it in GitHub Desktop.
Small gdb script to enable Black Magic Probe Target Power 'tpwr'.
#!/usr/bin/env arm-none-eabi-gdb -nx -batch -x
# The Black Magic Probe has level shifter buffers on its frontend,
# this gdb script enables Black Magic Probe target power,
# this is needed if you are not providing reference voltage from your target.
# Do not run this script or enable target power if you have VREF connected.
# The BMP side TPWR is connected to the 3.3V regulator of the Black Magic Probe
# and it has no protections, so don't fry your target or Black Magic Probe by
# being hasty and not thinking about what you are doing. :D
# do not ask me if I am sure
set confirm off
# This is for Mac OS X
#tar ext /dev/cu.usbmodemSERIAL
# This is for Linux
tar ext /dev/ttyACM0
# Print Black Magic Probe version
monitor version
# Enable tpwr
monitor tpwr enable
# Print tpwr status
monitor tpwr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment