generated from luke-else/esp32-std-template
	Updated cargo dependencies and upgrades to IDF v5.1.1
This commit is contained in:
		@@ -5,12 +5,13 @@ target = "xtensa-esp32-espidf"
 | 
			
		||||
linker = "ldproxy"
 | 
			
		||||
# runner = "espflash --monitor" # Select this runner for espflash v1.x.x
 | 
			
		||||
runner = "espflash flash --monitor" # Select this runner for espflash v2.x.x
 | 
			
		||||
 | 
			
		||||
rustflags = [ "--cfg",  "espidf_time64"] # Extending time_t for ESP IDF 5: https://github.com/esp-rs/rust/issues/110
 | 
			
		||||
 | 
			
		||||
[unstable]
 | 
			
		||||
build-std = ["std", "panic_abort"]
 | 
			
		||||
 | 
			
		||||
[env]
 | 
			
		||||
# Note: these variables are not used when using pio builder (`cargo build --features pio`)
 | 
			
		||||
ESP_IDF_VERSION = "release/v4.4"
 | 
			
		||||
ESP_IDF_VERSION = "release/v5.1"
 | 
			
		||||
ESP_IDF_PATH_ISSUES = "warn" # or "ignore"
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										21
									
								
								Cargo.toml
									
									
									
									
									
								
							
							
						
						
									
										21
									
								
								Cargo.toml
									
									
									
									
									
								
							@@ -15,23 +15,18 @@ opt-level = "z"
 | 
			
		||||
 | 
			
		||||
[features]
 | 
			
		||||
 | 
			
		||||
default = ["std", "hal", "esp-idf-sys/native"]
 | 
			
		||||
default = ["std", "embassy", "esp-idf-svc/native"]
 | 
			
		||||
pio = ["esp-idf-svc/pio"]
 | 
			
		||||
std = ["alloc", "esp-idf-svc/binstart", "esp-idf-svc/std"]
 | 
			
		||||
alloc = ["esp-idf-svc/alloc"]
 | 
			
		||||
nightly = ["esp-idf-svc/nightly"]
 | 
			
		||||
experimental = ["esp-idf-svc/experimental"]
 | 
			
		||||
embassy = ["esp-idf-svc/embassy-sync", "esp-idf-svc/critical-section", "esp-idf-svc/embassy-time-driver"]
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
pio = ["esp-idf-sys/pio"]
 | 
			
		||||
all = ["std", "nightly", "experimental", "embassy"]
 | 
			
		||||
hal = ["esp-idf-hal", "embedded-svc", "esp-idf-svc"]
 | 
			
		||||
std = ["alloc", "esp-idf-sys/std", "esp-idf-sys/binstart", "embedded-svc?/std", "esp-idf-hal?/std", "esp-idf-svc?/std"]
 | 
			
		||||
alloc = ["embedded-svc?/alloc", "esp-idf-hal?/alloc", "esp-idf-svc?/alloc"]
 | 
			
		||||
nightly = ["embedded-svc?/nightly", "esp-idf-svc?/nightly"] # Future: "esp-idf-hal?/nightly"
 | 
			
		||||
experimental = ["embedded-svc?/experimental", "esp-idf-svc?/experimental"]
 | 
			
		||||
embassy = ["esp-idf-hal?/embassy-sync", "esp-idf-hal?/critical-section", "esp-idf-hal?/edge-executor", "esp-idf-svc?/embassy-time-driver", "esp-idf-svc?/embassy-time-isr-queue"]
 | 
			
		||||
 | 
			
		||||
[dependencies]
 | 
			
		||||
log = { version = "0.4.17", default-features = false }
 | 
			
		||||
esp-idf-sys = { version = "0.33", default-features = false }
 | 
			
		||||
esp-idf-hal = { version = "0.41", optional = true, default-features = false }
 | 
			
		||||
esp-idf-svc = { version = "0.46", optional = true, default-features = false }
 | 
			
		||||
esp-idf-svc = { version = "0.47.3", default-features = false }
 | 
			
		||||
embedded-svc = { version = "0.25", optional = true, default-features = false }
 | 
			
		||||
nmea-parser = "0.10.0"
 | 
			
		||||
embedded-graphics = "0.8.0"
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										3
									
								
								build.rs
									
									
									
									
									
								
							
							
						
						
									
										3
									
								
								build.rs
									
									
									
									
									
								
							@@ -1,6 +1,5 @@
 | 
			
		||||
// Necessary because of this issue: https://github.com/rust-lang/cargo/issues/9641
 | 
			
		||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
 | 
			
		||||
    embuild::build::CfgArgs::output_propagated("ESP_IDF")?;
 | 
			
		||||
    embuild::build::LinkArgs::output_propagated("ESP_IDF")?;
 | 
			
		||||
    embuild::espidf::sysenv::output();
 | 
			
		||||
    Ok(())
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -9,7 +9,9 @@ use embedded_graphics::{
 | 
			
		||||
    text::{Alignment, Text},
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
use esp_idf_hal::i2c::I2cDriver;
 | 
			
		||||
use esp_idf_svc::hal::i2c::I2cDriver;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
use ssd1306::{
 | 
			
		||||
    prelude::*, rotation::DisplayRotation, size::DisplaySize, I2CDisplayInterface, Ssd1306,
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
use esp_idf_sys::EspError;
 | 
			
		||||
use esp_idf_svc::sys::EspError;
 | 
			
		||||
use crate::display::DisplayError;
 | 
			
		||||
use crate::gps::GpsError;
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
use esp_idf_hal::{
 | 
			
		||||
use esp_idf_svc::hal::{
 | 
			
		||||
    self,
 | 
			
		||||
    peripheral::Peripheral,
 | 
			
		||||
    gpio::{AnyInputPin, AnyOutputPin, InputPin},
 | 
			
		||||
 
 | 
			
		||||
@@ -1,13 +1,12 @@
 | 
			
		||||
#![allow(unused)]
 | 
			
		||||
 | 
			
		||||
use esp_idf_hal::{
 | 
			
		||||
use esp_idf_svc::hal::{
 | 
			
		||||
    self,
 | 
			
		||||
    gpio::*,
 | 
			
		||||
    i2c::{I2cConfig, I2cDriver},
 | 
			
		||||
    prelude::Peripherals,
 | 
			
		||||
    units::Hertz,
 | 
			
		||||
};
 | 
			
		||||
use esp_idf_sys as _; // If using the `binstart` feature of `esp-idf-sys`, always keep this module imported
 | 
			
		||||
 | 
			
		||||
use std::sync::atomic::{AtomicBool, Ordering};
 | 
			
		||||
 | 
			
		||||
@@ -26,7 +25,7 @@ use ssd1306::prelude::*;
 | 
			
		||||
fn main() -> Result<(), Error> {
 | 
			
		||||
    // It is necessary to call this function once. Otherwise some patches to the runtime
 | 
			
		||||
    // implemented by esp-idf-sys might not link properly. See https://github.com/esp-rs/esp-idf-template/issues/71
 | 
			
		||||
    esp_idf_sys::link_patches();
 | 
			
		||||
    esp_idf_svc::sys::link_patches();
 | 
			
		||||
    // Bind the log crate to the ESP Logging facilities
 | 
			
		||||
    //esp_idf_svc::log::EspLogger::initialize_default();
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user