A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/jhaand/rust4mch below:

jhaand/rust4mch: Example to run Rust code on the MCH2022 badge.

Rust on the MCH2022 badge

This repo contains instructions and code to run Rust on the MCH2022 badge.

It also contains instructions and recommendations on how to start a new project.

Installing the toolchains

Install the Rust toolchain for ESP, see full instructions here

  1. Install the prerequisites
  2. Clone the repository or download the installer
  3. Run the following command: require("core")
  4. Update the environment variables as told at the end of the installation script.
  5. Keep a copy of the MCH2022 webusb tools close by in the same directory as this project. Clone it from: https://github.com/badgeteam/mch2022-tools
cargo espflash save-image ESP32 rust4mch.img 

Or run the build.sh script.

../mch2022-tools/webusb_push.py rust4mch rust4mch.img

Or run the upload.sh script

Official Badge.team documentation

The official process for the badge can be found here. https://www.badge.team/docs/badges/mch2022/software-development/rust/

It provides a simple 'hello world' example over serial and a more advanced example.

Use esp-idf-template as starting point:

cargo generate  https://github.com/esp-rs/esp-idf-template

cargo-generate will as you a few questions, after those, you will have a "Hello, world!" Rust binary crate for the ESP-IDF framework.

Answer the questions as follows:

Use esp-template as starting point:

cargo generate  https://github.com/esp-rs/esp-template

cargo-generate will as you a few questions, after those, you will have a bare-metal minimalist project!

This project added a minimal hello world example in the examples directory. You can run it as follows:

cargo build --example hello_world
cd target/xtensa-esp32-espidf/debug/examples/
esptool.py --chip esp32 elf2image hello_world

Reset the badge. Connect a serial program to /dev/ttyACM0 at 115k2 baud. After that you can navigate to the apps and run the app.

Rust on ESP32 STD Demo App

The best example on useing std Rust on the ESP32 can be found here. It uses a lot of peripheral and protocols.

https://github.com/ivmarkov/rust-esp32-std-demo.git

git clone https://github.com/ivmarkov/rust-esp32-std-demo.git
cd rust-esp32-std-demo/

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4