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

แชร์
ฝัง
  • เผยแพร่เมื่อ 31 พ.ค. 2024
  • LOW LEVEL RUSTACEANS! Welcome back! In today's video we discuss embedded rust. Specifically, we talk about Hardware Abstraction Layer crates as they're used in rust. We use a HAL Crate for the RP2040 to upload and execute the Blink LED example onto the RP2040. Rust is an incredible programming language that gives the programmer the power of memory safety and performance on embedded systems.
    🏫 COURSES 🏫
    www.lowlevel.academy/courses/
    LINKS:
    LLL Merch: linktr.ee/lowlevellearning
    Buy the RP2040: amzn.to/3uISUGn
    Learn Rust with this Book!: amzn.to/3upEydx
    Embedded Rust: docs.rust-embedded.org/book/
    RP2040 HAL: github.com/rp-rs/rp-hal
    SOCIALS:
    Follow me on Twitter: / lowlevellearni1
    Follow me on Twitch: / lowlevellearning
    Join me on Discord!: / discord

ความคิดเห็น • 222

  • @slid3rek24
    @slid3rek24 2 ปีที่แล้ว +457

    My Raspberry Pi Pico fell to a bucket of water during doing some plant watering project, I'm pretty sure it runs Rust now...

    • @alexdubois6585
      @alexdubois6585 2 ปีที่แล้ว +27

      safely

    • @trayambakrai
      @trayambakrai ปีที่แล้ว +3

      @@alexdubois6585 and it cannot race anymore!

    • @dieSpinnt
      @dieSpinnt ปีที่แล้ว +4

      Only direct short circuits and then also with a clear path e.g. between the 5V section and sensitive 3V logic and with a correspondingly high current flow can seriously endanger your board/parts. This basically happens when measuring or when trying around on the breadboard. In the water this is very unlikely. Of course, there are sensitive components where water damage in and of itself affects the function, but a little patience will probably suffice for you. It's best to use a few dry cloths and not even a (hot-air) hair dryer or the oven ... because you can damage more with them than with water.
      Have fun bathing and crafting! :)

    • @aayushmaharjan6412
      @aayushmaharjan6412 ปีที่แล้ว +1

      🤣🤣🤣

    • @andersonwaithaka3720
      @andersonwaithaka3720 10 หลายเดือนก่อน

      😂😂😂

  • @Dygear
    @Dygear 2 ปีที่แล้ว +288

    Excellent! There are a couple of erratas. You don't actually need a variable to be marked mut to borrow it out to another function. You will actually have a much harder time borrowing a mut variable because rust wants only one place to be able to handle changing the underlying variable at any given time.

    • @r.pizzamonkey7379
      @r.pizzamonkey7379 2 ปีที่แล้ว +7

      Yup. You can only have one mutable reference OR multiple read-only references.

    • @paulmulders3648
      @paulmulders3648 2 ปีที่แล้ว +24

      erratum to your comment, errata is plural already

    • @rumplstiltztinkerstein
      @rumplstiltztinkerstein 2 ปีที่แล้ว

      @@r.pizzamonkey7379 In rust speech, & implements Copy and &mut doesn't

    • @r.pizzamonkey7379
      @r.pizzamonkey7379 2 ปีที่แล้ว +1

      @@rumplstiltztinkerstein sort of but not quite. I'm pretty sure it's a different system which supercedes traits.

    • @rumplstiltztinkerstein
      @rumplstiltztinkerstein 2 ปีที่แล้ว

      @@r.pizzamonkey7379 maybe they're just special pointers

  • @alemartinezz1022
    @alemartinezz1022 2 ปีที่แล้ว +156

    Please keep up with the low level Rust videos. That's one reason why I chose Rust for learning!

    • @LowLevelLearning
      @LowLevelLearning  2 ปีที่แล้ว +19

      More to come!

    • @JaJakubYT
      @JaJakubYT 2 ปีที่แล้ว +2

      Check out videos on my channel. I have 6 videos on Rust embedded and more to come.

    • @nathan12581
      @nathan12581 ปีที่แล้ว

      I second this

  • @santaclause8090
    @santaclause8090 2 ปีที่แล้ว +130

    Nice getting started video :) Thanks
    Just one small correction abouth the push-pull output part: it's not called push-pull because you can "pull" data from it to read: it's still an output. It's called that way because it's built with 2 transistors, one can push the output towards the supply voltage and one can pull the output to ground. Just clarifying it here before somebody tries to read data through an output :D

    • @fltfathin
      @fltfathin 2 ปีที่แล้ว +9

      to make it more clear, other type of output is open drain in which you need to add pullup resistor to keep it high

    • @louiscloete3307
      @louiscloete3307 2 ปีที่แล้ว +5

      Wanted to say the same. Thanks!

  • @keylanoslokj1806
    @keylanoslokj1806 2 ปีที่แล้ว +63

    What an era to live in. When such content is available

    • @selfscience
      @selfscience 2 ปีที่แล้ว +1

      Specially for knowledge hoarders like ourselves.

    • @notsojharedtroll23
      @notsojharedtroll23 2 ปีที่แล้ว

      @@selfscience yesir 🤙🤙🤙

  • @kingderderder
    @kingderderder 2 ปีที่แล้ว +13

    "Push pull output" is actually referring to the type of output in electrical terms. It means the pin can "pull" to ground/low and "push" the voltage on the pin to vcc/high.
    There are other types of output types such as "open drain" which only pulls to ground, no pushing.
    The line setting the pin to push/pull output is equivalent to arduino pinMode(...).

  • @mydearaniryx7829
    @mydearaniryx7829 2 ปีที่แล้ว +13

    There is actually an open-source operating system written in Rust for embedded systems called Tock OS and it has support for rp2040 too (and many other Cortex-M and RISC-V based MCU's). You can then compile and run c or rust apps on top, without needing to know all low level stuff. But if you like the low level stuff you can always contribute to Tock OS :))

  • @test40323
    @test40323 2 ปีที่แล้ว +42

    Nice walkthrough. HAL does make codes more readable as it is more standardized. Good low level C programmers wrap registers/dma access in small functions. Thank you!

    • @LowLevelLearning
      @LowLevelLearning  2 ปีที่แล้ว +2

      Good tip!

    • @Mr.Leeroy
      @Mr.Leeroy 2 ปีที่แล้ว

      What's wrong with proper commenting?
      Do you have to add pointless jump commands around your low-level instructions, complicate the things happening in stack, etc?

    • @iqwit
      @iqwit 4 วันที่ผ่านมา

      ​@@Mr.LeeroyYou underestimate how smart compilers are, if it can inline, it will 90% of the time

  • @maikha8963
    @maikha8963 2 ปีที่แล้ว +7

    *slowly opens another tab and typing rust language*

  • @apocalypseio
    @apocalypseio 2 ปีที่แล้ว +8

    After watching your last video I was tickled to see you steering folks towards installing the whole environment. I am doing a similar exploration with ESP32 and diverted to try the 2040 along with you this time. Good Stuff!

  • @SandwichMitGurke
    @SandwichMitGurke 2 ปีที่แล้ว +6

    Dude how awesome is the fact that you run the crate and it automatically uploads to the pico in the shortest amount of time? this is crazy, I have to try it

  • @herrxerex8484
    @herrxerex8484 2 ปีที่แล้ว +2

    Loved this , people like you make this world a better place !!!

  • @bspringer
    @bspringer 5 หลายเดือนก่อน +1

    Very nice, one thing I noticed: Push-Pull actually refers to being able to push it to 1, or pull it to 0. One alternative is High Impedance (Hi-Z), which is an input (no possibility of writing any value), and another alternative is open-drain (you can only pull it down to 0, but if you want it to go up, you need an external pullup. Useful for combining multiple output pins and the output will go low if any of the output pins of different ICs goes low)

  • @alevez2004
    @alevez2004 2 ปีที่แล้ว

    Pretty neat explanation, thanks! I'm gonna try this myself. I've always wanted to use rust in some projects, now I found how to do it having fun.

  • @fotnite_
    @fotnite_ ปีที่แล้ว +1

    Extremely well documented seems to be a pattern with Rust IMO. It's not just the core language, but the entire ecosystem that is well-documented, and even though Rust has a ton of very unique features that I like, it's the superb documentation that wins me over in the end.

  • @kenworks6068
    @kenworks6068 ปีที่แล้ว +1

    Perfect level of instruction for me. I just ordered the picos, am reading the the new Rust book and have an application to code. You are cutting to the chase and having arduino experience your explanations are clear and organized - Thank You I am so pumped to be part of the Rust Everywhere world

  • @mattg5262
    @mattg5262 2 ปีที่แล้ว

    Amazing video! For future videos writing a driver for a simple i2c device using embedded hal traits would be super helpful. There are barely any up to date tutorials out there on it. There are so many hardware devices that don't have abstractions yet and a video on it would be a huge help to the community.

  • @frostifish
    @frostifish 2 ปีที่แล้ว +3

    Lovely video! Now I can finally grasp what the panic handler does and why unwarp is always called. Also, perhaps you could check out the secondary core and Programmable I/O for the Pico in Rust in a future video :)

  • @kenworks6068
    @kenworks6068 8 หลายเดือนก่อน

    Great job, I was able to follow your explanations and get the program running on my pico from my Mac.

  • @act0r399
    @act0r399 ปีที่แล้ว

    Man, this is incredible, thanks TH-cam that show you in recommendations, you explaining every fucking line code , just amazing, keep creating tutorial like this, thanks

  • @MrAnandml
    @MrAnandml 2 ปีที่แล้ว +5

    Oh this Rust series is going to be great...

  • @echoptic775
    @echoptic775 2 ปีที่แล้ว

    I love i found out about this channel, right as u started programming in rust, i know that rust is a viable c alternative, but without the crazy things that can happen in c. I think its finally time for c to not be the best solution for embedded systems

  • @omarmhaimdat
    @omarmhaimdat 2 ปีที่แล้ว

    Excellent and honest video, keep going !

  • @typeer
    @typeer 2 ปีที่แล้ว

    Love this series thanks man

  • @debuti
    @debuti 2 ปีที่แล้ว

    Good! I have a primitive rust scheduler running in the rp2040. It was a funny project

  • @first-thoughtgiver-of-will2456
    @first-thoughtgiver-of-will2456 2 ปีที่แล้ว

    Thank you for bringing more attention to this.

  • @NathanLTPK
    @NathanLTPK 2 ปีที่แล้ว +1

    keep doing these rust & pi pico tutorials with showcasing more peripherals connected to the board. great job, like and sub-ed

  • @jotrockenmitlocken
    @jotrockenmitlocken 6 หลายเดือนก่อน

    This video is a beauty. Thanks very much for this.

  • @arjayUU
    @arjayUU 2 ปีที่แล้ว +13

    that is a ton of initialization for a blink xD
    does this scale for more complex projects.
    also wondering where tbe benefits of embedded rust lie and how one would handle DMA access conpared to c++ for let's say fast ADC sampling.

    • @rafaelbachmann7246
      @rafaelbachmann7246 2 ปีที่แล้ว +2

      Gotta setup those clocks :)
      DMA usage is currently same as C or C++: write to registers and make sure no races etc. can happen. Some HAL implementations make this ridiculously easy, see e.g. h7 hal. In the future, some efforts such as embedded-dma and bbqueue might standardise this, but it's hard.

    • @markday3145
      @markday3145 2 ปีที่แล้ว +5

      Yes, it's very verbose. The Rust style is to encode as much as possible into the type, so the compiler can check it for you. But that means you need ownership of a lot of pieces of data, and that means a lot of source code (which may boil down to very little code at runtime). For example, you'd need a separate variable for each GPIO pin you want to use, and you have to pass those variables to any function that needs to access that pin.
      You can hide some of that complexity by putting that initialization and extraction of variables into your own library function. The downside there is that your function has to return a lot of pieces of data.
      It would certainly be possible to create a much simpler API (similar to Arduino, for example) that is in some sense less safe. For example, if you pass pin numbers as integers, you end up having to do runtime sanity checking of that number, and it's easier to accidentally type the wrong number or have two routines manipulating the same pin when they should be manipulating different pins.

    • @doctorbobstone
      @doctorbobstone 2 ปีที่แล้ว +4

      In C or C++ (or any language, really) you generally have to do all this stuff to setup the hardware. Some environments like Arduino hide much more if it. This usually means you have less ability to customize, but you have less boilerplate in your code, too. All the setup code is still being called for you, though.
      The level of detail exposed is a trade off of simplicity vs. control. I think what we've seen here looks like a pretty reasonable level of detail, at least in my opinion.

  • @thewilltejeda
    @thewilltejeda 6 หลายเดือนก่อน

    This is pretty cool, ive learning rust ( as a typescript/python dev ) and have been wondering about rust and the rp2040

  • @johnknight7293
    @johnknight7293 2 ปีที่แล้ว +4

    Thanks, don't forget the link to the embedded Rust doc page as you promised !

  • @harrytsang1501
    @harrytsang1501 ปีที่แล้ว

    Thanks, this video made me realise that C/C++ is not the pain point of embedded systems, the configurations and quality of documentation is.
    C/C++ are nice as in I know what my code will compile to assembly. Rust makes that memory safe but does not help with the pain of configuration.

  • @RonSheely
    @RonSheely ปีที่แล้ว

    Excellent. Thank you.

  • @ZenoTasedro
    @ZenoTasedro 2 ปีที่แล้ว

    Great video! Will def subscribe and catch up

  • @Alex-hr2df
    @Alex-hr2df 10 หลายเดือนก่อน

    Brilliant, man!

  • @wChris_
    @wChris_ 2 ปีที่แล้ว +2

    There is actually a project template you can use, to get started on your own project!

  • @criptouni
    @criptouni ปีที่แล้ว +1

    Great videos and keep 'em coming! given the high-quality of your videos could you share your setup? workstation, mic/headset, software used? We want to start making some videos ourselves for Spanish speakers about Rust but we're not too sure on hardware equipment required. Thanks!

  • @sourabhk2373
    @sourabhk2373 2 ปีที่แล้ว

    keep making rust + embedded videos please!

  • @chairmakerPete
    @chairmakerPete 2 ปีที่แล้ว

    This looks super-exciting. Cannot get into python at all, but rust seems shockingly brilliant.

  • @Bianchi77
    @Bianchi77 2 ปีที่แล้ว

    Nice video, thank you for sharing :)

  • @IamSentient314
    @IamSentient314 2 ปีที่แล้ว +1

    Hi. I love these videos you make on the Pi Pico. If you can, could you cover DMA on the Pi Pico? Mem to mem, DMA SPI & DMA I2C etc.

  • @asksejsbo331
    @asksejsbo331 2 ปีที่แล้ว

    A question: a lot of no_std libraries are able to run with vectors using "extern crate alloc", would this be the same for the pico's?

  • @Fleebee.
    @Fleebee. 3 หลายเดือนก่อน

    If you're using a pico W this wont blink the onboard led. pick a different pin and connect it to a circuit to check its working

  • @TobyMole
    @TobyMole ปีที่แล้ว +1

    Ex-C embedded engineer here. Semi-following these embedded rust videos, interested to see just how Rust compares to C in embedded, great to see HAL coming in!
    When you say the HAL prevents using unsafe sections, does it mean that the HAL has unsafe parts that it does for you, or does it have some way of performing the needed operations without being unsafe at all?

    • @zachbrown7272
      @zachbrown7272 ปีที่แล้ว +1

      The HAL itself has unsafe parts that it does for you. From what I can tell reading the HAL source though, they are beyond what a c dev would consider "good enough" about how they manage their memory though.

  • @justins7796
    @justins7796 2 ปีที่แล้ว

    subbed. dude this is great work

  • @TrolleyMC
    @TrolleyMC 2 ปีที่แล้ว +1

    I think arch repos keep an up to date version of rust, so really depending on your distro or UNIX-like OS, it may or may not be necessary to use rustup

  • @MichaelFlynnhasneatv
    @MichaelFlynnhasneatv ปีที่แล้ว

    I literally have an entire module dedicated to programming and debugging this board using C and Assembly. Seeing how it's done at a higher level of abstraction with rust is really interesting.
    Maybe the video already exists but how does rust handle hardware interrupts?

  • @markbratcher9095
    @markbratcher9095 ปีที่แล้ว +1

    Where did /mnt2/rp-hal come from? You didn't mention creating it or mounting it for a particular purpose. It looks like you created it as a dedicated location for the rp stuff.

  • @AstroMechanicalEngineer
    @AstroMechanicalEngineer ปีที่แล้ว

    Nice! Thanks for this video, my guy. I didn't even know Rust worked on MCUs. :D

  • @echoptic775
    @echoptic775 2 ปีที่แล้ว +1

    What are ur plans with rust? I just saw u had a series of making an os, will u do sth similar with rust?

  • @JeremyChone
    @JeremyChone ปีที่แล้ว

    Thanks, great video. On a related topic, somehow, I cannot figure out how to read from PWM? The rp-hal/rp-pico have write example, but not read (I might be missing something).

  • @louiscloete3307
    @louiscloete3307 2 ปีที่แล้ว +1

    Tip: `cargo build` is aliased to `cargo b`; similarly, `cargo run` is aliased to `cargo r`. It gets handy when you have to type it a lot.

    • @soumen_pradhan
      @soumen_pradhan 2 ปีที่แล้ว

      Is there a similar thing for --release ?

    • @louiscloete3307
      @louiscloete3307 2 ปีที่แล้ว

      @@soumen_pradhan cargo b --release and cargo r --release

  • @taylorh140
    @taylorh140 2 ปีที่แล้ว +3

    22.50 KB, seems like a lot for a blinky example.

  • @AlbinoCordeiroJunior
    @AlbinoCordeiroJunior 2 ปีที่แล้ว

    Thanks!

  • @codeman99-dev
    @codeman99-dev ปีที่แล้ว +1

    Serious question: Is there significant advantage to using embassy over using the HAL directly?

  • @NishchalGautam
    @NishchalGautam 3 หลายเดือนก่อน +1

    Hello there, I was wondering if you could do a basic starter for NodeMCU (ESP8266) with rust

  • @falxie_
    @falxie_ 2 ปีที่แล้ว +2

    This is making me want to buy a Pico, but I have no real projects to work on for it

  • @edgeeffect
    @edgeeffect 2 ปีที่แล้ว +4

    This seems hellishly over-complicated when compared to C or Assembly Language.... All of that boiler-plate initialising things I would never intend to use.
    I was initially optimistic about Rust because I can't stand C and I've been looking for a modern replacement for years. But 50-ish lines of boiler plate is making Ada look like a simpler alternative.
    Do we really really need a bootloader in our binary? To load a program that's already in the flash? :(

    • @9names783
      @9names783 2 ปีที่แล้ว +2

      You really *do* need a 2nd stage bootloader for RP2040 if you want to access flash or want a program larger than 256 bytes - regardless of the language you use.
      This is one of the trade-offs of using external SPI flash for program storage on a microcontroller, and is not unique to RP2040 - other flashless micros have similar requirements. We just don't hide them from you in an SDK that only works for one board.

  • @markalanboyd
    @markalanboyd 6 หลายเดือนก่อน

    Great video! Would love to see some hardware audio DSP like a little guitar FX pedal or something.

  • @tk5782
    @tk5782 2 ปีที่แล้ว +1

    Fantastic, thank you! For anybody else who might be getting soem build issues on windows, I had to use the following 2 commands to get the environment set up. Now I have blinky on my RP Pico but it doesn't work on an RP2040 Connect. Is that a different HAL?
    rustup target add thumbv6m-none-eabi
    cargo install elf2uf2-rs

    • @therealjpster
      @therealjpster 2 ปีที่แล้ว +1

      Same HAL but it has a different flash chip so you need to change the boot2 line. The bit that says W25Q80 is actually telling you the part number of the flash chip that particular boot2 supports.
      Or use the Nano Connect 2040 BSP which sets this up for you.

    • @michaelscholten3639
      @michaelscholten3639 ปีที่แล้ว

      I had build issues on Linux (Ubuntu) and after using those commands, my code worked.
      Thanks for your help.

  • @taraskornuta
    @taraskornuta 2 ปีที่แล้ว +5

    And what is the binary size the rust produces compared to do the same application compiled by gcc?

    • @Dygear
      @Dygear 2 ปีที่แล้ว +5

      There is both a gcc and llvm implementation now. They are almost always around the same +/- a few precent.

    • @rafaelbachmann7246
      @rafaelbachmann7246 2 ปีที่แล้ว

      Realistically, a rust binary compiled with default settings will be rather large. But by setting a few options in Cargo.toml you can get it much smaller. Also by avoiding formatting code and using something like defmt you can get it even much lower.

  • @Niohimself
    @Niohimself 3 หลายเดือนก่อน

    11:19 that's not what push-pull means. Push-pull means the pin can push the voltage high (sending current into the wire) or pull the voltage low (sinking current FROM the wire). This is opposed to "Open collector" that can pull but can't push. The reason you would ever want OC mode for a pin is when you want to connect several outputs to a single input, as in this case one pin outputting 1 and the other outputting 0 will just result in an overal value of zero instead of frying both pins.

  • @michawhite7613
    @michawhite7613 2 ปีที่แล้ว +1

    You don't need the ok() call on line 67. Results also have an unwrap() method

  • @sinushkin
    @sinushkin ปีที่แล้ว

    Does it handle with Wifi stack, 2 core usage without linux?

  • @blokhype3074
    @blokhype3074 2 ปีที่แล้ว

    i think this is for mac or raspberry pi 4 what do i need for windows to get started

  • @akasakasvault7597
    @akasakasvault7597 2 ปีที่แล้ว +1

    Rust on everything :
    Devs : let's go
    Chemists : ...

  • @alirezaalavi1504
    @alirezaalavi1504 2 ปีที่แล้ว

    dude I have the same wallpaper as you and for couple of seconds I was so confused :))

  • @scheimong
    @scheimong 2 ปีที่แล้ว +1

    Love it. I've coded in Rust for nearly two years now, but embedded Rust has always been somewhat intimidating. This video series has been an excellent quick start guide for people like me who are pretty experienced in general programming but have little experience working with embedded code.

  • @dibyojyotibhattacherjee897
    @dibyojyotibhattacherjee897 2 ปีที่แล้ว

    Very much awaited series!, although looks a bit verbose, is there any nicer or shorter way!

    • @JaJakubYT
      @JaJakubYT 2 ปีที่แล้ว

      Check out videos on my channel. I have 6 videos on Rust embedded and more to come.

  • @dabunnisher29
    @dabunnisher29 2 หลายเดือนก่อน

    I keep getting this when I try to build it:
    cargo build --release --example blinky
    error: target `blinky` in package `rp2040-hal` requires the features: `critical-section-impl`
    Consider enabling them by passing, e.g., `--features="critical-section-impl"`
    Im assuming I need to adjust my toml file?

    • @bartoszk.6451
      @bartoszk.6451 หลายเดือนก่อน +1

      Hi, I got the same problem, just tell the build system to include additional dependencies to support critical sections:
      cargo build --release --example blinky --features="critical-section-impl"
      you'll probaly need to install additional components i.e.:
      rustup target add thumbv6m-none-eabi
      and
      cargo install elf2uf2-rs

    • @dabunnisher29
      @dabunnisher29 หลายเดือนก่อน

      @@bartoszk.6451 YOU ARE AWESOME!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! That worked. Thank you sooooooo much!!!!!!!!!!!!!!

  • @lambsauce5445
    @lambsauce5445 10 หลายเดือนก่อน

    Maybe you could do an entire series. As a beginner, I'm not entirely sure where I'd go next from here...

  • @Slushee
    @Slushee 2 ปีที่แล้ว

    This is amazing! I would really really appreciate if you did the same but for the ESP32

  • @alexloktionoff6833
    @alexloktionoff6833 4 หลายเดือนก่อน

    Do you have a video about RTIC, how to use both cores of RP2040?

  • @HeadakusMaximus
    @HeadakusMaximus 2 ปีที่แล้ว +2

    You might wish to use purge rather than remove when uninstalling.

  • @wertia391
    @wertia391 4 หลายเดือนก่อน

    Please, do these kind of videos but with embedded C!

  • @ILsupereroe67
    @ILsupereroe67 หลายเดือนก่อน

    At 12:05 you say if you had activated the watchdog you'd need to feed it within the loop, but isn't the delay implicitly doing that already?

  • @pup4301
    @pup4301 2 ปีที่แล้ว

    Thank you are. Your talking my language. ;)

  • @jonathan2847
    @jonathan2847 2 ปีที่แล้ว

    Where you hve `.ok().unwrap()` on lines 67 and 68, I beleive you could remove the `.ok()` and it should result in the exact same behaviour of panicking if something goes wrong (I don't know if something special applies here but that is how it behaves in typical Rust usage)

  • @doctorgreatengineer6834
    @doctorgreatengineer6834 2 ปีที่แล้ว +2

    I want to know how HDL like Verilog works inside FPGA. Am i gonna get any video future here?

    • @LowLevelLearning
      @LowLevelLearning  2 ปีที่แล้ว +2

      I plan on doing FPGA content in the future but I still have a lot of work to do, purchases to make. Stay tuned!

    • @doctorgreatengineer6834
      @doctorgreatengineer6834 2 ปีที่แล้ว

      @@LowLevelLearning thanks a lot

  • @tabletopjam4894
    @tabletopjam4894 2 ปีที่แล้ว +1

    now if only i could find a free resource for learning rust

    • @mikafoxx2717
      @mikafoxx2717 ปีที่แล้ว

      Try typing "cargo docs --book" into your terminal. That's the official rust book and it's quite well written.

  • @gideonz74b
    @gideonz74b ปีที่แล้ว

    It's a nice video... but how about setting up the environment if you are using a board that you made yourself, running a custom SoC, based on RiscV for example? You are using runners and all, but how do you specify how to connect to the hardware, for which target cargo should emit code, etc? This video only shows how to use someone else's configuration.

  • @jellyfin449
    @jellyfin449 2 ปีที่แล้ว

    You do a good job of breaking the code down linexline

  • @Stowy
    @Stowy 2 ปีที่แล้ว +1

    that nice ! but seems like a lot of boiler plate code, would it be possible to not have all of that written all the time ?

    • @chaddaifouche536
      @chaddaifouche536 2 ปีที่แล้ว +1

      Basically, you need all this code to initialize your board properly (the joy of embedded code). On the other hand since most of this doesn't change and the "real" code specific to your purpose here is only a few line, there are templates that already have all the boilerplate and you can just reuse when needed.

  • @connorcantrell1883
    @connorcantrell1883 ปีที่แล้ว

    What is a boot block?

  • @MegaOnerb
    @MegaOnerb ปีที่แล้ว

    How to write rust to run on sega genesis console? Is this possible?

  • @atomatopia1
    @atomatopia1 2 ปีที่แล้ว +3

    And here I was expecting the steam game…

  • @vsevhpme
    @vsevhpme ปีที่แล้ว

    How to return to factory settings?

  • @INeedAttentionEXE
    @INeedAttentionEXE ปีที่แล้ว

    I needed to install "elf2uf2-rs" with "cargo install elf2uf2-rs" to get it to work. Idk why it's not already a dependency?

  • @fammioli
    @fammioli 2 ปีที่แล้ว

    Watched three minutes of this under the impression that we were talking about rust the video game

  • @martijn3151
    @martijn3151 3 หลายเดือนก่อน

    Doesn’t every byte code compiled language run on everything?

  • @Maric18
    @Maric18 2 ปีที่แล้ว +1

    well if rust runs on everything, can someone please help me compile songbird-py on aarch64?

  • @connorcantrell1883
    @connorcantrell1883 ปีที่แล้ว

    What is a linker?

  • @konstantinnikitin6883
    @konstantinnikitin6883 ปีที่แล้ว

    I didn't understand anything, but I like it :-)

  • @nathanruben3372
    @nathanruben3372 3 หลายเดือนก่อน

    I use asdf to manage rust, node, ruby, python and many other langage versions and environments....

  • @etopowertwon
    @etopowertwon 2 ปีที่แล้ว +1

    Maybe I'm spoiled by ATmega, where to init the chip you need to write a value to the same address two times, but this looks ugly. I have a very strong belief if you pass 3+ fields to a function, such function should be a method (or has method to wrap the call). Something like `let mut watchdog, clocks = pac.init_clocks(XTAL_FREQ_HZ)` would be cleaner abstraction. Pins initialization smells: bank0 is specified three times, so much DRY. boot sector needs to be set up manually (Can't rust macro emit it? We already use [entry] as a macro)
    halt as panic feels half-baked. We don't send messages over UART or blink, we just halt.

  • @jjmalm
    @jjmalm หลายเดือนก่อน

    I'm old enough to remember when we kicked, not fed, watchdogs

  • @greatgruff1442
    @greatgruff1442 2 ปีที่แล้ว +1

    Open the door HAL

  • @alerey4363
    @alerey4363 2 ปีที่แล้ว +1

    what are the advantages of rust? is there really a need for this language?

  • @SF-eg3fq
    @SF-eg3fq 2 ปีที่แล้ว

    so it actually make the embedded system completely memory safe?

    • @therealjpster
      @therealjpster 2 ปีที่แล้ว +3

      Well, mostly. You can be sure the bits outside the 'unsafe' blocks are safe, but ultimately embedded code needs to put magic values at magic addresses and there's no way for the compiler to know that that's OK. So we write the PAC and the HAL using bits of 'unsafe' Rust that we have manually checked are actually ok, and give you higher level APIs that are memory safe.

  • @hv1461
    @hv1461 ปีที่แล้ว

    What about embedded HAL ?