Skip to content
This repository has been archived by the owner on Jun 9, 2024. It is now read-only.

A collection of Rust crates for the SAM3X/SAM3A family of microcontrollers

License

Notifications You must be signed in to change notification settings

inferiorhumanorgans/sam3x8e-rs

Repository files navigation

Build Status

SAM3X8E

This repository contains crates to support rust on the Atmel SAM3X8E and related microcontrollers in the SAM3X/SAM3A family.

What is the SAM3X8E?

The Atmel SAM3X8E is an ARM Cortex M3 based microcontroller. It includes 512 kilobytes of flash memory, 100 kilobytes of SDRAM, and can be run at up to 84 MHz. The SAM3X8E is most commonly found in the Arduino Due.

What's included in the box?

The included crates are designed with the interfaces and goals of the rust-embedded team in mind. As the Embedded Rust Book states:

Embedded Rust is for everyone who wants to do embedded programming while taking advantage of the higher-level concepts and safety guarantees the Rust language provides

The following crates are included:

Using the sam3x8e-hal crate should allow code to be more easily ported between different microcontrollers, for example moving from a SAM3X board to an STM32 based board.

What's the catch?

There's no catch. All code is available freely under the GNU Lesser GPL version 3.0 or later.

How do I get started?

The examples can be built with cargo, e.g. cargo build --examples.

Deployment is typically going to involve some board specific actions. For instance the Arduino IDE uses bossac to deploy to the Due. bossac (and likely other deployment tools) use an unstructured binary file as input, however rustc will generate an ELF file. To generate the proper unstructured file, objcopy from GNU binutils can be used like so: arm-none-eabi-objcopy -O binary {IN_FILE} {OUT_FILE}

For building your own projects the cortex-m-quickstart template is a good place to start. The SAM3X/SAM3A family are all Cortex M3 based so the correct architecture is thumbv7m-none-eabi. The linker script at the root of this crate should work.

About

A collection of Rust crates for the SAM3X/SAM3A family of microcontrollers

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages