Embedded rust: compiling for ESP32 devices and creating a simple blinky

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

КОМЕНТАРІ • 19

  • @sayanee
    @sayanee 2 роки тому +11

    Thanks for showing the errors! Setting up a toolchain is exactly this and it can be painful. I learned from you debugging it out loud. Hope to get Rust running with ESP32 as well.

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

    Thank you very much. This was great tutorial ! More please

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

    Nice walk through of setting up and blinky.

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

    Cool that you did it in a VM to show what errors one might encounter. Helped a lot :)!

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

    Wonderful information. A small thing. The Wroom Devkit has internal LED on pin18, not pin2 as many other kits have.

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

    fwiw, rust-build is now deprecated and its replacement is "espup", which was a pretty straight-forward procedure for me to get a working rust-on-esp toochain

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

    This video is super helpful, thank you!

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

    Super helpful, thanks! I noticed that my demo does `Building [=======================> ] 196/202: esp-idf-sys(build) / Finished release [optimized] target(s) in 52.62s` - this is a VM with 24 vcores (Threadripper 1950X) and 64GB RAM. It is no slouch, but this feels slower than I'd expect it to be.

    • @embedded-rust
      @embedded-rust  2 роки тому +2

      I think the first build pass is always very slow, however subsequent builds should not need to rebuild sub-crates and hopefully they are faster - for me they generally are.
      I believe in this instance a threadripper may also optimise for parallelism rather than pure GHz and I am not sure rust can take fully advantage of that. I also wish rust compiles would be faster. Until that happens, `cargo check` and debug builds seem to be the way to iteratively develop.

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

    Great video! I learned soo much.

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

    Hey, Thanks for the effort. I appreciate your content. I have a small question,
    What distro&theme do you use? and also i am really interested in the disappearing terminal

    • @embedded-rust
      @embedded-rust  2 роки тому +3

      Hi,
      I use Manjaro linux. For a desktop environment I use bspwm and the disappearing terminal is a tabbed + alacritty. The script for triggering this is messy (to switch to the right window and show/hide) and looks like:
      ```
      #!/usr/bin/env bash
      set -x
      window_id=$(xdo id -N tabbed)
      if [ -n "$window_id" ]; then
      bspc query -m pointed --nodes "$window_id"'.focused.!hidden' | grep "$window_id"
      if [ $? -eq 0 ]; then
      # non-hidden window in the current monitor/desktop. can hide
      bspc node "$window_id" -g hidden
      else
      # if really hidden, unhide.
      bspc query -m pointed --nodes "$window_id"'.hidden' | grep "$window_id"
      if [ $? -eq 0 ]; then
      bspc node "$window_id" -g hidden -m pointed
      fi
      bspc node "$window_id" -d focused
      bspc node "$window_id" -m pointed
      bspc node "$window_id" -f
      fi
      else
      setsid tabbed -n tabbed -c -g '3240x1500+300+48' -t darkblue -U red alacritty --embed
      fi
      ```

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

      @@embedded-rust Cool mate! Thanks for your response

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

    Woww, it really is complicated

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

    Out of curiosity, does ESP32 have enough flash to store a rust binary that does anything useful? 3.6M seems to be excessive for a simple blinky demo

    • @embedded-rust
      @embedded-rust  2 роки тому +3

      ESP32 has a lot of flash compared to most other embedded systems. That being said, I believe most of the size of the binary comes from debug symbols and those do not end up on the device. I would expect the binary to become much smaller after a strip or an objcopy to bin format.

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

    Awesome

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

    Thanks dude... It looks complicated for just blinky app.. 😢😢