st-util(1)

πŸ“¦
version 1.9.0 Β· 2 versions
  • 1.9.0 Β· alpine 3.24, arch rolling, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 1.7.0 Β· debian bookworm, epel 9, ubuntu jammy
, in alpine 3.24, arch rolling, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– st-util β€” the STM32 GDB server bestie πŸ’–

okay so real quick, this is st-util from the stlink manual (section 1), and bestie, if you're out here trying to talk to an STM32 chip, this is literally your girl. no cap. πŸ¦‹


✨ NAME ✨

st-util β€” run a GDB server so you can vibe (technically: interact) with an STM32 device. πŸ”₯


🌸 SYNOPSIS 🌸

st-util [<ARGS>...]

πŸ’… DESCRIPTION πŸ’…

So basically you're starting up a GDB server to hang out with an STM32 device. Under the hood it runs the main binary of the local package, which lives at src/main.rs. (yes bestie, Rust. iconic behavior. πŸ¦€)

If you don't tell it which port to use with the –listen_port option, it's gonna default to port 4242 β€” that's just the vibe it defaults to, periodt.

And Stlink version 2 is what you get by default, unless you specifically pass the –stlinkv1 option. that's it, that's the deal. πŸ’«


πŸŽ€ OPTIONS πŸŽ€

  • -h, --help β€” prints this message. the classic. the beloved. your bestie when you forget everything. 🫢
  • --version β€” prints version information. ✨
  • -v XX, --verbose=XX β€” pick a specific verbosity level, from 0 all the way up to 99. yeah, ninety-nine. go off. πŸ“’
  • -v, --verbose β€” just generally verbose logging, no specific number needed. she'll be chatty. πŸ’¬
  • -s X, --stlink_version=X β€” choose which version of stlink to use. defaults to 2. πŸ‘‘
  • -1, --stlinkv1 β€” force stlink version 1. old school, respect. πŸ’€
  • -p 4242, --listen_port=1234 β€” set the gdb server listen port. default port: 4242. 🌈
  • -m, --multi β€” puts the gdb server into extended mode, and st-util will keep listening for connections even after you disconnect. she's not going anywhere. πŸ’–
  • -n, --no-reset β€” do not reset the board on connection. 🚫
  • --semihosting β€” enable ARM Semihosting output on stdout. ✨

🧚 EXAMPLES 🧚

Run the GDB server on port 4500 and connect to it:

$ st-util -p 4500
$ gdb
(gdb) target extended-remote localhost:4500

see? three lines. ate. πŸ”₯


πŸ‘‘ SEE ALSO πŸ‘‘

st-flash(1), st-info(1)


This work is copyrighted. Stlink contributors. See the LICENSE file in the stlink source distribution.


and that's the whole page, bestie! this one came from the Open Source STMicroelectronics S... crew, dated Feb 2018, filed under st-util(1) in the stlink manual. go flash something cute. πŸ’…βœ¨