#EmbeddedRust

2025-06-17

@tamme is speaking about the Rust Embedded Ecosystem at the online Rust on Embedded - Elektor Academy Pro Conference on 16 July 2025!

Early-bird tickets here: elektor.scoocs.co/public/event (until 18 June)

#rustlang #embeddedrust

2025-06-13

Curious about Rust on Embedded? Sign up for "Rust on Embedded", the upcoming online Elektor Academy Pro Conference on July 16th. Juraj Michálek from #Espressif will showcase #Slint, #BevyEngine and more running on Rust with no_std.

youtube.com/watch?v=N_PrevR02k

👉 elektormagazine.com/news/rust-

#rustlang #EmbeddedRust

H4kii the Posnaniesehakki@floss.social
2025-06-11

Lol, why adding rust vec! in completely logical part of program separated from ADC readout is causing malfunction 0 ADC readout lmao

#rust #Embedded #EmbeddedRust

2025-06-11

@diondokter's RustWeek talk 'Codegen your problems away - device-driver toolkit' was recorded and uploaded to YouTube. Watch it now: youtube.com/watch?v=xt1vcL5rF1

@rustnl
#rustlang #embeddedrust #rustweek

pedro 🍉ubik@fedi.turbofish.cc
2025-06-06

I wrote some ST7789 screen driver Rust code which just takes bytes from memory and flushes them into the screen. It seems to work but somehow the screen turns completely white less than one second after the memory write operation. This used to work fine, so I was wondering if maybe some other driver was interfering with the SPI, but nope, I disabled everything else and it still does that. I wrote a small test program which uses a different library to speak to the ST, and it works just fine. I am probably doing something wrong somewhere, BUT THEN WHY WAS IT WORKING OK BEFORE? I suspect some weird timing issues. Or maybe my driver code is being optimized by the compiler somehow, and things are not being done in the correct order?

I will probably plug in a logic analyzer tomorrow, but if anyone has any tips on how to debug it...

#st7789 #embeddedrust #embedded #rust #electronics

2025-06-01

I tried to run the embedded tutorial on my old v1. It failed, probably some linker settings are wrong, because I got SIGINTs immediately after start. Then I tried on the same board and most things we're working. I would like to do more with Rust, but is sometimes absurdly painful.

Wez Furlong :terminal:wez@fosstodon.org
2025-04-08

has anyone coaxed the #rp2350 into using PSRAM with embassy-rs? I couldn't find an obvious example in my searches this morning. I did find some arduino startup code that I can probably translate and adapt, but if someone has already done the heavy lifting, that would save me some effort! #rust #embeddedrust #rustembedded #pico2

Kymareaskymareas
2025-03-21

@orhun hi there! As a rustean, I love your project and it have inspired me to create a minitel based system. I have a question about Rust on ESP32 (I will read the dedicated book before starting the project). I haven't any experience with ESP32, so there is my question : is it possible to install your project will keeping the basic firmware of the Iodeo dongle?

2025-03-14

Omar Hiari is now presenting "The five pillars of Embedded Rust" at Rust In Paris.

#RustLang #EmbeddedRust #RustInParis

Omar Hiari
Richard Martin-Nielsenrmartinnielsen
2025-02-15

Oo, remember last week when I said I didn’t think I had a project I’d like to use to learn ?

I may have one - on an

Hm. I think I have the various bits around…

blog.logrocket.com/complete-gu

From: @rmartinnielsen
mastodon.social/@rmartinnielse

2024-12-16

Watch: @tamme presents 'Chips don't bite!' at RustLab 2024, giving 'a fearless introduction to µController programming for Rustaceans'!

youtube.com/watch?v=vtIovLsacj

#RustLab2024 #TechConference #RustLang #Rust #EmbeddedRust

2024-11-14

I'm struggling with some Rust confusion ... specifically, esp-hal::dma. How does one idiomatically allocate a DmaTxBuff in PSRAM? ... At this point, the compiler is happy, but the ESP32s3 just seems to hang.... All I want is some 800x480 display. Am I being greedy?

#rust
#EmbeddedRust
#ESP32

2024-11-11

@tamme presented 'Chips don't bite!' at RustLab 2024, giving 'a fearless introduction to µController programming for Rustaceans'!

Things were learned, enthusiasm shared, and pictures were taken!

Thanks to @rustlab for the photos.

#RustLab2024 #TechConference #RustLang #Rust #EmbeddedRust

Picture shows Tamme facing his audience at RustLab 2024.Picture shows Tamme on stage at RustLab 2024 with the title slide of Chips don't Bite behind him.Picture shows Tamme pointing to all kinds of every day devices that contain embedded software on chips.Picture shows Tamme giving his talk Chips don't Bite at RustLab 2024.
2024-11-08

@tamme is at RustLab 2024 in Florence, and will present "Chips don't bite! A fearless introduction to µController programming for Rustaceans" this Sunday!

rustlab.it/talks/chips-don-t-b

#RustLab2024 #RustLab #rust #rustlang #embeddedrust #rustprogramming

@rustlab

2024-10-30

Getting Started with CH32V003 Firmware in Rust

I have been working on a small project using the WCH CH32V003 and thought it would be fun to make a version of the firmware for it in Rust. I started by having a look around for hardware support and getting started guides. As it turns out, there is a HAL and hardware support by the ch32-rs project. Also, the chip is also supported by probe-rs (also see other posts tagged probe-rs). However, when it came to getting started guides, I found little other than the examples folder in the ch32-hal project. So here we are. I’m going to rely heavily on that examples folder, but provide the step-by-step guide I was missing.

TL;DR

Here is my blinky example project: https://github.com/albertskog/ch32v003-blinky-rust.

Hardware

I used CH32V003F4P6-EVT-R0 development board and the WCH-LinkE programmer. The steps below should also work for other boards, programmers and even other CH32V chips, but I haven’t tested any.

On the CH32V003F4P6-EVT-R0, connect PD6 to LED1. This connects the pin to the actual LED so we can control it later.

Between CH32V003F4P6-EVT-R0 and WCH-LinkE, connect:

VCC to 3V3
GND to GND
PD1 to SWDIO/TMS

0. Install Tools

First, we need to install Rust. If you came here, you probably already have (or can figure out how to do so).

We are also going to use probe-rs for uploading the binary to the device. There are different options for installing it depending on your operating system, see https://probe.rs/docs/getting-started/installation/

I’m on a mac so I went with:

brew tap probe-rs/probe-rsbrew install probe-rs

1. Project Setup

I learned we need to use Rust Nightly for some of the crates to work. I created a new project and set it up to use Nightly:

cargo new ch32v003-blinky-rustcd ch32v003-blinky-rustrustup install nightlyrustup override set nightly

We also need the source for the standard libraries in order to build core later on:

rustup component add rust-src

2. Add Configuration Files

We need a few different files to work with embedded devices.

The first is a target specification file. (Because Rust does not yet have built-in support for the RISC-V variant we need, RISCV32ec.) The file is called riscv32ec-unknown-none-elf.json and should be placed in the root of the project. I borrowed this one from the examples folder of ch32-hal:

{    "arch": "riscv32",    "atomic-cas": false,    "cpu": "generic-rv32",    "crt-objects-fallback": "false",    "data-layout": "e-m:e-p:32:32-i64:64-n32-S32",    "eh-frame-header": false,    "emit-debug-gdb-scripts": false,    "features": "+e,+c,+forced-atomics",    "linker": "rust-lld",    "linker-flavor": "gnu-lld",    "llvm-target": "riscv32",    "llvm-abiname": "ilp32e",    "max-atomic-width": 32,    "panic-strategy": "abort",    "relocation-model": "static",    "target-pointer-width": "32"}

riscv32ec-unknown-none-elf.json

Next, we need a Cargo configuration file. Create a folder called .cargo in the root of the project and in that folder, create a file called config.toml. This time, I started with the examples file but simplified as much as I could. Note that if you use a different chip, you may need to change the runner command.

[build]target = "riscv32ec-unknown-none-elf.json"[target.riscv32ec-unknown-none-elf]runner = "probe-rs run --chip ch32v003"rustflags = ["-C", "link-arg=-Tlink.x"][unstable]build-std = ["core"]

.cargo/config.toml

Finally, we add some dependencies and profile settings to Cargo.toml. The ch32-hal crate is not yet published, so we grab it directly from Github. Here, the chip used is selected as a feature. Qingke is the name of the RISC-V core used in the CH32V chips, if you were wondering. We also add some profile settings. Without these, I found the binary would not fit on the chip. It is possible to add them under a separate release profile as is done in the ch32-hal examples, but then we have to remember to add --release when uploading. I found this to be easier.

[package]name = "ch32v003-blinky-rust"version = "0.1.0"edition = "2021"[dependencies]panic-halt = "1.0.0"ch32-hal = { git = "https://github.com/ch32-rs/ch32-hal", features = [        "ch32v003f4u6",    ] }qingke-rt = "0.4.0"qingke = "0.4.0"embedded-hal = "1.0.0"[profile.dev]strip = falselto = trueopt-level = "s"

Cargo.toml

3. Write Main File

Now we should have everything set up in order to write our blinky program. Here is, again, a simplified version of the ch32-hal example program:

#![no_std]#![no_main]use hal::delay::Delay;use hal::gpio::{Level, Output};use ch32_hal as hal;use panic_halt as _;#[qingke_rt::entry]fn main() -> ! {    let config = hal::Config::default();    let peripherals = hal::init(config);    let mut led = Output::new(peripherals.PD6, Level::Low, Default::default());        let mut delay = Delay;    loop {        led.toggle();        delay.delay_ms(1000);    }}

src/main.rs

I took out some SDI print statements which i found made the code not run on my device. The binary would upload but the LED would not blink and no messages were printed. If I figure out why, I might add another note here!

4. Run

To compile and upload, simply run

cargo run

Project Files

This little blinky project is available on Github as a boilerplate and for future reference:

https://github.com/albertskog/ch32v003-blinky-rust

Hope this was helpful! 🦀

#CH32V #EmbeddedRust #Firmware #probeRs #RISCV

2024-09-20

Anyone looking for an #embedded engineer? Full time remote strongly preferred. #getFediHired

I am experienced with #EmbeddedC and, to a lesser degree, #EmbeddedRust and #EmbeddedJava. I even wrote JNI bindings for Java in Rust to call into Tock:OS. I have some recent experience with a very large C++ code base, but I wouldn't call myself an expert with it. I also have experience building test automation frameworks written in #Python and #Rust.

Oh, sorry for the edit spam. But I almost forgot to mention that I have extensive experience with the #RISCV architecture and instruction set.

Hemera :nixos: :ms_snow_leopard:Hemera@meow.social
2024-09-11

Writing some Rust on a pico with embassy and thus async/await really does feel like a superpower...

#rustlang #pico #embedded #embeddedrust

2024-09-04

Akira Moroo will now present "Firmware in Rust: More Than Just 'Rewrite It In Rust'"

#OSFC #OSFC2024 #RustLang #EmbeddedRust

Akira next to the title slide.
chfkch :nixos: :rust:chfkch@ruhr.social
2024-08-05

FML the #SSD1306 crate is not ready for async and the #oledasync does only support 1309.

#EmbeddedRust #RustLang #IOT

chfkch :nixos: :rust:chfkch@ruhr.social
2024-08-01

Finally i got #Embassy working on my #ESP32c6 in #NixOS. By now it should be over 95% reproducible. The last parts have to wait until i finished my day job.
The litte bugger now runs #EmbeddedRust #RustLang.

I will share the flake, which is mostly the oxilica/rust-overlay flake with the corrected toolchain and stuff like #RustAnalyzer and `cargo espflash`.

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst