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

Поділитися
Вставка
  • Опубліковано 18 лис 2024

КОМЕНТАРІ • 77

  • @thestemgamer3346
    @thestemgamer3346 2 роки тому +73

    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 2 роки тому +5

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

    • @thestemgamer3346
      @thestemgamer3346 2 роки тому +5

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

    • @Ma1ne2
      @Ma1ne2 2 роки тому

      @@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 2 роки тому

      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)

  • @drawer111
    @drawer111 2 роки тому +4

    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.

  • @edgeeffect
    @edgeeffect 2 роки тому +7

    It's nice that you're zooming in on your editor and command windows.
    I see a lot of programming examples on UA-cam 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 Рік тому

      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 5 місяців тому

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

  • @estebanospina50
    @estebanospina50 2 роки тому +3

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

  • @crazor01
    @crazor01 2 роки тому +3

    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.

  • @srivathsa3387
    @srivathsa3387 2 роки тому +3

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

    • @LowLevelTV
      @LowLevelTV  2 роки тому +1

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

  • @Animal-yb1rr
    @Animal-yb1rr 2 роки тому +77

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

  • @белка-у8б
    @белка-у8б 2 роки тому +1

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

  • @wintrover
    @wintrover 2 роки тому +2

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

  • @the_biggest_chungus7508
    @the_biggest_chungus7508 2 роки тому +25

    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

    • @LowLevelTV
      @LowLevelTV  2 роки тому +6

      Thanks for the tip!

    • @ericm97
      @ericm97 2 роки тому +2

      Why the background music. Kinda distracting

  • @FalcoGer
    @FalcoGer 2 роки тому +5

    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 Рік тому

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

  • @kamal224261
    @kamal224261 2 роки тому +1

    congratulations fam!!!

  • @9SMTM6
    @9SMTM6 2 роки тому +6

    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 :).

  • @_orangutan
    @_orangutan 2 роки тому +2

    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.

  • @zaspanyflegmatyk2446
    @zaspanyflegmatyk2446 2 роки тому +10

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

    • @LowLevelTV
      @LowLevelTV  2 роки тому +4

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

    • @zaspanyflegmatyk2446
      @zaspanyflegmatyk2446 2 роки тому +5

      @@LowLevelTV 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 😁

  • @InfiniteQuest86
    @InfiniteQuest86 2 роки тому +2

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

  • @act0r399
    @act0r399 2 роки тому +1

    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)

  • @lucasdegreef5455
    @lucasdegreef5455 2 роки тому +1

    Can you make video or a series about FreeRTOS?

  • @yeppiidev
    @yeppiidev 2 роки тому +6

    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

  • @malcolmcolindixon
    @malcolmcolindixon Рік тому +1

    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 UA-camrs 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 🤣

  • @tardigradeaugjament8794
    @tardigradeaugjament8794 2 роки тому +1

    Much appreciated.

  • @spillagonner
    @spillagonner 6 місяців тому

    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'

  • @huuhhhhhhh
    @huuhhhhhhh 5 місяців тому

    Now.. how to setup a blinky? 🤔🤔😁

  • @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

  • @ozanmuyes
    @ozanmuyes 4 місяці тому

    Good content but the background music is so loud :(

  • @saitamapreetsingh3057
    @saitamapreetsingh3057 2 роки тому

    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

  • @user-mz8qj7bz8h
    @user-mz8qj7bz8h 2 роки тому +1

    Name of background music?

  • @ristekostadinov2820
    @ristekostadinov2820 2 роки тому

    I learned Arduino on Tinkercad

  • @DimiEG
    @DimiEG Рік тому

    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.

  • @CanadaElon
    @CanadaElon 7 місяців тому

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

  • @alexloktionoff6833
    @alexloktionoff6833 Рік тому

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

  • @beratnacar8703
    @beratnacar8703 2 роки тому

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

  • @Little-bird-told-me
    @Little-bird-told-me 2 роки тому +1

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

    • @RealSquidicus
      @RealSquidicus 2 роки тому

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

  • @procyonq
    @procyonq 2 роки тому

    감사합니다🙏🙏

  • @lohikarhu734
    @lohikarhu734 5 місяців тому

    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

  • @danielsena6161
    @danielsena6161 2 роки тому

    hey whats your linux distro ?

  • @od1n_135
    @od1n_135 2 роки тому

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

  • @act0r399
    @act0r399 2 роки тому

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

  • @billigerfusel
    @billigerfusel 2 роки тому +1

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

  • @ReptilianXHologram
    @ReptilianXHologram 2 роки тому

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

    • @nothappyz
      @nothappyz 2 роки тому +1

      The C Programming Language

    • @nothappyz
      @nothappyz 2 роки тому

      Not that I've read it lol

    • @ReptilianXHologram
      @ReptilianXHologram 2 роки тому

      @@nothappyz that is definitely not beginner friendly.

    • @nothappyz
      @nothappyz 2 роки тому

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

    • @williamdrum9899
      @williamdrum9899 2 роки тому

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

  • @rallokkcaz
    @rallokkcaz 2 роки тому +1

    LLG

  • @iFireender
    @iFireender Рік тому

    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.

  • @maksimmuruev423
    @maksimmuruev423 2 роки тому

    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 2 роки тому +1

      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.

  • @paradox_1729
    @paradox_1729 2 роки тому +2

    Thats a 5 dollar arduino..

  • @ayoubelmhamdi7920
    @ayoubelmhamdi7920 2 роки тому

    u0

  • @BogdanSerban
    @BogdanSerban 2 роки тому

    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 2 роки тому +3

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