Peripheral access API for SAM L11 microcontrollers
(generated using svd2rust)
This crate is a work in progress.
You'll need a recent Rust nightly
build. Add the thumbv8m.base-none-eabi
target:
$ rustup target add thumbv8m.base-none-eabi
Then use cargo to build the example:
$ cargo build --release --example blink
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
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