liveBook · Manning

Embed.toml

As explained in Embedded Software with Rust

Embed.toml is a project configuration file used by cargo-embed to specify embedded-target settings such as the chip, probe protocol, and enabled features.

Embed.toml is an optional, version-controlled project configuration file for cargo-embed. It collects settings for the target chip, probe, flashing, reset, RTT, and optional GDB support, reducing repeated command-line configuration. section 3.1.4 section 6.3.5

[default.general]
chip = "STM32F103C8T6"

[default.probe]
protocol = "Swd"
# speed = 4000          # kHz, omit to use the probe default

[default.flashing]
enabled = true

[default.reset]
enabled = true
halt_afterwards = false

[default.rtt]
enabled = true

[default.gdb]
enabled = false

A compact profile selects a chip and probe protocol, enables flashing and reset, and can enable RTT while leaving GDB disabled. section 6.3.5

Run cargo embed to use the default profile, or name another profile. A single-probe SWD setup can omit the probe section; include it when selecting among probes or using JTAG. Set halt_afterwards to pause at the reset vector after flashing when stepping through startup. section 6.3.5 section 6.3.5

How Embedded Software with Rust covers it

How deep it goes
Organizes settings into profiles and named sections, while deferring the complete schema to cargo-embed documentation.
Examples
Shows chip and SWD settings, flashing and reset options, disabled or enabled RTT, and optional GDB configuration.
What you can do after
Operate/configure cargo-embed to flash and reset firmware, open RTT logging, or enable a GDB server through project settings.
How it connects
Connects cargo-embed with probe-rs, RTT, GDB, and OpenOCD-based debugging workflows.

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.