rust runs on EVERYTHING (no operating system, just Rust)

350,420
0
Published 2022-09-02
The world of embedded programming is AMAZING. The Raspberry Pi is one of the best platforms to break into embedded development. In this video, we'll program our Raspberry Pi WITHOUT the Linux Kernel. We'll use the Rust build chain to create a custom kernel image that we can use to blink our LED on and off.

You can take this tutorial, create the code for yourself and use it to develop something more advanced! You can use the UART bus, the SPI bus, or maybe even start to write your own operating system.

Video Links:
Linker Script: github.com/lowlevellearning/raspberry-pi-baremetal…
BCM2837 Datasheet: cs140e.sergio.bz/docs/BCM2837-ARM-Peripherals.pdf

🏫 COURSES 🏫
Learn to code in C at lowlevel.academy/

🔥 SOCIALS 🔥
Low Level Merch!: www.linktr.ee/lowlevellearning
Follow me on Twitter: twitter.com/LowLevelTweets
Follow me on Twitch: twitch.tv/lowlevellearning
Join me on Discord!: discord.gg/gZhRXDdBYY

0:00 Intro
0:36 Board Setup
0:41 Lets Code!
1:30 ARMv7 Target
2:13 no_std
3:37 Don't Panic!
4:30 start location
5:25 linker script
8:15 elf2bin
9:30 TO THE DATASHEET!
13:25 GPIO Code
16:50 Firmware Files
17:57 O

All Comments (21)
  • I knew literally nothing about embedded systems and barely anything about Rust 18 minutes ago, and now it feels like it's a very acheivable thing to learn thanks to this demonstration. You're clearly a gifted teacher, fantastic video.
  • @atdit
    The great thing about your videos is the pace and "constant" narration. It feels like there isn't a single second in the video where you're not explaining what you're currently doing. That makes it very easy to not lose focus and attention as a viewer
  • @jnth2
    Really like that you use documentation as a reference to explain. Lots of tutorials skip the fact that documentation is there to help.
  • The amount of effort on this video to make it only 18 min is insane if you are a bit familiar with embedded system, thanks for it LLL
  • @reo101
    You can make a `build.rs` file like this ```rust fn main() { println!("cargo:rerun-if-changed=./linker.ld"); } ``` to hint to cargo that a change in that file should also result in a rebuild
  • @TheBendixSA
    So glad I found this channel, I have been writing code for a long time and wanted to jump into some low level stuff to improve my wider understanding esp. embedded systems etc. You cover fundamentals so well and easily digestible. Thanks for this!
  • @dbznt
    Thanks for Everything you do LLL, Seriously your videos have invigorated my spirit and inspired me to learn more about computer systems and lower level langs. C and Go are becoming my favorite languages to write my code. I'm gonna try writing some rust today!. Thanks again! Keep up the great work!
  • I am absolutely watching your channel from now on.This is the most I have ever learned from a programming video. I've been trying to learn how to be a low level developer for years. Since high school. WOW. It's quick. It's on point. And I can follow it. I love how you just filled in several gaps learning in only a few minutes. I could have stayed in college, and I am not knocking anyone who does, but I have a short attention span. Thanks for this. Don't even remember how I stumbled here.
  • @megumin4625
    13:39 I would hope nobody would be mad. Unsafe code is basically the only way this can be done. It's just a fact. There's a reason rust has the unsafe keyword, because it's sometimes needed. :) Also, thanks for the video. It's very enlightening!
  • @otm3107
    With all the soft soft tutorials that exist on YT, yours just created that "light bulb illumination" mont in my head. Thanks for taking the
  • @SandhanSarma
    Fantastic video, very very informative. Hope to see more content on RUST for embedded systems from Low Level Learning
  • @34tttttaa
    Such high quality content, thank you! Hoping in the future you can find the time to create a whole course on embedded Rust, I'd sign up in a heartbeat.
  • Absolutely killing it with how you're presenting. I'm not really a fan of Rust but I couldn't stop watching.
  • @odanabunaga2505
    as a recovering TS dev I'm watching this in complete awe! Thanks for explaining what you're doing, it leaves me with hope ;)
  • Excellent vid man. Been a while since I've done any embedded programming. Very cool seeing how to do this low-level stuff on a pi 😎👍
  • @Nitiiii11
    Thanks man, it took some adjustments to make it run in u-boot on a cortex-a9, but I figured it out eventually. Very helpful tutorial.
  • @casperes0912
    I started working on an operating system in rust. I never went that far with it but it works. Can boot both legacy bios mode and modern efi style. Though only in qemu on efi. Don’t have video output properly working on any real efi hardware I have. But with bios boot it works with a text mode console. Boots into long mode and all but no memory protection
  • @klebleonard
    This is reallz interesting. What are your plans on next courses for your platform? Will the current mini course get updates and more content?