Skip to content

Peripheral access API for SAM L11 microcontrollers (generated using svd2rust)

Notifications You must be signed in to change notification settings

tarcieri/atsaml11xxx

 
 

Repository files navigation

atsaml11xxx

Peripheral access API for SAM L11 microcontrollers

(generated using svd2rust)

WIP

This crate is a work in progress. Building it either requires a xargo change or renaming the target spec due to the target naming convention used.

japaric/xargo#226

Usage

Building the blink example

RUST_TARGET_PATH=`pwd` xargo build --release --target thumbv8m.base-none-eabi --example blink

Programming blink example to FLASH on the SAM L11 XPLAINED dev board

First build and install edbg, SAM L11 support was recently added.

After building per the above section:

arm-none-eabi-objcopy target/thumbv8m.base-none-eabi/release/examples/blink target/thumbv8m.base-none-eabi/release/examples/blink.bin -O binary
edbg -t mchp_cm23 -e -p -f target/thumbv8m.base-none-eabi/release/examples/blink.bin

Running blink example out of RAM on the SAM L11 XPLAINED dev board

This requires RAM to be marked as executable, for help doing this see: https://github.com/dwelch67/atsaml11_samples/tree/master/ATSAML11

You will want to edit .cargo/config, change rustflags as follows, then rebuild.

rustflags = [
  "-C", "link-arg=-Tram.x",
]

This seems to only work with openocd 0.9, in one window run:

openocd -f saml11_xplained_openocd.cfg

In another:

arm-none-eabi-gdb target/thumbv8m.base-none-eabi/release/examples/blink

About

Peripheral access API for SAM L11 microcontrollers (generated using svd2rust)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 100.0%