Code Monkey home page Code Monkey logo

trimble's Introduction

trimble - some self contained esp32s3 examples

examples

Each directory is an entirely independent project showing how to use some feature of rust on esp32s3

apple

Basic "hello world", but entirely in rust by using the esp-idf-sys crate and existing support in std for println and main.

blueberry

  • Use embedded-hal and esp-idf-hal to make the RGB LED on the esp32-s3-devkitC light flash.
  • Use the log crate to send info! logs to the espmonitor (instead of plain prints)

carrot

  • Use embedded-svc and esp-idf-svc to store data to NVS and retrieve data from NVS (at startup)

Building & Running these

  1. Install the esp rust toolchain
git clone https://github.com/esp-rs/rust-build.git
./rust-build/install-rust-toolchain.sh
  1. Install some tools:
cargo install cargo-espflash
cargo install ldproxy
  1. Install ccache and sccache for caching (highly recommended), and configure them
# Note: package manager dependent
nix-env -i ccache sccache

Add this to your ~/.cargo/config.toml

[build]
rustc-wrapper = "sccache"
  1. Run ../cargo-esp espflash --monitor --release from any of the example directories

Crates that you may need to use to work with ESP32s3

  • esp-idf-hal includes rust types and functions that allow access to basic/typical peripherals on the esp32s3, like GPIO, SPI, etc. It impliments traits in embedded-hal. Generic code (code that doesn't want to be platform specific) can use embedded-hal traits and accept objects implimenting those traits as inputs.
  • esp-idf-svc provides
  • esp-idf-sys: raw bindings to functions and types in the esp-idf. This should be a last resort, instead use esp-idf-svc and esp-idf-hal

trimble's People

Contributors

codyps avatar codysch avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.