Baby oscilloscope! 💖
@benhencke brought their tiny SAOScope to the #Teardown2025 party at #PDX #hackersapce Ctrl-H last night! It can do 1 Ms/s at 12 bit. The knobs work including trigger! #Portland #Badgelife
@oshpark Also credit to @maketvee for the aesthetics! He did the case design, knobs, found the pots, and went with the dual color oled!
@benhencke @oshpark @maketvee This is super cool! I’m finally getting into (low-end F0,G0) STM32 after 20+ years of other MCUs. Any tips on doing STM32 on Linux/MacOS on command-line or is it best to use STM32CubeIDE?

@todbot

If you're au fait (or just curious) with Rust, I wrote a three part series on getting to blinky on an STM32F4 on Linux last year.

https://mikecoats.com/stm32-blinky-rust-part-1-hardware/
https://mikecoats.com/stm32-blinky-rust-part-2-debug/
https://mikecoats.com/stm32-blinky-rust-part-3-hal-blinky/

I then used what I learned there to build my "VanSpoof" project based on STM32G0.

https://mikecoats.com/tags/stm32/

https://codeberg.org/MikeCoats/van-spoof

STM32 to Blinky with Rust – Part 1 – Hardware – STM32F407G-DISC1

For around £20 you can buy a development board with an Arm Cortex M4 and some peripherals including an accelerometer, microphone, DAC, and USB OTG port. This documents my attempt to get a rust toolchain installed, connect the debugger and confirm it can see the ARM chip, ready for programming.

mikecoats.com
@mike Thanks, those are great! I’ve been eyeing Rust, enjoying the really well thought out support it has on STM32. I’m a C guy and wrapping my head around Rust is a whole other project. I’d really love it if there was something as clear as your series but using arm-gcc!

@todbot Fully on board with the “C guy eyeing Rust aesthetic”. I spend most of my time working out how to express my pointer based thinking into valid Rust statements. It takes a long time to break a decade’s worth of habit.

I’m getting there, but I’d imagine the Rust purists would be disgusted with my code!

@todbot @benhencke @oshpark @maketvee

I tend to keep STM32CubeIDE around for clues on hardware config, but otherwise use VS Code and the PlatformIO extension. It supports multiple frameworks for most STM32 chips, with LibOpenCM3 (quite low level) my favoured option for F4's. It is also possible to use STM's HAL/LL framework, it's tricky to make work initially, until you know what to pull across from CubeIDE in terms of MSP/BSP files, but I've had sucess with F4/F7/H7

@todbot @oshpark @maketvee Firmware for that is here: https://github.com/simap/SaoScope

My process is to use cubemx, figure out what pins do what, configure most of the basics, configure for LL drivers. Export as a cmake project, then use the STM32 vscode extension to import it.

Even the LL drivers are kinda bloaty, but not too bad. I usually go by the reference manual and datasheet, since that has the most information, then figure out what LL calls to make, or just poke registers as needed.

GitHub - simap/SaoScope

Contribute to simap/SaoScope development by creating an account on GitHub.

GitHub

@todbot @oshpark @maketvee
I've taken to putting the cube pinout in kicad, shrunk down inside the MCU symbol.

It's possible to use the chips without the LL drivers, just the peripheral headers, etc. but having a cube generated project with them is handy because there's a lot of little clocks and enable bits that have to get set that are easy to miss.

@todbot @oshpark @maketvee I don't do much on the cli, but I do run a little script for production flashing chips that can be seen here: https://www.youtube.com/watch?v=mRDbnhS1aow
stm32cube programmer

YouTube
@benhencke @oshpark @maketvee Thanks for the infodump! I’ve been using those cheapie STlink programmers for general SWD for so long, feels kinda weird to use them for actual STM32 hardware 😁