liveBook · Manning

Knurling workflow

As explained in Embedded Software with Rust

Knurling is an ecosystem of tools and libraries for embedded Rust development, including flashing, logging, testing, and debugging workflows.

Knurling streamlines bare-metal Rust development with simpler project setup, faster firmware flashing, and ergonomic logging. It is optional: OpenOCD, GDB, and semihosting remain useful, especially for detailed hardware debugging. section 2.6 section 2.6.5

A typical workflow:

  • Install the tools and generate a project from the Knurling app template; configure it manually for the target microcontroller. section 2.6.2
  • Build, flash, and run firmware with probe-rs in one command, receiving structured logs over RTT. section 2.6.3
  • Use defmt for compact binary logging that supports frequent output in performance-critical code. section 2.6.3
Table 2.1 Knurling tools workflow benefits
Scenario Traditional Tools (OpenOCD, GDB, Semihosting) Knurling Workflow (probe-rs, defmt)

Rapid development iterations

Moderate speed, involves multiple manual steps

Very fast single-command workflow

Logging & debugging verbosity

Semihosting slower, more verbose setup

Efficient, structured, compact logging via RTT

Complexity

More complex initial setup, explicit tooling

Simpler, ergonomic, minimal configuration

Deep hardware-specific debug

More powerful for detailed investigation

Basic real-time logs, less suitable for deep HW analysis

Compare rapid iteration, logging, setup complexity, and deep-debugging trade-offs with traditional tools. section 2.6.5

How Embedded Software with Rust covers it

How deep it goes
Covers installation, project generation, and workflow trade-offs; defers advanced RTT debugging and profiling.
Examples
Uses cargo-generate with the app-template and compares single-command probe-rs runs with manual OpenOCD flashing.
What it assumes
Assumes cargo binstall is installed and leaves target-microcontroller configuration to be done manually.
What you can do after
Apply a streamlined firmware workflow using cargo-generate, probe-rs, RTT, and defmt.
How it connects
Connects probe-rs and defmt with RTT logging, and contrasts them with OpenOCD, GDB, and semihosting.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Embedded Software with Rust. The section links point to the parts of the book it draws on.