Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update deps #25

Merged
merged 2 commits into from
Nov 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
91 changes: 47 additions & 44 deletions advanced/stack_overflow_detection/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions advanced/stack_overflow_detection/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = "2021"
license = "MIT OR Apache-2.0"

[dependencies]
hal = { package = "esp32c3-hal", version = "0.12.0" }
esp-backtrace = { version = "0.8.0", features = ["esp32c3", "panic-handler", "exception-handler", "print-uart"] }
esp-println = { version = "0.6.0", features = ["esp32c3"] }
critical-section = "1.1.1"
hal = { package = "esp32c3-hal", version = "0.13.0" }
esp-backtrace = { version = "0.9.0", features = ["esp32c3", "panic-handler", "exception-handler", "print-uart"] }
esp-println = { version = "0.7.1", features = ["esp32c3"] }
critical-section = "1.1.2"
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ use esp_backtrace as _;
use esp_println::println;
use hal::{
assist_debug::DebugAssist,
clock::ClockControl,
interrupt,
peripherals::{self, Peripherals},
prelude::*,
Expand All @@ -17,10 +18,10 @@ use hal::{
fn main() -> ! {
let peripherals = Peripherals::take();
let system = peripherals.SYSTEM.split();
let mut peripheral_clock_control = system.peripheral_clock_control;
let _ = ClockControl::boot_defaults(system.clock_control).freeze();

// get the debug assist driver
let da = DebugAssist::new(peripherals.ASSIST_DEBUG, &mut peripheral_clock_control);
let da = DebugAssist::new(peripherals.ASSIST_DEBUG);

// set up stack overflow protection
install_stack_guard(da, 4096);
Expand Down
15 changes: 12 additions & 3 deletions advanced/stack_overflow_detection/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,18 +1,27 @@
#![no_std]
#![no_main]

use core::cell::RefCell;

use critical_section::Mutex;
use esp_backtrace as _;
use esp_println::println;
use hal::{assist_debug::DebugAssist, peripherals::Peripherals, prelude::*};
use hal::{
assist_debug::DebugAssist,
clock::ClockControl,
interrupt,
peripherals::{self, Peripherals},
prelude::*,
};

#[entry]
fn main() -> ! {
let peripherals = Peripherals::take();
let system = peripherals.SYSTEM.split();
let mut peripheral_clock_control = system.peripheral_clock_control;
let _ = ClockControl::boot_defaults(system.clock_control).freeze();

// get the debug assist driver
let da = DebugAssist::new(peripherals.ASSIST_DEBUG, &mut peripheral_clock_control);
let da = DebugAssist::new(peripherals.ASSIST_DEBUG);

boom();

Expand Down
Loading