#algorithm #atmel #flash #family #debug-probes #ram #sam3x #on-chip

bin+lib sam3x-flash

Flash algorithm for the Atmel SAM3X/A family

1 unstable release

Uses new Rust 2024

0.2.5 Dec 28, 2025
0.2.4 Dec 28, 2025

#6 in #family

LGPL-3.0-or-later

21KB
478 lines

sam3x-flash

A flash algorithm for the Atmel SAM3X/A family of Arm Cortex M3 based microcontrollers. Its big advantages over the stock Atmel algorithm are that it will allow probe-rs to properly reset the board after writing a program and that it defines a contiguous RAM region that represents the entirety of the on-chip RAM. The latter is required for probe-rs to instantiate RTT.

The generated algorithm and probe-rs compatible chip description file are located in the generated directory.

Dependencies

target-gen must be installed in your path via e.g. cargo install.

Usage

To use as-is with probe-rs set the --chip-description-path option to point at the appropriate YAML file in the generated directory.

To build an algorithm simply run cargo run --bin=VARIANT where VARIANT is the chip you're targeting. Supported variants:

  • sam3a4c
  • sam3x4c
  • sam3x4e
  • sam3a8c
  • sam3x8c
  • sam3x8e
  • sam3x8h

Unless you have a probe connected to your computer and to a supported device the build will "fail", but the ELF and YAML artifacts will be generated successfully. If you have a probe and target device connected its flash will be wiped per the algorithm.

The YAML artifacts for probe-rs are located in: target/. The Open-CMSIS-Pack compliant ELF artifacts for other tools are located in: target/thumbv7m-none-eabi/.

Dependencies

~4MB
~111K SLoC