# Rust on the Swan!

**URL:** <https://discuss.blues.com/t/rust-on-the-swan/713>\
**Category:** Tools & SDKs\
**Created:** [March 3, 2022, 12:49pm UTC](https://discuss.blues.com/t/rust-on-the-swan/713 "2022-03-03T12:49:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gauteh](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.blues.com/gauteh/32/269_2.png) [@gauteh](https://discuss.blues.com/u/gauteh)\
**Post date:** [March 3, 2022, 12:49pm UTC](https://discuss.blues.com/t/rust-on-the-swan/713/1 "2022-03-03T12:49:40Z")

</div>

Hi,

The Swan can soon be programmed in Rust. The following pull-requests are still necessary:

- [Add stm32l4r5 by gauteh · Pull Request #703 · stm32-rs/stm32-rs · GitHub](https://github.com/stm32-rs/stm32-rs/pull/703)
- [Add support for stm32l4r5 by gauteh · Pull Request #292 · stm32-rs/stm32l4xx-hal · GitHub](https://github.com/stm32-rs/stm32l4xx-hal/pull/292)

with these two applied the following quick-start should work:

- [GitHub - gauteh/swan-stm32l4r5-quickstart: Rust quickstart for the Blues Swan (STM32L4R5)](https://github.com/gauteh/swan-stm32l4r5-quickstart)

for instance some [blinking and RTT printing](https://github.com/gauteh/swan-stm32l4r5-quickstart/blob/main/src/main.rs) or using [both I2C1 and I2C3](https://github.com/gauteh/swan-stm32l4r5-quickstart/blob/main/src/bin/i2c.rs), I2C3 is available without the Swan Carrier on pins A3 and D11.

The STM32L4 series already has a HAL, and it is now a matter of adapting and adding the R5 to devices to make it fully working.

You can even use RTT with the st-link probe through [probe-run](https://github.com/knurling-rs/probe-run). So if you also got the st-link from the blues shop you are ready to `cargo run` the project and watch RTT output on your machine.

([announcement tweet](https://twitter.com/gauteh/status/1497865381276434432))

I’ll post here when the pull request have been merged (hopefully). There is already a [Rust driver for the notecard](https://github.com/gauteh/notecard-rs) ([thread](https://discuss.blues.com/t/a-rust-driver-for-the-notecard/447)].

Regards, Gaute

---

<div class="post-metadata">

**Author:** ![bsatrom](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.blues.com/bsatrom/32/3_2.png) [@bsatrom](https://discuss.blues.com/u/bsatrom)\
**Post date:** [March 3, 2022, 12:55pm UTC](https://discuss.blues.com/t/rust-on-the-swan/713/2 "2022-03-03T12:55:32Z")

</div>

This is awesome, @gauteh! I look forward to taking this for a spin.

---

<div class="post-metadata">

**Author:** ![mcarpenter](https://avatars.discourse-cdn.com/v4/letter/m/47e85d/32.png) [@mcarpenter](https://discuss.blues.com/u/mcarpenter)\
**Post date:** [June 14, 2022, 8:01pm UTC](https://discuss.blues.com/t/rust-on-the-swan/713/3 "2022-06-14T20:01:58Z")

</div>

Swan support just got merged in [stm32-rs/stm32-rs](https://github.com/stm32-rs/stm32-rs/pull/740).

Working on getting swan support merged in the HAL next!
