A minimal esp-hal application template for use with cargo-generate

Overview

{{ project-name }}

A minimalist template for use with cargo-generate to create no_std applications targeting Espressif's line of SoCs and modules. At present this template supports the ESP32, ESP32-C3, ESP32-S2, and ESP32-S3; additional devices will be added as they become available.

To generate a project using this template:

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

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.

Comments
  • Toolchain update, fix `cargo-generate`, and fix scripts

    Toolchain update, fix `cargo-generate`, and fix scripts

    • Updated toolchain version to 1.62.1.0
    • Added an extra step that installs cargo-generate via cargo if the binary installation failed
    • Formated scripts
    • Fixed an issue where elf path in scripts was not correct for projects with - on the name
    • Update https://github.com/esp-rs/esp-hal/pull/134 changes
    • Update xtensa-atomic-emulation-trap version
    opened by SergioGasquez 6
  • Help - erro on generate template

    Help - erro on generate template

    Hi, I'm trying to use cargo generate, but it throw this error:

    cargo generate https://github.com/esp-rs/esp-template          
    error: Found argument 'https://github.com/esp-rs/esp-template' which wasn't expected, or isn't valid in this context
    
    USAGE:
        cargo generate [FLAGS] [OPTIONS] --git <git>
    
    For more information try --help
    

    when I use --git:

    cargo generate --git=https://github.com/esp-rs/esp-template
     Project Name: test-esp8266
     Creating project called `test-esp8266`...
    Error:  Git Error: failed to clone into: /home/samuel/Downloads/test-esp8266IXEFXF
    

    Have I did something wrong ?

    why there is no esp8266 template ?

    opened by samuel-cavalcanti 4
  • When do I call init_heap()?

    When do I call init_heap()?

    I just used cargo generate to create a new project for ESP32C3 with allocations via the esp-alloc crate. When I build I get this warning message:

    warning: function `init_heap` is never used
      --> src\main.rs:10:4
       |
    10 | fn init_heap() {
       |    ^^^^^^^^^
       |
       = note: `#[warn(dead_code)]` on by default
    

    Should I call init_heap() first thing in main()?

    opened by matthew-a-thomas 3
  • Improve dev container support

    Improve dev container support

    • Add devcontainer support for:
      • VS Code Dev Containers
      • Gitpod
      • GitHub Codespaces
    • When using dev containers:
      • Wokwi support
      • Web flasher support
      • Readme with instructions
    opened by SergioGasquez 3
  • wish: Blinking LED

    wish: Blinking LED

    The current template is a hollow shell. My wish is that it gets "blinking LED" code.

    Benefits I see:

    • The whole toolchain can be verified
    • There is something that works and can be tweaked ( frequency of LED blinking )

    Possible down side: The unwanted source code has to be removed. (but that is outweighted by all project starts that do need / want something that proves a working target)

    opened by stappersg 2
  • Add an option for an alloc crate

    Add an option for an alloc crate

    I'm new to rust on embedded systems. I want to use esp-hal instead of esp-idf because idf has lots of stuff and configuration I dont understand, so being more bare metal will help me learn here.

    I am attempting to use the alloc crate, it would be great if the cargo generate for this template prompted the user to ask them if they want to use alloc, and gives them a good default global allocator to use, like esp-alloc

    enhancement 
    opened by TheButlah 1
  • Avoid using hardcoded repo for PRs

    Avoid using hardcoded repo for PRs

    • If any user would like to submit a PR from a fork of the repo, the CI should use his repo (and the propper branch) to generate the project to build
    • Fix conditions to generate a project as schedule triggers were not generating any project,hence the CI was failing
    opened by SergioGasquez 1
  • Update xtensa-lx-rt to 0.14.0

    Update xtensa-lx-rt to 0.14.0

    Before applying these changes, both version 0.13 and version 0.14 was built when I created a new repo using this template. It resulted in link errors like these:

    error: linking with `xtensa-esp32-elf-gcc` failed: exit status: 1
      |
      = note: "xtensa-esp32-elf-gcc" <snip>
      = note: <snip>/xtensa-esp32-elf/bin/ld: <snip>/deps/libxtensa_lx_rt-e583d49af76632b7.rlib(xtensa_lx_rt-e583d49af76632b7.xtensa_lx_rt.eb13f165-cgu.11.rcgu.o): in function `__default_exception':
              <snip>/.cargo/registry/src/github.com-1ecc6299db9ec823/xtensa-lx-rt-0.14.0/src/exception/esp32.rs:95: multiple definition of `__default_exception'; <snip>/deps/libxtensa_lx_rt-b7c97e11631cd506.rlib(xtensa_lx_rt-b7c97e11631cd506.xtensa_lx_rt.5a35a154-cgu.1.rcgu.o):<snip>/.cargo/registry/src/github.com-1ecc6299db9ec823/xtensa-lx-rt-0.13.0/src/exception/esp32.rs:95: first defined here
    <snip>
    
    opened by LinusU 0
  • Update dependencies version

    Update dependencies version

    • Updated some dependencies versions

    Maybe we should come up with a way to notify when a new version of the dependencies is available (something like dependabot) for the template that we could integrate in the CI

    opened by SergioGasquez 0
  • The README should be improved

    The README should be improved

    We should briefly describe each prompt, its options, and why you may or may not want to use any given feature.

    @SergioGasquez maybe if you had some time (this is low priority) you could look into this? If not I can do it at some point. If you're interested please just assign yourself to the issue!

    documentation enhancement 
    opened by jessebraham 0
  • Update toolchain version and fix `esp-hal` revision

    Update toolchain version and fix `esp-hal` revision

    • Update rust toolchain version to 1.63.0.2
    • Update editor.formatOnSaveMode property as it was not formatting documents properly.
    • Update esp-hal revision to include https://github.com/esp-rs/esp-hal/pull/176
    opened by SergioGasquez 0
Owner
esp-rs
Libraries, crates and examples for using Rust on Espressif SoC's
esp-rs
Crib - Extensible, Minimal Template for Sway Projects

crib • Extensible, Minimal Template for Sway Projects. Developing First Time? New to rust? Install with: curl --proto '=https' --tlsv1.2 -sSf https://

velleity.eth 17 Jul 31, 2022
Extensible, Minimal Template for Sway Projects

crib • Extensible, Minimal Template for Sway Projects. Developing First Time? New to rust? Install with: curl --proto '=https' --tlsv1.2 -sSf https://

andreas 17 Jul 31, 2022
Minimal compile-time Rust template engine

boilerplate boilerplate is a minimal compile-time Rust text template engine. Quick Start Add boilerplate to your project's Cargo.toml: [dependencies]

Casey Rodarmor 15 Dec 30, 2022
A minimal template for building smart contracts with Cairo 1.0

Minimal Cairo 1.0 Template Built with auditless/cairo-template A minimal template for building smart contracts with Cairo 1.0 using the Quaireaux proj

Auditless 68 Apr 21, 2023
Minimal template for simulating contracts with arbiter.

arbiter-template Minimal template for simulating contracts with arbiter. Usage Clone this repository git clone https://github.com/primitivefinance/arb

Primitive 28 Aug 15, 2023
cargo-crev to cargo-vet code review exporter

cargo-crev to cargo-vet converter Crev and Vet are supply-chain security tools for auditing Rust/Cargo dependencies. This tool (crevette) is a helper

crev - Code REView system 3 Dec 6, 2023
Generate Nice Solana Address By Template

Yes, I know about GPU generators. https://smith-mcf.medium.com/solana-vanity-address-using-gpus-5a68ad94d1d4 ./solana-nice-address --help solana-nice-

Kirill Fomichev 18 Jun 18, 2022
Unified directories for different use cases of an application, providing standard directories for local development, when run as service or when run by a user.

UniDirs Unified directories for different use cases of an application, providing standard directories for local development, when run as service or wh

Dominik Nakamura 3 Sep 30, 2022
Minimal implementation of the Mimblewimble protocol.

Grin Grin is an in-progress implementation of the Mimblewimble protocol. Many characteristics are still undefined but the following constitutes a firs

null 5k Dec 28, 2022
A Minimal Windows SDK.

Minimal Windows 10 SDK Installs only the necessary Windows 10 .lib files to save you having to download the full Visual Studio package. You can either

null 58 Dec 18, 2022
Minimal Substrate node configured for smart contracts via pallet-contracts.

substrate-contracts-node This repository contains Substrate's node-template configured to include Substrate's pallet-contracts ‒ a smart contract modu

Parity Technologies 73 Dec 30, 2022
A terminal-based daily task management tool with minimal overhead

Arenta A terminal-based daily task management tool with minimal overhead. Demo Features Complete CRUD support of daily tasks with intuitive syntax Vis

Tao Bocheng 4 Feb 25, 2023
Minimal flashloan borrower contracts with an extensible rust sdk to abstract wrapping generic onchain calls (similar to multicall3) with flashloans.

flashloan-rs • Minimal flashloan borrower contracts with an extensible rust sdk. Getting Started Flashloan-rs is published to crates.io as flashloan-r

White Noise 71 Apr 15, 2023
Minimal Bitcoin wallet intended for teaching rust-bitcoin

Insanely minimal Bitcoin wallet intended for demonstration of Rust Bitcoin ecosystem Absolutely DO NOT use with mainnet funds!!! No privacy - address

Martin Habovštiak 4 May 5, 2023
A holistic, minimal documentation portal for the Polkadot developers.

polkadot-sdk-docs A holistic, minimal documentation portal for the Polkadot developers. Master Tutorial The very, very rough plan that I have so far i

Parity Technologies 9 May 26, 2023
A cryptographically verifiable code review system for the cargo (Rust) package manager.

A cryptographically verifiable code review system for the cargo (Rust) package manager.

crev - Code REView system 1.8k Jan 2, 2023
✈️A private, authenticated, permissioned cargo registry

chartered a little dig at creating a private cargo repository with authenticated downloads, the plan is to have git connect to a git server we setup t

Jordan Doyle 121 Dec 26, 2022
Audit Cargo.lock files for dependencies with security vulnerabilities

RustSec Crates ?? ??️ ?? The RustSec Advisory Database is a repository of security advisories filed against Rust crates published via crates.io. The a

RustSec 1.2k Dec 30, 2022
Extends cargo to execute the given command on multiple crates - upstream is at

cargo-multi GitLab CI: master: develop: Travis: master: develop: Extends cargo to execute the given command on multiple crates. Inspired by git multi.

Cyril Plisko 6 Feb 27, 2022