---
title: "Discussion on \"STM32F4 Embedded Rust at the PAC: svd2rust\" | Hashnode"
description: "Discussion on \"STM32F4 Embedded Rust at the PAC: svd2rust\". Introduction\nWhen I set out on learning embedded Rust, I recall one of my struggles is material spanning multiple abstraction levels. As might be known in embedded Rust, the abstraction level sitting"
url: "https://hashnode.com/posts/stm32f4-embedded-rust-at-the-pac-svd2rust/63e16f7894f99578f80698d4"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [STM32F4 Embedded Rust at the PAC: svd2rust](https://blog.theembeddedrustacean.com/stm32f4-embedded-rust-at-the-pac-svd2rust?utm_source=hashnode&utm_medium=feed)

Introduction When I set out on learning embedded Rust, I recall one of my struggles is material spanning multiple abstraction levels. As might be known in embedded Rust, the abstraction level sitting

Feb 6, 2023 · 7 min read · blog.theembeddedrustacean.com  
Updated Jul 30  
Read the article

-   [#rust](https://hashnode.com/tag/rust)
-   [#embedded](https://hashnode.com/tag/embedded)
-   [#iot](https://hashnode.com/tag/iot)
-   [#tutorial](https://hashnode.com/tag/tutorial)

## Written by

[Omar Hiari](https://hashnode.com/@omarhiari)

@omarhiari

  
[View profile](https://hashnode.com/@omarhiari)

I am an 📟 Embedded Engineer with years of experience in both industry 🏭 and academia 🏫. Passionate Mentor 👨‍💼 and Instructor 👨‍🏫. Rustacean 🦀

## Responses 1

Markdown supported · ⌘↵ to post

[modongzhi](https://hashnode.com/@dongzhi)

[Jul 12, 2023](https://hashnode.com/posts/stm32f4-embedded-rust-at-the-pac-svd2rust/63e16f7894f99578f80698d4/comment/64ae419f241a6654f37fe6ea)

and how to create PAC for RISCV?

[Omar Hiari](https://hashnode.com/@omarhiari)

[Jul 12, 2023](https://hashnode.com/posts/stm32f4-embedded-rust-at-the-pac-svd2rust/63e16f7894f99578f80698d4/comment/64ae419f241a6654f37fe6ea#reply-64ae4338241a6654f37fe777)

Hello [modongzhi](https://hashnode.com/@dongzhi) and thanks for reading! I haven't done it for a RISC-V device, however, as long as you have an SVD file the steps are the same. There only might be slight differences in step 4 including the dependencies, which you need to resort to the documentation [here](https://docs.rs/svd2rust/latest/svd2rust/) where it tells you what to change.

[modongzhi](https://hashnode.com/@dongzhi)

[Jul 12, 2023](https://hashnode.com/posts/stm32f4-embedded-rust-at-the-pac-svd2rust/63e16f7894f99578f80698d4/comment/64ae419f241a6654f37fe6ea#reply-64ae4645241a6654f37fe824)

[Omar Hiari](https://hashnode.com/@omarhiari) thanks for help! I create STM32's PAC follow the steps in that documentation,it can work. when for RISCV,I have try follow that documentation to add dependencies,but when build,lots of errors.

[Omar Hiari](https://hashnode.com/@omarhiari)

[Jul 12, 2023](https://hashnode.com/posts/stm32f4-embedded-rust-at-the-pac-svd2rust/63e16f7894f99578f80698d4/comment/64ae419f241a6654f37fe6ea#reply-64ae47d83b8f3a606b0ddce7)

[modongzhi](https://hashnode.com/@dongzhi) There could be a variety of reasons for that. It depends on the errors you are seeing. I would recommend providing more detail on what you have done and the errors you are seeing and seeking help on one of the different Rust outlets. Depending on the specific device you have the SVD for, there could be a matrix channel for it. If not, you can resort to the embedded working group channel or the discord server for embedded.
