I have a pretty good workflow.

It’s basically a cycle of:

  1. Determine where in the code I want to test
  2. Add function call that shows me bytes on the scope (drop gpio 2 and output byte in SPI bus)
  3. Build
  4. Burn flash (about a minute)
  5. Reset and grab trace
  6. Inspect scope output to see what the code did
  7. Make any necessary fixes

A lot of the uncertainty I had is dissipating with each successive change that brings me closer to having a working UART driver.