Giter Site home page Giter Site logo

d1-mini's Introduction

d1-mini

Crates.io Docs License

A Board Support Package (BSP) which provides a type-safe API for the WEMOS/LOLIN D1 mini.

Resources

Getting Started

NOTE: This crate's dependencies are still in the early stages of development, and various features may be incomplete or missing altogether. With this being pre-1.0 software, the public API is subject to change at any time.

Prerequisites

Because the Xtensa target is not officially supported, you must use a custom fork of Rust. Pre-built artifacts for common operating systems are available via the esp-rs/rust-build repository's releases page. Alternatively, you can build the compiler from source; for more information on this process, please refer the the esp-rs/rust fork's README, which has detailed instructions for most popular operating systems.

You will additionally need the appropriate Xtensa toolchain. You can download pre-built binaries from Espressif, or build them yourself using esp-open-sdk. In either case, make sure that the resulting binaries are in your $PATH.

Build the Examples

You can build all examples at once, or just build one at a time:

$ cargo build --release --examples
$ cargo build --release --example=blinky

Flash the Device

espflash

espflash is a community developed tool (written entirely in Rust) for flashing ESP32- and ESP8266-based devices. It provides a CLI tool for flashing the aforementioned devices as well as an additional crate, cargo-espflash, which provides a cargo subcommand which compiles and flashes your device with one command.

For more information on these tools, please refer to their respective READMEs.

Examples

Make sure you replace <PORT> with the appropriate value prior to running either of the below commands.

Using espflash:

$ espflash <PORT> target/xtensa-esp8266-none/release/examples/blinky

Using cargo-espflash:

$ cargo espflash --release --example=blinky <PORT>

esptool

You can use the official tool from Espressif, esptool.py, to flash the firmware to your device. Make sure this has been installed and esptool.py is available in your $PATH.

First convert the ELF-formatted binary to a flashable image:

$ esptool.py \
>   --chip esp8266 \
>   elf2image \
>   target/xtensa-esp8266-none/release/examples/blinky

Then you're ready to flash the image to the device; make sure you replace <PORT> with the appropriate value prior to running the command:

$ esptool.py \
>   --port <PORT> \
>   write_flash \
>   -fm dio \
>   -fs 32m \
>   0x00000 \
>   target/xtensa-esp8266-none/release/examples/blinky-0x00000.bin

License

Licensed under either of:

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 dual licensed as above, without any additional terms or conditions.

d1-mini's People

Contributors

black-puppydog avatar jessebraham 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.