![The Rusty Bits](/img/default-banner.jpg)
- 10
- 209 512
The Rusty Bits
United States
Приєднався 16 лют 2023
Embedded software development in Rust 🦀
#rust #embedded #firmware
#rust #embedded #firmware
Blinking an LED: Embedded Rust ecosystem explored
Today we find several ways to blink an LED, and explore the various layers of abstraction within the embedded Rust ecosystem.
Chapters:
0:00 Intro
0:36 Peripheral Control
3:47 Unsafe Rust
6:13 Peripheral Access Crate
8:09 Hardware Abstraction Layer
10:56 Some(Rust)
14:00 Board Support Package
17:03 The Rusty.. Kit?
References:
ua-cam.com/video/TOAynddiu5M/v-deo.html
@letsgetrusty ua-cam.com/video/NDIU1GSBrVI/v-deo.html
"The Book" | doc.rust-lang.org/book/index.html
Special thanks to Patreon supporters!
- David King
Chapters:
0:00 Intro
0:36 Peripheral Control
3:47 Unsafe Rust
6:13 Peripheral Access Crate
8:09 Hardware Abstraction Layer
10:56 Some(Rust)
14:00 Board Support Package
17:03 The Rusty.. Kit?
References:
ua-cam.com/video/TOAynddiu5M/v-deo.html
@letsgetrusty ua-cam.com/video/NDIU1GSBrVI/v-deo.html
"The Book" | doc.rust-lang.org/book/index.html
Special thanks to Patreon supporters!
- David King
Переглядів: 15 123
Відео
Embedded Rust setup explained
Переглядів 74 тис.3 місяці тому
In this episode we get our development environment prepared for building bare-metal Rust projects. Follow along with your preferred editor & hardware as we begin our journey into the landscape of embedded Rust... Chapters: 0:00 Intro 1:03 Tooling 3:00 Hardware 4:10 Cross compiling 6:07 Bare Metal Rust 8:13 Dependency Management 12:55 Don't panic!() 14:46 Build & Flash 17:30 Debugging with RTT 1...
Moving from C to Rust for embedded software development
Переглядів 78 тис.4 місяці тому
Writing production-grade firmware is hard, but maybe we're making it harder than it needs to be. Join me in exploring some of the common pitfalls of embedded software development in C, and how Rust appears to be well-positioned to address these issues. Oh, and welcome to the channel! 👋 Resources: @letsgetrusty | ua-cam.com/video/usJDUSrcwqI/v-deo.html @NoBoilerplate | ua-cam.com/video/br3GIIQee...
Let's goo baby it's time to get some rusty
The video is awesome : it makes embedded rust fun to learn !
New the channel, subscribed immediately the moment you went “let’s have fun with this” 😂
Yes, we can emulate Rust enum with tagged unions in C/C++. Fun Fact: The option enum with a pointer can be automatically optimized because the null pointer can be used for the None variant
One consequence of that is that adding a variant to a public enum is a breaking change, unless you mark it with the non_exhaustive attribute (this is also true for structs with public fields, which can also be destructured with pattern matching). This is only a concern for library authors/maintainers, of course.
Good point!
You make it look too simple
This channel is a goldmine in my search for embedded content. I've been writing software for over 5 years and miss my early embedded career. I'd like to transition back and your videos are wonderful. Thank you and I look forward to future videos
Keep Ariane launch 501 in mind ! Overflows danger
I regularly crash code in dev which will just log an error
absolutely excellent presentation, both presentation and content...great for this old 'bare-metal' programmer/systems guy...(just how 'bare-metal' you can see from an IC that I co-designed..lp5523...check out the register maps on a 'simple' LED driver..btw, seems to have some Rust support!)
but, i do need to learn more Rust basics...back to the books!
As a decorated senior engineer, I'm ashamed. I don't know shit. That was a bit high level. Can't follow unless I have basics of embedded engineering.
If its uint8 like i think it is, should be 0 right?
Great topic, thanks 👍
I can't wait for the next tutorial, the are so great!
Does Rust have ranged integers? That’s the next level integer type. These were extremely useful when I looked at Ada many years back. Debug builds only, I suppose.
Kind of? Looks like it's currently only available in the nightly version of the compiler: docs.rs/ranged_integers/latest/ranged_integers/
That's the best kind of depends. [And I will admit that is one way that rust is better than C /C++]
well it may become it depends on the platform 😂
@@warguy6474 well no I do think it is objectively better to panic over something that could be unexpected behavior in a debug build, the fact that C++ compilers cannot do that is very much a point to rust. I say as an avid c++ developer
Whenever I watch your videos. It always inspires me to continue studying Embedded Rust Programming.
why you askin me
Fantastic information! Thank you!
Great channel !
I like to call the Rust safety as conciseness, because of the correctness of the code results.
this is why rust sucks
Great Introduction, I followed your guide and the setup was a piece of cake. I would love to learn from you, how to structure a bigger embedded project. Hopefully some with unit tests, that could also run partly on the Host system.
That looked weird
Useful for finding many obscure bugs though.
You found too many ways of blinking an LED and I found a great channel to follow!
Simple and easy follow Tutorial: Please make a tutorial on Embedded Debugging , thank you
Thank you for this great tutorial 🎉
what are you using to edit your videos? great work not only on the embedded side but also on the editing wow
Thanks! Currently using Final Cut Pro for video editing.
Congrats on the video, well paced, well explained. A suggestion, to make a risc-v version of this video.
It is so impressive that you show me a way to make it and give me the passions of starting learn rust. And could you help to create a new tutorial for how to rust embedded with raspberry cm4 or pi? Or could you just explain any differences between micro bits board and RPI board in your new video or shorts?
For Gentoo Linux users: to use gdb with embedded devices - enable the multitarget flag for dev-debug/gdb, then re-install. Invoke simply with gdb, and follow along with the instructions in the video. Everything else works as explained in the video and the "Errata" post.
I feel like I'm getting a little bit clever with every video.
I like your style, informative and relaxed :) This is also a bit of a nitpick but you're not allowed to bypass the borrow checker even in unsafe. For example casting a shared reference to a mutable reference through raw pointers is UB. Same for having multiple mutable references to the same variable, it's just not enforced like in safe Rust.
Ahh that makes sense, thanks for the feedback!
always preferable to use rust over c 😅 also new mic is sounding good.
And then there's people like me who were drawn to rust thanks to cargo :)
sir you need to post more videos this was so awesome, the first video ive watched in 1x speed and enjoyed every bit of it ig time for me to deep dive into rust
I was very lost between the concepts of embedded without knowing where to start and I came across this video. It's a revelation. And I skipped it at first because I can't stand those that appear on the screen for a long time, but luckily (because there are actually very few of them) I insisted again. Great exhibition. Thank you so much.
Thank you, looking forward to where you take this series.
Amazing
on windows, just do winget install rustlang.rustup
I really loved this video and I hope to see more from you soon :) One question: What is your workflow with music? Do you write it yourself or is there some nice software you use? Is it stock music that is just timed really well? Thanks!
All the music is from Epidemic Sound, for now at least.. I think I'm burning through some of their best content at an alarming rate 😅 I try to find songs that fit the mood of the chapter or just sound cool & help carry the story forward, and try not to reuse tracks between videos. Editing is done in Final Cut Pro. We'll see how long I can continue making videos this way, but for now I'm really enjoying how they turn out 😀
Thanks for sharing!! Id love to see async rust on embedded if possible
Hopefully next main channel video will cover async 😅
This is a masterful video, HIGHLY recommended if you want to start with embedded Rust.
Great content, and great production. The music is such a vibe
Thanks for the video. Was trying to follow the Rust book for Embedded Development and was already having issues. Your video helped a TON! Please keep up the good work.
Thanks to your introduction, I've been having fun in bare-metal rust
Have you heard of Zed by chance? It's made by the devs of Electron, Atom and tree-sitter, and it's written in Rust! They have a release version for Mac, but I'm still waiting on the Linux release. It's very new, so I would imagine there aren't as many third-party plug-ins available as vscode.
Yes Zed looks awesome! Going to have to give it a try some time..
@therustybits It would be really interesting to hear a little of your back story, like how you got interested in computers/programmers, what got you interested in embedded, that sort of stuff. It felt like I was kind of mindlessly learning programming without really knowing what I ultimately wanted to do. I'm still relatively new to programming. Once I discovered embedded, I absolutely fell in love with it. I'm now back in school for it and just finished my first semester while returning.
The production quality and the simple way you teach and explain things makes it such a great experience to watch and learn from your videos. This is too good 👌
I can't believe your earliest video is only 3 months old! The quality tells me you've been doing this for years, but I'm glad I caught this train just as it was leaving the station.
Good to know that crate to help on the stack overflow debugging