Compare commits
No commits in common. "caf91342101a6142754f0e49343894b4265e5203" and "2bdb4060cef77aa7666855d145fddaeb1540f37d" have entirely different histories.
caf9134210
...
2bdb4060ce
8 changed files with 1487 additions and 3905 deletions
|
|
@ -1,15 +0,0 @@
|
||||||
[build]
|
|
||||||
target = "xtensa-esp32s2-espidf"
|
|
||||||
|
|
||||||
[target.xtensa-esp32s2-espidf]
|
|
||||||
linker = "ldproxy"
|
|
||||||
runner = "espflash flash --monitor --before no-reset -a no-reset --no-stub"
|
|
||||||
rustflags = [ "--cfg", "espidf_time64"]
|
|
||||||
|
|
||||||
[unstable]
|
|
||||||
build-std = ["std", "panic_abort"]
|
|
||||||
|
|
||||||
[env]
|
|
||||||
MCU="esp32s2"
|
|
||||||
# Note: this variable is not used by the pio builder (`cargo build --features pio`)
|
|
||||||
ESP_IDF_VERSION = "v5.3.2"
|
|
||||||
4
firmware/.gitignore
vendored
4
firmware/.gitignore
vendored
|
|
@ -1,4 +0,0 @@
|
||||||
/.vscode
|
|
||||||
/.embuild
|
|
||||||
/target
|
|
||||||
/Cargo.lock
|
|
||||||
|
|
@ -1,30 +0,0 @@
|
||||||
[package]
|
|
||||||
name = "beans32"
|
|
||||||
version = "0.1.0"
|
|
||||||
authors = ["soffee <sophia@soffee.space>"]
|
|
||||||
edition = "2021"
|
|
||||||
resolver = "2"
|
|
||||||
rust-version = "1.77"
|
|
||||||
|
|
||||||
[[bin]]
|
|
||||||
name = "beans32"
|
|
||||||
harness = false # do not use the built in cargo test harness -> resolve rust-analyzer errors
|
|
||||||
|
|
||||||
[profile.release]
|
|
||||||
opt-level = "s"
|
|
||||||
|
|
||||||
[profile.dev]
|
|
||||||
debug = true # Symbols are nice and they don't increase the size on Flash
|
|
||||||
opt-level = "z"
|
|
||||||
|
|
||||||
[features]
|
|
||||||
default = []
|
|
||||||
|
|
||||||
experimental = ["esp-idf-svc/experimental"]
|
|
||||||
|
|
||||||
[dependencies]
|
|
||||||
log = "0.4"
|
|
||||||
esp-idf-svc = { version = "0.51", features = ["critical-section", "embassy-time-driver", "embassy-sync"] }
|
|
||||||
|
|
||||||
[build-dependencies]
|
|
||||||
embuild = "0.33"
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
fn main() {
|
|
||||||
embuild::espidf::sysenv::output();
|
|
||||||
}
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
[toolchain]
|
|
||||||
channel = "esp"
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
# Rust often needs a bit of an extra main task stack size compared to C (the default is 3K)
|
|
||||||
CONFIG_ESP_MAIN_TASK_STACK_SIZE=8000
|
|
||||||
|
|
||||||
# Use this to set FreeRTOS kernel tick frequency to 1000 Hz (100 Hz by default).
|
|
||||||
# This allows to use 1 ms granularity for thread sleeps (10 ms by default).
|
|
||||||
#CONFIG_FREERTOS_HZ=1000
|
|
||||||
|
|
||||||
# Workaround for https://github.com/espressif/esp-idf/issues/7631
|
|
||||||
#CONFIG_MBEDTLS_CERTIFICATE_BUNDLE=n
|
|
||||||
#CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_FULL=n
|
|
||||||
|
|
||||||
CONFIG_ESP_CONSOLE_UART=CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
use esp_idf_svc::hal::{delay::FreeRtos, gpio::{PinDriver}, prelude::Peripherals};
|
|
||||||
|
|
||||||
fn main() {
|
|
||||||
// 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_svc::sys::link_patches();
|
|
||||||
|
|
||||||
// Bind the log crate to the ESP Logging facilities
|
|
||||||
esp_idf_svc::log::EspLogger::initialize_default();
|
|
||||||
|
|
||||||
let peripherals = Peripherals::take().unwrap();
|
|
||||||
let mut led_pin = PinDriver::output(peripherals.pins.gpio15).unwrap();
|
|
||||||
let mut led2_pin = PinDriver::output(peripherals.pins.gpio3).unwrap();
|
|
||||||
|
|
||||||
log::info!("Hello, world!");
|
|
||||||
|
|
||||||
loop {
|
|
||||||
led_pin.set_low().unwrap();
|
|
||||||
led2_pin.set_low().unwrap();
|
|
||||||
FreeRtos::delay_ms(1000);
|
|
||||||
|
|
||||||
led_pin.set_high().unwrap();
|
|
||||||
led2_pin.set_high().unwrap();
|
|
||||||
FreeRtos::delay_ms(1000);
|
|
||||||
println!("blink");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue