Learn Embedded Rust WITHOUT Any Expensive Hardware | Rust ARM QEMU Cargo Tutorial

Ғылым және технология

Getting into embedded development is already hard enough. For beginners especially, knowing what board to choose is even harder. Should I choose the Arduino? Raspberry Pi Pico? STM32 Blue Pill? Luckily, by using QEMU, you can, skip ALL of that hassle.
In this video, I show how to setup a project where you DONT need anyway hardware or complicated setup to learn embedded Rust targeted to the ARM Cortex M0+ series processors. If you enjoyed this video, hit like and subscribe :)
🔥🔥🔥 SOCIALS 🔥🔥🔥
Low Level Merch!: www.linktr.ee/lowlevellearning
Follow me on Twitter: / lowleveltweets
Follow me on Twitch: / lowlevellearning
Join me on Discord!: / discord

Пікірлер: 74

  • @thestemgamer3346
    @thestemgamer3346 Жыл бұрын

    I wish QEMU had better support for board emulation in general. I was hoping I would be able to do some kind of virtualization that could be ran for new members who have trouble setting up the IDEs. However, it turns out that our particular board and peripherals aren't well support :( QEMU only supports 3 Cortex-M4 boards iirc.

  • @Ma1ne2

    @Ma1ne2

    Жыл бұрын

    lol I just started following your channel and now you're here. Sounding much more serious than in your videos m8 :p

  • @thestemgamer3346

    @thestemgamer3346

    Жыл бұрын

    @@Ma1ne2 haha yeah sometimes I lurk, I am thinking of being a bot more serious in some videos soon

  • @Ma1ne2

    @Ma1ne2

    Жыл бұрын

    @@thestemgamer3346 I do love your meme videos too, maybe a mix would be cool! Sometimes something crazy and fun, sometimes actual Rust oder other programming stuff in a more informative way. You'll figure it out! :)

  • @proloycodes

    @proloycodes

    Жыл бұрын

    lol what are you doing here? love your vids btw

  • @IlliaZhdanov

    @IlliaZhdanov

    Жыл бұрын

    Yep, but at least it can do OS stuff, which it's REALLY GOOD FOR. (context: I tried like 3 times to make an os, failed, however qemu was having fun emulating my os, that's for sure)

  • @estebanospina50
    @estebanospina50 Жыл бұрын

    So many thanks, i really appreciate your support for the community :)

  • @Animal-yb1rr
    @Animal-yb1rr Жыл бұрын

    My skills are rusted, that is why I am watching this

  • @KangJangkrik

    @KangJangkrik

    2 ай бұрын

    Lol 69 likes

  • @srivathsa3387
    @srivathsa3387 Жыл бұрын

    Happy to see your channel growing 💗, I first visited your channel when you have just 1k subs. Congratulations 🎉👏

  • @LowLevelLearning

    @LowLevelLearning

    Жыл бұрын

    🎉Thanks for sticking around! More fun changes are coming :)

  • @user-ur4ev7vl6c
    @user-ur4ev7vl6c Жыл бұрын

    Man, you are a perfect engineer, thanks for growing up my skills;)

  • @drawer111
    @drawer111 Жыл бұрын

    I learned embedded rust on the xiao samd21 for 5 dollars a piece (they're actually stock now too!!!) - one of the benefits of arduino compatible boards with usb support is there's an arduino sketch to use a second one as a VERY cheap swd (serial wire debug) device.

  • @crazor01
    @crazor01 Жыл бұрын

    I knew that something like that is not too hard to do, and in fact I even did a similar setup years ago to develop and debug some graphical UI for STM32, to get a quick and responsive debug and test loop that does not involve flashing the controller itself, but ran with an LCD emulator on the host. BUT you cannot underestimate how useful this is "built-in" to the project template. A low-friction qemu debug setup could be very useful in many more projects where you just wouldn't bother setting things up otherwise.

  • @edgeeffect
    @edgeeffect Жыл бұрын

    It's nice that you're zooming in on your editor and command windows. I see a lot of programming examples on KZread where I'm trying to watch on my phone and they have an enormous desktop with a tiny font and I can't see a thing.

  • @SforSamPlays

    @SforSamPlays

    10 ай бұрын

    If you are on IPhone (maybe android has it work too, but I don’t know if the android app supports it) if you do a reverse pinch your screen, you can zoom in to see it better (and pinch to zoom back out)

  • @lohikarhu734

    @lohikarhu734

    6 күн бұрын

    But, then, you have to fiddle with the video, instead of learning.

  • @kamal224261
    @kamal224261 Жыл бұрын

    congratulations fam!!!

  • @tardigradeaugjament8794
    @tardigradeaugjament8794 Жыл бұрын

    Much appreciated.

  • @TheWintrover
    @TheWintrover Жыл бұрын

    Learning embedded system without hardware? OMG You saved lots of poor people like me, thank you

  • @FalcoGer
    @FalcoGer Жыл бұрын

    Would be nice if you could intercept access to IO mapped memory in the VM and have some sort of interface to simulate the hardware.

  • @akatsukilevi

    @akatsukilevi

    8 ай бұрын

    Y e s Specially if it could allow you to emulate specific peripherals, like a Serial device or even a button, led, etc

  • @_orangutan
    @_orangutan Жыл бұрын

    Can you make a video on emulating RISC-V virt on QEMU? I want to work with RISC-V assembly but mostly doing Operating System stuff such as Memory Management, Scheduler, etc not any board.

  • @the_biggest_chungus7508
    @the_biggest_chungus7508 Жыл бұрын

    Nice video😊 Only one little idea. In the end, when you froze the Programm via Port 3333, you first said "let's add in tcp://", but then removed it quickly afterwards without commentary, when the build crashed. I know editing is sometimes unnerving, but it would be better to cut out your mistakes entirely and redo the part. Gives the vid a better consistency😉 But overall a nice vid

  • @LowLevelLearning

    @LowLevelLearning

    Жыл бұрын

    Thanks for the tip!

  • @ericm97

    @ericm97

    Жыл бұрын

    Why the background music. Kinda distracting

  • @9SMTM6
    @9SMTM6 Жыл бұрын

    How far can you actually go with these kinds of things btw? Could you "emulate" sensors for the embedded platform? I've experimented with some of these things a long time ago, back then I wasn't very knowledgeable and didn't get far, but if you do some things like that I'd really appreciate a video on it, and if you don't then a hint why this might be a horrible idea would also be great :).

  • @lucasdegreef5455
    @lucasdegreef5455 Жыл бұрын

    Can you make video or a series about FreeRTOS?

  • @InfiniteQuest86
    @InfiniteQuest86 Жыл бұрын

    I want to subscribe, but you have 66.6K subscribers. I can't mess that up for you.

  • @act0r399
    @act0r399 Жыл бұрын

    man, would be cool, if show as your linux conf, I like how it's look like, but when try do same, I every time fail, so, I hope you see my comments and make this video, thanks)

  • @zaspanyflegmatyk2446
    @zaspanyflegmatyk2446 Жыл бұрын

    You are supposed to use cargo-generate because that whole repo is a template. Don't change it manually

  • @LowLevelLearning

    @LowLevelLearning

    Жыл бұрын

    Cargo generate was super heavy in terms of dependencies so I skipped it and went to git.

  • @zaspanyflegmatyk2446

    @zaspanyflegmatyk2446

    Жыл бұрын

    @@LowLevelLearning Yeah but cargo-generate is a tool that is installed on the system. So you install it once and that's it. You don't need to install it with every crate you want to make from a template. And from what I have seen the rust-embedded group provides quite a lot of templates for different projects so I very much encourage you to install it 😁

  • @ovrskr
    @ovrskr Жыл бұрын

    I followed this on 22.04 But there is nothing in the binary output when i inspect with objdump -d, ? Cargo run segfaults and qemu faults

  • @alexloktionoff6833
    @alexloktionoff683311 ай бұрын

    Can you make same video for RUST on minimal RISCV emulator?

  • @CanadaElon
    @CanadaElonАй бұрын

    Is it a good idea to start embedded learning with Rust? The rust learning curve is so steep

  • @od1n_135
    @od1n_135 Жыл бұрын

    which operating system do you use and what type of desjktop environment do you use ?

  • @LowLevelLearning

    @LowLevelLearning

    Жыл бұрын

    Ubuntu 20.04 LTS with i3

  • @spillagonner
    @spillagonner13 күн бұрын

    What am I missing? error: could not execute process 'qemu-system-arm -cpu cortex-m3 -machine lm3s6965evb -nographic -semihosting-config enable=on, target=native-kernel ./first' (never executed) Caused by: No such file or directory (os error 2). Did not rename cloned cortex-m-quickstart, named projech 'first' rather than 'app'

  • @DimiEG
    @DimiEG10 ай бұрын

    Would be interesting to see how to use Rust for real board. Is it possible to use for ESP32? Thanks for your video, but it has not real use in life. QEMU very limited and no possible to see real GPIO tasks.

  • @Little-bird-told-me
    @Little-bird-told-me Жыл бұрын

    what OS ( guessing Linux) and window manager do you use.

  • @RealSquidicus

    @RealSquidicus

    Жыл бұрын

    Window manager I'm pretty sure if i3, not sure on the distro

  • @beratnacar8703
    @beratnacar8703 Жыл бұрын

    I want to know how to record and master my own ?

  • @malcolmcolindixon
    @malcolmcolindixon Жыл бұрын

    Just started to listen to this BUT what's with the music 🎶, how can I clearly hear you when there's a banging tune? I don't understand why KZreadrs do this. Other videos I've watched of yours have been better as I recall so I'll endure this one until the end. Lmao, just as I resume the music stops 🤣

  • @user-mz8qj7bz8h
    @user-mz8qj7bz8h Жыл бұрын

    Name of background music?

  • @yeppiidev
    @yeppiidev Жыл бұрын

    and now I'm waiting for the tutorial to turn your old ass x86 intel pentium iii pc to an M2 MacBook Pro using QEMU lmao

  • @mr.mirror1213

    @mr.mirror1213

    Жыл бұрын

    omg cracked me up 🤣🤣🤣

  • @act0r399
    @act0r399 Жыл бұрын

    in 7:31 how you call reverse-i-search ? I see it first time, thanks)

  • @estebanospina50

    @estebanospina50

    Жыл бұрын

    ctrl-R

  • @danielsena6161
    @danielsena6161 Жыл бұрын

    hey whats your linux distro ?

  • @procyonq
    @procyonq Жыл бұрын

    감사합니다🙏🙏

  • @maksimmuruev423
    @maksimmuruev423 Жыл бұрын

    What will be if you will keep original main() and panic ? It is possible use it as 'normal' ? I mean looks a bit weird you disabled main and created your own. And panic can it just send some data trough USB/Serial with stacktrace or something meaningful ?

  • @rallokkcaz

    @rallokkcaz

    Жыл бұрын

    You'll be using features the compiler will not be able to use. You also have "nostd" on as a flag which means you couldn't get that functionality even if you wanted.

  • @ristekostadinov2820
    @ristekostadinov2820 Жыл бұрын

    I learned Arduino on Tinkercad

  • @ReptilianXHologram
    @ReptilianXHologram Жыл бұрын

    What is the best book on how to learn C programming as a beginner?

  • @nothappyz

    @nothappyz

    Жыл бұрын

    The C Programming Language

  • @nothappyz

    @nothappyz

    Жыл бұрын

    Not that I've read it lol

  • @ReptilianXHologram

    @ReptilianXHologram

    Жыл бұрын

    @@nothappyz that is definitely not beginner friendly.

  • @nothappyz

    @nothappyz

    Жыл бұрын

    @@ReptilianXHologram well I'd wait for someone with more experience to advise something better then

  • @williamdrum9899

    @williamdrum9899

    Жыл бұрын

    I recommend learning at least one assembly language first (doesn't matter which one)

  • @saitamapreetsingh3057
    @saitamapreetsingh3057 Жыл бұрын

    I love rust. But rust does not offer any improvements for time being, it will improve in future I guess. Also if any argument against C is that it has memory safety. I ask the question why don't industry just optimize the compiler, why is there a need for switch in language, there are 2 problems here. 1. New embedded coders will have hard time deciding which lang to choose as we see in VLSI (verilog vs VHDL) and so many lang in software development. 2. Rust's compatibility with C. Engineers will have to rewrite all the previous drivers in rust. Imagine using STM32 but you have to rewrite new hardware drivers in C so that they are compatible with your old code in case industries switch to languages. I wish we had more compiler designers than coders & programmers

  • @lohikarhu734
    @lohikarhu7346 күн бұрын

    There are, like, 30 things that you did in this video, which all required a lot of background knowledge...so, interesting, looks cool, but far too much required for a "bare metal" kind of user Thx

  • @rallokkcaz
    @rallokkcaz Жыл бұрын

    LLG

  • @billigerfusel
    @billigerfusel Жыл бұрын

    Is it just me or is the rust Syntax super ugly?

  • @iFireender
    @iFireender11 ай бұрын

    Your explanation of semihosting is kind of lacking. Normally, semihosting means that a target can halt in a specific way; which tells the debugger (connected to a target through a debug probe) that the target wants to do something on the host - such as a printf. The debugger then gets the thing the target wants to run on the host from the target, and runs it on the host system, before possibly returning some value to the target and then resuming program flow of the target. It has nothing to do with emulation.

  • @paradox_1729
    @paradox_1729 Жыл бұрын

    Thats a 5 dollar arduino..

  • @ayoubelmhamdi7920
    @ayoubelmhamdi7920 Жыл бұрын

    u0

  • @BogdanSerban
    @BogdanSerban Жыл бұрын

    I watched your embedded rust videos and honestly I'm not that excited about it. The whole point of using C for low level programming is easy access to memory, and rust makes this unnecessarily complicated.

  • @Furetto126

    @Furetto126

    Жыл бұрын

    it makes it safe, even if that means fighting with the compiler a bit

Келесі