Peripheral access API for SAM L11 microcontrollers
(generated using svd2rust)
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.
RUST_TARGET_PATH=`pwd` xargo build --release --target thumbv8m.base-none-eabi --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