Embedded Rust setup explained

  Переглядів 68,625

The Rusty Bits

The Rusty Bits

День тому

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
19:42 Debugging with gdb
22:29 Conclusion
22:54 The Rusty Bandit
References:
Install Rust | www.rust-lang.org/tools/install
Microbit v2 Product Spec | tech.microbit.org/hardware/
Rust Platform Support | doc.rust-lang.org/beta/rustc/...
nRF52833 Data Sheet | infocenter.nordicsemi.com/pdf...
Crates Registry | crates.io/
Arm GNU Toolchain | developer.arm.com/downloads/-...
"The Book" | doc.rust-lang.org/book/index....
FAQ:
Terminal setup:
- JetBrainsMono Nerd Font : www.nerdfonts.com/font-downloads
- Oh-My-Z : ohmyz.sh/
- alias ls='colorls'
- Powerlevel10k theme : github.com/romkatv/powerlevel10k
- zsh-autosuggestions : github.com/zsh-users/zsh-auto...
- zsh-syntax-highlighting : github.com/zsh-users/zsh-synt...
See @typecraft_dev : • How to setup your Mac ...
Playlist:
(All via Epidemic Sound)
Chasing Snakes - Martin Landstrom
Revving - Martin Landstrom
Before Chill - Yomoti
Still on My Mind - Sarah, the Illstrumentalist
Rich and Thick - spring gang
Sorvete de Limao - Martin Landstrom
Will of Minds - Magnus Ringblom
Disc Me Bro - Basixx
Simple Pleasantries - Arthur Benson
Deep Space Samurai - Forever Sunset

КОМЕНТАРІ: 394
@therustybits
@therustybits Місяць тому
VIDEO ERRATA Forgive me audience, for I have erred... ERRORS - 13:52 : The compiler is not actually inserting the panic during the array-access-by-index bounds checking... It's actually the `Index` trait implementation on arrays and slices that will perform the bounds-check logic and invoke the panic macro if necessary. Thanks to @werecatOmega for pointing this out! - 16:07 : The standalone `cargo-embed` crate is no longer being updated, as this tool is now part of `probe-rs`. Once `probe-rs` is installed, `cargo embed` should work as shown in the video, with the exception that the `--list-chips` option is now available via `probe-rs chip list`. Apologies for the confusion, and thanks to @12rjig13gb and @therealjpster for the heads up! See `probe-rs` installation: probe.rs/docs/getting-started/installation/ OF NOTE - 5:19 : This series will primarily focus on the 'microcontroller' subset of bare-metal hardware, but for those working with application-class SoCs, @pppgggr notes that the 64-bit Arm v8-A architecture is listed on the Rust platform support page under the `aarch64` target arch. OMISSIONS - 5:00 : The nRF52833 has a floating-point unit (FPU), and this is why we opted for the "hard-float" bare-metal target variant of the Arm v7E-M core architecture (thumbv7em-none-eabihf) - Linux folk : I forgot to include a step prior to connecting your hardware to modify udev rules so you don't need to use sudo to access it.. Please check out: docs.rust-embedded.org/discovery/microbit/03-setup/linux.html#udev-rules - Yes, I am aware of the probe-rs VS Code plugin, and it does look great! I was somewhat conflicted when making the video whether to present the probe-rs + VS code plugin or the "half-way" solution of pairing `cargo embed` with GDB... I figured the `cargo embed`/GDB route might be more helpful for those using a different editor, and/or already used to debugging in GDB. The probe-rs VS Code plugin looks amazing, though by their own admission it's currently in a preproduction/alpha stage: I did try it out, but found the disassembly for my code was jumbled, with some instructions showing up out-of-order, which could leave a newcomer a bit confused... Regardless, I know the probe-rs team is working hard on it, and it definitely has the potential to be the best solution for embedded debugging (plus its Rust all the way down!), so there will be a dedicated video on getting it set up in the future.
@robert36902
@robert36902 Місяць тому
22:35 "If you found anything in this video useful" - This is clearly wrong. EVERYTHING in this video is useful. It's disgustingly good. It's a very complicated subject that deserves many hours of explanation, but you've somehow managed to condense the important bit into a fantastic video!
@simsim0228
@simsim0228 Місяць тому
This series will be where I finally learn rust
@cdgonepotatoes4219
@cdgonepotatoes4219 Місяць тому
What I was also thinking. This type of application is closest to what I'm studying for
@neekonsaadat2532
@neekonsaadat2532 Місяць тому
Yep, easy to tell this series is going to be an instant classic. Also looking forward to this series!
@shivashankar28
@shivashankar28 Місяць тому
Same here I was ringing the same
@TheMisterSpok
@TheMisterSpok Місяць тому
This is the most concise and to-the-point embedded rust video I've ever watched. Bravo!
@isfandyar3797
@isfandyar3797 Місяць тому
please dont stop this series i want to learn rust for embedded rather than c++ because rust is future in next 10 yrs
@alaamroue
@alaamroue Місяць тому
Just like Go was the future
@kippie80
@kippie80 Місяць тому
Go and rust complement each other very well.
@Cobalt985
@Cobalt985 Місяць тому
@@alaamroue rust is literally endorsed by the white house, it's not going away buddy
@RiwenX
@RiwenX Місяць тому
@@alaamroue Go is a garage collected language, Rust is not. With the release of embedded HAL 1.0, I think it's justified to get excited about the prospect of embedded Rust going mainstream.
@ryanbrownie4634
@ryanbrownie4634 Місяць тому
This series will be responsible for a next gen of Rust embedded developers . I Love this 🤖
@therustybits
@therustybits Місяць тому
The embedded Rust revolution will be televised 🦀🦾
@spacebunsarah
@spacebunsarah 23 дні тому
It very well could be! Hoping to follow along for the ride. Who knows, might even be me
@MrScorpianwarrior
@MrScorpianwarrior Місяць тому
I have no use for this, I have never written for an embedded machine, but boy do I love your style of content. You go into just the right amount of detail to keep me engaged, and I love learning about this sort of thing.
@mikkelens
@mikkelens Місяць тому
This is incredible! I have been searching for this exact series for the last 2 years! No other embedded rust videos are anywhere near as accessible as this, and I'm very excited to see where this goes. Actually showing the "dumb" steps like how to look up the architecture for a basic microcontroller is super essential for not losing people like me who have only touched external-chip development through something like the Arduino IDE or PlatformIO in some primitive C-like language. I finally have a reason to dust off my bootleg Uno device without having to find out of date oversimplified tutorials, downloading sketchy firmware or going using giant vscode extensions.
@MegaDuncz
@MegaDuncz Місяць тому
Love your work, informative, interesting and professionally edited, hope the channel blows up!
@jorgegomezreus7019
@jorgegomezreus7019 Місяць тому
Best video about embedded rust I've seen, please continue this awesome series!
@munzrs
@munzrs Місяць тому
The quality of this video is just insane. The editing is crisp. The writing makes it so clear. The pacing is quick, but not overwhelming. The scope of the topic allows going into the perfect amount of detail of each item for a beginner. The music... it's perfect. It's so clean and classy. It matches the tone of the vocals and topic so well. The most obvious sub I've ever made.
@Dygear
@Dygear Місяць тому
I consider this to be the missing Rust Embedded Tutorial. Great job!
@osalem192
@osalem192 Місяць тому
This channel is gonna be one of my favourites, keep hardworking on 🔥
@sudman08
@sudman08 Місяць тому
Amazing, This is beyond any tutorial / learning thing that I have ever came across, 20 mins felt like 2, I think am going to be a rust dev because of this series. Keep it up 🔥
@SibylDark
@SibylDark Місяць тому
8:50 Oh brother! Seriously though, really great and methodical walkthrough. Good for newbies too, I think a lot of us in embedded space assume everyone has intimate knowledge of linkers, memory maps, ISAs, vector tables, etc. thet you pick up along the way doing embedded dev. Its great to hear these things explained in context with Rust.
@iyadelwy1500
@iyadelwy1500 Місяць тому
You Absolutely Positively HAVE to continue this series!🔥
@nahfamimgood
@nahfamimgood Місяць тому
This video couldn't come at a better time. excited for the series!
@radoslavdanev9556
@radoslavdanev9556 Місяць тому
Great video! Great balance between new info and knowledge of Rust. I'm looking forward for next one.
@H3MAESSAM
@H3MAESSAM Місяць тому
Amazing video, just ordered the board and planning to follow along with this series. Please keep the awesomeness coming 🎉
@ViniciusSoaresBatista
@ViniciusSoaresBatista Місяць тому
This is amazing. From the content to the visuals, sound…you nailed it!
@TeamDman
@TeamDman Місяць тому
Insanely good resource. Covers many things I wouldn't have even guessed at. Thank you for this!
@lucasviana7663
@lucasviana7663 Місяць тому
Loved this video! It really gets me hyped for the series. You did an awesome job explaining things in a way that's super easy to follow. Keep it up!
@Yannick-ei2tz
@Yannick-ei2tz Місяць тому
A very good start. Plus I love the jazz loops behind. Please go ahead !
@johncoleman5666
@johncoleman5666 Місяць тому
Enjoying the series so far, looking forward to what's to come.
@phillipassmann9959
@phillipassmann9959 Місяць тому
Really great explanations, concise and not oversimplified. Also good editing work! Will definitely follow for more updates
@arcowo
@arcowo Місяць тому
I love how you write your scripts, the words you use, and your voiceovers/narration. Very easy to listen to!
@sciencelab4225
@sciencelab4225 Місяць тому
Oh wow this is absolutely what I need to get started with embedded Rust! Thank you so much for this awesome content!
@mytrant
@mytrant Місяць тому
You enjoy this work and it shows! Great listening and learning
@user-si1md7qt5f
@user-si1md7qt5f Місяць тому
Loving the tempo and quality of production and content, really professional. Thanks @therustybits, looking forward to watching more content!
@Ramiprops
@Ramiprops Місяць тому
Absolutely incredible video. All other embedded rust videos are so clunky, but yours is so streamlined. Will recommend this video to people for sure.
@maxlee3838
@maxlee3838 28 днів тому
I love that you share and point out all the issues you run into along the way. Very enjoyable format.
@lenninlc
@lenninlc Місяць тому
Fantastic tutorial! Looking forward to your next video 🎉
@emnul8583
@emnul8583 Місяць тому
I really enjoyed the thorough explanation of the purpose of all the different packages and tooling.
@Nik930714
@Nik930714 Місяць тому
The best "all in one place" tutorial I've seen for embedded Rust. I'm looking forward to future videos from you.
@jayedr8728
@jayedr8728 Місяць тому
this is the most useful embedded rust video i watched to date, thank you very much, please continue on this series, liked and subscribed!
@pabloqp7929
@pabloqp7929 Місяць тому
Music and production is top notch. You're gonna crush it with this quality kudos!
@code_poseidon
@code_poseidon Місяць тому
Amazing content, this is the kind of video about Rust on bare metal that UKposts was needing, this series will be Incredible! 🚀
@a_tabaza
@a_tabaza Місяць тому
You are good, very good! These videos are excellent, and how much effort and passion went into them SHOWS
@TomazKompara
@TomazKompara Місяць тому
I have been planning to get started with Rust for embedded systems for quite some time now. I am looking forward to the next video. I can't believe this is your second video and it is already top-notch. Keep up the good work!
@frroossst4267
@frroossst4267 Місяць тому
Been looking for this kind of content for a while! Thanks much! Keep going strong!
@Ztaticify
@Ztaticify Місяць тому
I played around with embedded rust about 4 years ago and i have to say it's come a long way. Great tutorial
@michaelashby9654
@michaelashby9654 Місяць тому
Best video I've seen on this topic. Well done.
@tanmay______
@tanmay______ Місяць тому
You just gave me the motivation to start learning rust. Trying it embedded will surely be a nice challenge!
@kalvinpearce
@kalvinpearce Місяць тому
Just came across your channel, and I love it. I already use Rust for applicaitons and webserver dev at work but I love the idea of learning Rust for the embedded space too. Keen to see where this series goes. You've got a great style already and balancing that sweet spot of engaging and informitive
@teemo_fpv
@teemo_fpv Місяць тому
such a nice and clear way to explain stuff! love your videos definetly will learn rust with this series ❤
@lmmlStudios
@lmmlStudios Місяць тому
Astounding. I was trying to search for this a couple months ago but could only find years-old articles that were impossible to follow. This is perfect
@FedynaPavlo
@FedynaPavlo Місяць тому
Apart from the content, I adore the quality, the style and the effort put into the video. Love it!
@felixman9691
@felixman9691 Місяць тому
Wow thanks so much for making this! I haven’t followed along on a board of my own yet, I have a few things going on right now and can’t split my attention to far, but I will asap. I don’t have a portenta yet, but one of my designs would really benefit from a portenta h7 with its huge number of pins. I’m so excited for more of your videos. You are very clear and have a good mind for what subjects to cover. Can’t thank you enough.
@dmatking2000
@dmatking2000 Місяць тому
Love this video! I have the microbit v2 and everything worked perfectly. Can't wait for more.
@justinw6978
@justinw6978 Місяць тому
Very excited for the rest of this series! 🥳 Subscribed 💪
@beeesy4268
@beeesy4268 Місяць тому
Great tutorial, thanks a lot! So far I only used only C for my projects but now that I‘ve seen your two videos I’m exited to try out embedded rust. I’m looking forward to your next videos as they are well structured and generally super high in quality so far.
@themecatronicaproject1670
@themecatronicaproject1670 Місяць тому
Thank you for releasing these videos! I am looking forward to learn rust and microcontrollers might be the way to start.
@macmoholic6283
@macmoholic6283 Місяць тому
Woo! I've been waiting for the next video to hit my home page. Thanks for this!
@abbadon2741
@abbadon2741 Місяць тому
This is perfect! I read the rust embedded book and got up and running in a few hours, but this is so much better and concise. Please keep these quality videos coming :)
@markay7311
@markay7311 Місяць тому
As a system security researcher trying to dive into embedded systems, this video has been like music to my ears!
@j-p-d-e-v
@j-p-d-e-v 18 днів тому
The calmest rust development video I ever watched. Great Content!
@MrBrown78
@MrBrown78 Місяць тому
Always wanted to get into embedded programming and Rust... I love you!
@quasarpulsarspark
@quasarpulsarspark Місяць тому
Very nice and informative video, thank you. Please continue this series.
@huso7796
@huso7796 Місяць тому
Been on the hunt for Rust-embedded tutorials and it felt like a ghost town. Then I found your stuff - exactly what I was looking for. Huge thanks!
@BjarneSvanberg
@BjarneSvanberg Місяць тому
I have been eyeballing Rust for embedded systems for far too long. This is just what I need. Love that the information is so dense. Good format. Keep it up 😃👍
@Just_Browsing-cz4nt
@Just_Browsing-cz4nt Місяць тому
Quite literally ordered an ESP32-C3 a few days ago to get started with embedded Rust, and then youtube recommends this. Will be following along this series once I get it. Here's hoping I can keep up with the different hardware.
@evertonoriente7150
@evertonoriente7150 Місяць тому
Amazing video, the first one everything works and with good explanation about the topics.
@LtdJorge
@LtdJorge Місяць тому
Stellar video. Already had some basic embedded experience with Rust, but I can learn a lot from newer videos, and I got some clues about RTT an cargo embed which were under heavy development when I read about them. Thanks.
@randomhunter47
@randomhunter47 Місяць тому
Bought a board but didn't know how to start. Thank you. Might be the best intro to Rust on embedded devices on UKposts right now
@garvamel
@garvamel Місяць тому
Absolutely fantastic content. This is perfect.
@joe-skeen
@joe-skeen Місяць тому
Such an excellent guide, and timely! I had just started playing around with a Nordic microcontroller and had only figured out how to make it work with C. Thanks for helping me be able to Rustify this project!
@marcioandreyoliveira
@marcioandreyoliveira Місяць тому
I have only one criticism about your videos: you take too long to upload them. They are excellent. I've already subscribed to the channel, turned on notifications, and liked.
@nothingtoseehere93
@nothingtoseehere93 Місяць тому
This is my new favorite channel. I might actually finally learn some rust but I also use esphome a lot
@sstijn577
@sstijn577 Місяць тому
Wish this came out before i started my rust embedded journey, excellent video about setting up the basics requires, figuring this out on my own did teach me a lot about how a lot of this stuff truly works though, great vid mate❤
@devinosborne3396
@devinosborne3396 Місяць тому
this was very simple, straightforward, elegant, and actually got me excited to hear about Rust. Very easy and light to understand. Well done.
@slinco65
@slinco65 24 дні тому
Just starting out with Rust and I really like your teaching style. Keep up the good work.
@Casperdroid5
@Casperdroid5 Місяць тому
Amazing video! And wow the editing on this one... Crazy
@andrewhadfield7754
@andrewhadfield7754 Місяць тому
extremely high quality content. Been waiting to see a tutorial for embedded Rust and this is it.
@slincolne
@slincolne Місяць тому
Very slick presentation - well done !
@kryptic6174
@kryptic6174 Місяць тому
Absolutely exactly what I have been looking for. Keep it up!
@henrynester8061
@henrynester8061 12 днів тому
this video is awesome and what's more it actually worked the first time. you earned a subscriber!
@AdarshKumar370
@AdarshKumar370 Місяць тому
Thank you. For including all the steps like how to identify the processor type. Small steps like these are often which cause a lot of problem for me when writing embedded code as lot of people skip these steps in video. Making it hard to follow through and implement for different processor type
@2788west
@2788west Місяць тому
Excellent content, thank you!
@creativerio
@creativerio Місяць тому
You're probebly a movie director in a parallel universe. I've never coded Rust but I truly loved the way you explained everything. Keep it up.
@ToumalRakesh
@ToumalRakesh Місяць тому
This is an extremely useful tutorial. It's not just well-produced but you're really touching all the important points. Like making rust-analyzer stop trying to do automatic windows builds! Excellent. And subscribed.
@zeroows
@zeroows Місяць тому
Please make more of these great videos. Thank you.
@artemiasalina1860
@artemiasalina1860 Місяць тому
I've been teaching myself rust for about a month now, and have heard that it is great for systems/embedded programming. This video made it clear to me that I'll have to get myself a few micro-controllers and play with them. Thanks for posting how to set things up. Subscribed!
@fluffy_tail4365
@fluffy_tail4365 Місяць тому
This video teached me more about GDB than anything programming related I did in the last 5 years. Also love the content, absolutely precise, yet not too verbose, yet informative
@weiSane
@weiSane Місяць тому
Please keep these videos coming. Where have you been all along. You are great
@mohamedasheef5168
@mohamedasheef5168 Місяць тому
Finally, a proper tutorial for Rust on UKposts. Keep posting 🔥
@ben_wurster
@ben_wurster Місяць тому
Hands down my new favorite youtube channel!
@yvescloutier1580
@yvescloutier1580 Місяць тому
Wow! absolutely amazing! Great work.
@thedudegotfourviews
@thedudegotfourviews Місяць тому
Great video. Not too fast nor too slow. Very informative even for non rust dev like me. I will be learning it this year when my schedule opens up. I hope to learn more from you in the future. Thank you for sharing your knowledge.
@rebis7k10h5
@rebis7k10h5 Місяць тому
Incredible video! I am an electronics engineer student in Italy (with a focus on embedded systems) and have been taught the usual C and C++, which are very important to really understand what actually is going on under the hood (beside assembly). I was looking for tutorials for Rust in an embedded environment and your videos are the perfect match! Also the editing (AND MUSIC) are superb
@Destructificial
@Destructificial Місяць тому
Great video, and your voice is a pleasure to listen to!
@Bruno-cb5gk
@Bruno-cb5gk Місяць тому
Clear and concise, yet thorough. Great guide that'll definitely help me out as im trying to move beyond Arruino. Curious if you're intending to make some videos on using Rust with RISC-V chips.
@therustybits
@therustybits Місяць тому
Definitely
@christophborowski725
@christophborowski725 Місяць тому
Great introduction to embedded development in Rust!
@noisetide
@noisetide Місяць тому
Impressively explained!
@thetruekingofwaffles
@thetruekingofwaffles Місяць тому
This video has been beyond merely educational for me, it helped me reduce errors with rust-analyzer with the check all targets and errors, it helped me find other extensions to help supplement my rust-analyzer, further immersed me in config.toml files, and finally taught me two new Linux commands. I'd just like to say thank you as a relatively novice Rust developer for your guidance kind sir.
@teuluPaul
@teuluPaul Місяць тому
Fabulous - thanks! I fancy writing a flight controller in rust, and will use one of the boards I have lying around to get up and running. I may even get one of the micro:bit boards, to be able to directly follow the video series.
@colejohnson2230
@colejohnson2230 Місяць тому
I did one of my embedded programming classes this year in Rust as well as C, and this is the sort of video that would have been perfect!
@danielgysi5729
@danielgysi5729 Місяць тому
I love the depth here. I've been programming in rust targeting Linux for awhile but I've been wanting to start an embedded project with an esp32 and wasn't sure where to start. I had no idea how much embedded specific tooling was out there so this is really helpful
@maxsuster5067
@maxsuster5067 Місяць тому
Keep up the great presentation and content!
@bosr
@bosr 16 днів тому
Thanks so much. The content awesome, it is perfectly detailed and articulated, at a great pace. Looking forward your next videos.
@lagcisco
@lagcisco Місяць тому
yooo... thank you!!!! Great knowledge shares!! We are hooked!
@jenseng8977
@jenseng8977 Місяць тому
You sir are a wonderful teacher!
Blinking an LED: Embedded Rust ecosystem explored
17:14
The Rusty Bits
Переглядів 12 тис.
Moving from C to Rust for embedded software development
10:06
The Rusty Bits
Переглядів 74 тис.
Эффект Карбонаро и пончики
01:01
История одного вокалиста
Переглядів 7 млн
Nemo - The Code (LIVE) | Switzerland🇨🇭| Grand Final | Eurovision 2024
03:28
Eurovision Song Contest
Переглядів 8 млн
rust runs on EVERYTHING (no operating system, just Rust)
18:10
Low Level Learning
Переглядів 333 тис.
Rust Demystified 🪄 Simplifying The Toughest Parts
14:05
Code to the Moon
Переглядів 164 тис.
Is LangGraph the Future of AgentExecutor? Comparison Reveals All!
9:26
Jon Gjengset - Towards Impeccable Rust
55:59
Rust Nation UK
Переглядів 21 тис.
Rust's Witchcraft
9:18
No Boilerplate
Переглядів 168 тис.
What Makes Rust Different?
12:38
No Boilerplate
Переглядів 194 тис.
I Made My Own Computer | Let's See How It Works
7:51
3DSage
Переглядів 721 тис.
Statically Typed APIs with Poem and Rust
10:21
No Boilerplate
Переглядів 85 тис.
Best OS for programming? Mac vs Windows vs Linux debate settled
8:41
Fiber kablo
0:15
Elektrik-Elektronik
Переглядів 479 тис.
Какой телефон лучше всего снимает? 🤯
0:42
Радиоприемник из фольги, стаканчика и светодиода с батарейкой?
1:00
Клавиатура vs геймпад vs руль
0:47
Balance
Переглядів 944 тис.
#Shorts Good idea for testing to show.
0:17
RAIN Gadgets
Переглядів 2,7 млн