Embedded Rust on Espressif training material.

Overview

Embedded Rust Trainings for Espressif

This repository contains Training Material for learning to use Embedded Rust with the Espressif ESP32-C3.

We suggest you start by reading the book.

Contents

There is:

  • A book you can work through - (Source) (Published)
  • Some introductory level examples:
  • Some advanced level examples:
    • Low-level GPIO
    • Interrupts in General
    • I2c Driver (Source)
    • I2c Sensor Reading (Source)
    • GPIO/Button Interrupts (Source)
    • Driving an RGB LED
  • Some useful common crates:
  • Some extra bits:

Please note, much of this material remains a work in progress!

Development

Each Rust example crate provided here can be built in the usual fashion. See the Embedded Rust Bookshelf for general details, or each crate's own README.md file for specifics.

The book is written in Markdown, using mdbook. You can render a local copy by running:

~ $ cargo install mdbook
~ $ git clone https://github.com/ferrous-systems/espressif-trainings.git
~ $ cd espressif-trainings/book
~/espressif-trainings/book $ mdbook serve

A local web-server will be started on http://127.0.0.1:3000 where you can view the rendered book. It will update automatically as you modify Markdown pages on disk.

Note that you must not push to the main branch. Instead undertake any changes in a branch, either in this repository (if you have access) or in a fork. Please do then feel free to open a Pull Request in Github to merge the changes to our main branch.

This work is continually updated and as such there are no 'releases'. Every commit to main gets published to https://espressif-trainings.ferrous-systems.com automatically.

Licence

The material in this repository is licensed CC BY-SA 4.0. All material is Copyright 2022 Ferrous Systems GmbH, unless otherwise stated.

You are free to Share and Adapt but you must give Attribution and Share Alike.

In addition, the source code contained within this repository (either in the book, or as separate examples) is made available under either the MIT or Apache-2.0 licenses, at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be licensed as above, without any additional terms or conditions.

Code of Conduct

Contribution to this crate is organized under the terms of the Rust Code of Conduct, and the maintainer of this crate, Ferrous Systems GmbH, promises to intervene to uphold that code of conduct.

You might also like...
🦀Rust Turkiye - Rust Dersleri

Rust Turkiye - Rust Dersleri CURIOSITY - Featuring Richard Feynman Bu repo Rust Turkiye tarafindan duzenlenen Rust Dersleri egitiminin alistirma ve ko

A Rust machine learning framework.

Linfa linfa (Italian) / sap (English): The vital circulating fluid of a plant. linfa aims to provide a comprehensive toolkit to build Machine Learning

Machine Learning library for Rust

rusty-machine This library is no longer actively maintained. The crate is currently on version 0.5.4. Read the API Documentation to learn more. And he

Rust library for Self Organising Maps (SOM).
Rust library for Self Organising Maps (SOM).

RusticSOM Rust library for Self Organising Maps (SOM). Using this Crate Add rusticsom as a dependency in Cargo.toml [dependencies] rusticsom = "1.1.0"

Rust language bindings for TensorFlow
Rust language bindings for TensorFlow

TensorFlow Rust provides idiomatic Rust language bindings for TensorFlow. Notice: This project is still under active development and not guaranteed to

Machine learning crate for Rust

rustlearn A machine learning package for Rust. For full usage details, see the API documentation. Introduction This crate contains reasonably effectiv

Rust bindings for the C++ api of PyTorch.

tch-rs Rust bindings for the C++ api of PyTorch. The goal of the tch crate is to provide some thin wrappers around the C++ PyTorch api (a.k.a. libtorc

个人的 rust 学习资料

🔝 通知: 项目文档迁移到: https://github.com/higker/learn-rust learning-rust-zh 个人的 rust 学习资料 学习目录 目录 源代码地址 相关解析 第一个rust程序 https://github.com/higker/learning-ru

Distributed compute platform implemented in Rust, and powered by Apache Arrow.
Distributed compute platform implemented in Rust, and powered by Apache Arrow.

Ballista: Distributed Compute Platform Overview Ballista is a distributed compute platform primarily implemented in Rust, powered by Apache Arrow. It

Comments
  • EspHttpServer.handle_get not found

    EspHttpServer.handle_get not found

    2022-12-13_17-31

    EspHttpServer.handle_get methods not found at EspHttpServer struct when i test http server demo.

    build error:

       Compiling http-server v0.1.0 (/home/iric/code/learn/espressif-trainings/intro/http-server)
    error: could not compile `http-server` due to 3 previous errors; 2 warnings emitted
    warning: unused imports: `io::Write`, `registry::Registry`
      --> examples/http_server.rs:10:20
       |
    10 |     http::server::{registry::Registry, Response},
       |                    ^^^^^^^^^^^^^^^^^^
    11 |     io::Write,
       |     ^^^^^^^^^
       |
       = note: `#[warn(unused_imports)]` on by default
    
    error[E0599]: no method named `handle_get` found for struct `EspHttpServer` in the current scope
      --> examples/http_server.rs:31:12
       |
    31 |     server.handle_get("/", |_request, response| {
       |            ^^^^^^^^^^ method not found in `EspHttpServer`
    
    error[E0599]: no method named `handle_get` found for struct `EspHttpServer` in the current scope
      --> examples/http_server.rs:41:12
       |
    41 |     server.handle_get("/temperature", move |_request, response| {
       |            ^^^^^^^^^^ method not found in `EspHttpServer`
    
    warning: unused import: `Response`
      --> examples/http_server.rs:10:40
       |
    10 |     http::server::{registry::Registry, Response},
       |                                        ^^^^^^^^
    
    error: aborting due to 2 previous errors; 2 warnings emitted
    
    
    opened by IricBing 2
  • cannot find value `esp_crt_bundle_attach` in crate `esp_idf_sys`

    cannot find value `esp_crt_bundle_attach` in crate `esp_idf_sys`

    PS D:\intro\http-client> cp .\examples\https_client.rs .\src\main.rs       
    PS D:\intro\http-client> cargo espflash --release --monitor COM5    
    New version of cargo-espflash is available: v2.0.0-rc.1
    
    Serial port: COM5
    Connecting...
    
       Compiling http-client v0.1.0 (D:\intro\http-client)
    error: could not compile `http-client` due to 2 previous errors 
    error[E0425]: cannot find value `esp_crt_bundle_attach` in crate `esp_idf_sys`
      --> src\main.rs:40:46
       |
    40 |         crt_bundle_attach: Some(esp_idf_sys::esp_crt_bundle_attach),
       |                                              ^^^^^^^^^^^^^^^^^^^^^ not found in `esp_idf_sys`
    
    error: aborting due to previous error
    
    For more information about this error, try `rustc --explain E0425`.
    PS D:\intro\http-client> 
    
    
    opened by cxgreat2014 1
  • embedded-io compilation fails

    embedded-io compilation fails

    After following the instructions in the book, I tried building the Hello Board project with cargo build --target riscv32imc-esp-espidf. The build then fails with many errors of the following type:

       Compiling embedded-io v0.3.1
    error[E0658]: generic associated types are unstable
      --> /home/<user>/.cargo/registry/src/github.com-1ecc6299db9ec823/embedded-io-0.3.1/src/asynch.rs:17:5
       |
    17 | /     type ReadFuture<'a>: Future<Output = Result<usize, Self::Error>>
    18 | |     where
    19 | |         Self: 'a;
       | |_________________^
       |
       = note: see issue #44265 <https://github.com/rust-lang/rust/issues/44265> for more information
       = help: add `#![feature(generic_associated_types)]` to the crate attributes to enable
    

    My rust toolchain is up to date and the specific version requested in the book is available:

    $ rustup toolchain list
    stable-x86_64-unknown-linux-gnu (default)
    nightly-2022-03-10-x86_64-unknown-linux-gnu (override)
    
    opened by JuliDi 8
  • Book improvements

    Book improvements

    • Project name: hello-world
    • DevContainer Support: false
    • STD support: true
    • MCU: esp32c3
    • ESP-IDF version: 4.4
    opened by SergioGasquez 0
Owner
Ferrous Systems
Rust knowledge. Collected.
Ferrous Systems
Rust implementation of real-coded GA for solving optimization problems and training of neural networks

revonet Rust implementation of real-coded genetic algorithm for solving optimization problems and training of neural networks. The latter is also know

Yury Tsoy 19 Aug 11, 2022
A collection of CC-BY-SA course material to teach the Rust programming language, in different formats, levels, and focus points

A collection of CC-BY-SA course material to teach the Rust programming language, in different formats, levels, and focus points. Contact me for remote and on-site trainings!

Katharina Fey 13 Apr 13, 2023
High performance distributed framework for training deep learning recommendation models based on PyTorch.

PERSIA (Parallel rEcommendation tRaining System with hybrId Acceleration) is developed by AI platform@Kuaishou Technology, collaborating with ETH. It

null 340 Dec 30, 2022
A machine learning library for supervised training of parametrized models

Vikos Vikos is a library for supervised training of parameterized, regression, and classification models Design Goals Model representations, cost func

Blue Yonder GmbH 10 May 10, 2022
Deduplicating Training Data Makes Language Models Better

Deduplicating Training Data Makes Language Models Better This repository contains code to deduplicate language model datasets as descrbed in the paper

Google Research 431 Dec 27, 2022
NEATeRS is a library for training a genetic neural net through reinforcement learning.

NEATeRS NEATeRS is a library for training a genetic neural net through reinforcement learning. It uses the NEAT algorithm developed by Ken Stanley whi

TecTrixer 3 Nov 28, 2022
Embedded Rust arithmetic, 2D/3D vector, and statistics library

Embedded-friendly (i.e. no_std) Rust math library featuring fast, safe floating point approximations for common arithmetic operations, trigonometry, 2D/3D vector types, statistical analysis, and quaternions.

Tony Arcieri 318 Dec 22, 2022
Msgpack serialization/deserialization library for Python, written in Rust using PyO3, and rust-msgpack. Reboot of orjson. msgpack.org[Python]

ormsgpack ormsgpack is a fast msgpack library for Python. It is a fork/reboot of orjson It serializes faster than msgpack-python and deserializes a bi

Aviram Hassan 139 Dec 30, 2022
Practice repo for learning Rust. Currently going through "Rust for JavaScript Developers" course.

rust-practice ?? Practice repo for learning Rust. Directories /rust-for-js-dev Files directed towards "Rust for JavaScript Developers" course. Thank y

Sammy Samkough 0 Dec 25, 2021
A Rust library with homemade machine learning models to classify the MNIST dataset. Built in an attempt to get familiar with advanced Rust concepts.

mnist-classifier Ideas UPDATED: Finish CLI Flags Parallelize conputationally intensive functions Class-based naive bayes README Image parsing Confusio

Neil Kaushikkar 0 Sep 2, 2021