st-info
Display information about ST-Link programmers
TLDR
Display amount of program memory available
Display amount of SRAM memory available
Display summarized information of the device
SYNOPSIS
st-info [options]
PARAMETERS
-h, --help
Display a help message with available command-line options and exit.
-v, --version
Display the version information of the st-info program and the underlying stlink library, then exit.
--probe
Retrieve and display detailed information specifically about the connected ST-Link debug probe, such as its firmware version, serial number, and product ID. This is often the default behavior if no other action is specified.
--serial <serial_number>
Specify the unique serial number of a particular ST-Link device to query. This option is useful when multiple ST-Link probes are connected to the host system simultaneously.
--debug
Enable verbose debug output. This provides more detailed logging information that can be helpful for troubleshooting connectivity or communication issues.
--devices
List all detected ST-Link devices currently connected to the host system, showing their serial numbers and basic identification.
--voltage
Display the measured target voltage of the connected microcontroller. This helps in verifying the power supply to the target device.
--opt-baudrate <kHz>
Set the SWD (Serial Wire Debug) clock speed in kilohertz for communication with the target microcontroller. This can be adjusted for compatibility with different targets or cable lengths.
DESCRIPTION
The st-info command is a crucial utility within the stlink open-source toolset, designed for interacting with ST-Link debug probes. Its primary function is to retrieve and display comprehensive information about an attached ST-Link device, as well as the target microcontroller it is connected to. This includes the ST-Link's unique serial number, its firmware version, the JTAG/SWD protocol version in use, and the measured voltage of the target board.
It serves as an essential first step for verifying ST-Link connectivity, diagnosing setup issues, and ensuring compatibility before proceeding with flashing new firmware or debugging an STM32 microcontroller. Developers frequently use st-info to confirm that their debugger is recognized and functioning correctly, providing vital details for troubleshooting. It's a cross-platform tool commonly used on Linux, macOS, and Windows systems.
CAVEATS
- USB Permissions: On Linux, non-root users typically require specific udev rules to gain access to USB-based ST-Link devices. Without these, commands like st-info may report 'Permission denied' errors or fail to detect the probe.
- Device Connectivity: The ST-Link probe must be physically connected to the host computer via USB. For target-specific information (e.g., voltage), the probe's SWD/JTAG interface must also be correctly wired to a powered STM32 microcontroller.
PERMISSIONS ON LINUX
For st-info and other stlink tools to operate correctly for non-root users on Linux systems, proper udev rules must be in place. These rules, often provided with the stlink package installation (e.g., in /etc/udev/rules.d/), grant read/write access to the ST-Link USB device. Without them, you might encounter 'Access denied' errors or the inability to detect connected probes, even if they are physically present.
PROBE AND TARGET CONNECTION
While st-info can list detected ST-Link probes even without a target microcontroller connected, some information (like target voltage) requires the probe's SWD/JTAG interface to be properly connected to a powered STM32 device. Ensure the target board is powered on and correctly wired to the ST-Link probe for complete information retrieval.
HISTORY
The stlink project, which includes st-info, began as an open-source community effort to provide cross-platform tools for interacting with ST-Link debug probes, serving as an alternative to STMicroelectronics' proprietary software. Developed by embedded systems enthusiasts and engineers, its goal was to offer flexible command-line utilities for STM32 microcontroller development. st-info emerged as a fundamental diagnostic tool within this suite, enabling quick verification of ST-Link connections and essential device information. Its development has evolved alongside the broader stlink library, continuously improving probe detection, firmware compatibility, and overall feature support.