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
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
Жыл бұрын
lol I just started following your channel and now you're here. Sounding much more serious than in your videos m8 :p
@thestemgamer3346
Жыл бұрын
@@Ma1ne2 haha yeah sometimes I lurk, I am thinking of being a bot more serious in some videos soon
@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
Жыл бұрын
lol what are you doing here? love your vids btw
@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)
So many thanks, i really appreciate your support for the community :)
My skills are rusted, that is why I am watching this
@KangJangkrik
2 ай бұрын
Lol 69 likes
Happy to see your channel growing 💗, I first visited your channel when you have just 1k subs. Congratulations 🎉👏
@LowLevelLearning
Жыл бұрын
🎉Thanks for sticking around! More fun changes are coming :)
Man, you are a perfect engineer, thanks for growing up my skills;)
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.
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.
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
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
6 күн бұрын
But, then, you have to fiddle with the video, instead of learning.
congratulations fam!!!
Much appreciated.
Learning embedded system without hardware? OMG You saved lots of poor people like me, thank you
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
8 ай бұрын
Y e s Specially if it could allow you to emulate specific peripherals, like a Serial device or even a button, led, etc
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.
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
Жыл бұрын
Thanks for the tip!
@ericm97
Жыл бұрын
Why the background music. Kinda distracting
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 :).
Can you make video or a series about FreeRTOS?
I want to subscribe, but you have 66.6K subscribers. I can't mess that up for you.
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)
You are supposed to use cargo-generate because that whole repo is a template. Don't change it manually
@LowLevelLearning
Жыл бұрын
Cargo generate was super heavy in terms of dependencies so I skipped it and went to git.
@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 😁
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
Can you make same video for RUST on minimal RISCV emulator?
Is it a good idea to start embedded learning with Rust? The rust learning curve is so steep
which operating system do you use and what type of desjktop environment do you use ?
@LowLevelLearning
Жыл бұрын
Ubuntu 20.04 LTS with i3
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'
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.
what OS ( guessing Linux) and window manager do you use.
@RealSquidicus
Жыл бұрын
Window manager I'm pretty sure if i3, not sure on the distro
I want to know how to record and master my own ?
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 🤣
Name of background music?
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
Жыл бұрын
omg cracked me up 🤣🤣🤣
in 7:31 how you call reverse-i-search ? I see it first time, thanks)
@estebanospina50
Жыл бұрын
ctrl-R
hey whats your linux distro ?
감사합니다🙏🙏
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
Жыл бұрын
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.
I learned Arduino on Tinkercad
What is the best book on how to learn C programming as a beginner?
@nothappyz
Жыл бұрын
The C Programming Language
@nothappyz
Жыл бұрын
Not that I've read it lol
@ReptilianXHologram
Жыл бұрын
@@nothappyz that is definitely not beginner friendly.
@nothappyz
Жыл бұрын
@@ReptilianXHologram well I'd wait for someone with more experience to advise something better then
@williamdrum9899
Жыл бұрын
I recommend learning at least one assembly language first (doesn't matter which one)
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
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
LLG
Is it just me or is the rust Syntax super ugly?
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.
Thats a 5 dollar arduino..
u0
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
Жыл бұрын
it makes it safe, even if that means fighting with the compiler a bit