Skip to content

Commit 1440311

Browse files
committed
Merge branch 'main' of https://github.com/rustbox/esp32c3-vgaterm into refactor/nom-it-up
2 parents a7f342d + 4454162 commit 1440311

25 files changed

+856
-251
lines changed

Cargo.lock

Lines changed: 74 additions & 39 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ path = "src/bin/keypad.rs"
2828

2929
[profile.release]
3030
opt-level = 2
31+
lto = true
3132

3233
[profile.dev]
3334
debug = true # Symbols are nice and they don't increase the size on Flash
@@ -40,13 +41,13 @@ critical-section = "1.1.1"
4041
embedded-graphics = "0.7.1"
4142
embedded-hal = "0.2"
4243
esp-alloc = { version = "0.2.0", features = ["oom-handler"] }
43-
esp-backtrace = { version = "0.6.0", features = [
44+
esp-backtrace = { version = "0.7.0", features = [
4445
"esp32c3",
4546
"panic-handler",
4647
"exception-handler",
4748
"print-jtag-serial",
4849
] }
49-
esp-println = { version = "0.4.0", default-features = false, features = [
50+
esp-println = { version = "0.5.0", default-features = false, features = [
5051
"esp32c3",
5152
"jtag_serial",
5253
] }
@@ -63,8 +64,11 @@ unroll = "0.1.5"
6364

6465
[dev-dependencies]
6566

67+
[features]
68+
default = ["perf_log"]
69+
perf_log = []
6670

6771
[patch.crates-io]
6872
# TODO: automate these updates
69-
esp32c3-hal = { git = "https://github.com/rustbox/esp-hal", rev = "72aefcc" }
70-
esp-hal-common = { git = "https://github.com/rustbox/esp-hal", rev = "72aefcc" }
73+
esp32c3-hal = { git = "https://github.com/rustbox/esp-hal", rev = "f49dc55" }
74+
esp-hal-common = { git = "https://github.com/rustbox/esp-hal", rev = "f49dc55" }

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ This is targeted at the RISC-V architecture esp32-c3 processor from espressif. T
1313

1414
`rustup target add riscv32imc-unknown-none-elf`
1515

16-
3. Using Cargo, install the `espflash` tool which can upload and flash the code across a serial
16+
3. Using Cargo, install the `espflash` tool which can upload and flash the code across a serial
1717
port (through usb) to the esp32 chip:
1818

1919
`cargo install espflash`

examples/escape_seq.rs

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,18 @@ extern "C" fn stop() -> ! {
6161
#[entry]
6262
fn main() -> ! {
6363
let peripherals = Peripherals::take();
64-
let system = peripherals.SYSTEM.split();
64+
let mut system = peripherals.SYSTEM.split();
6565
let clocks = ClockControl::configure(system.clock_control, CpuClock::Clock160MHz).freeze();
6666

6767
// Disable the watchdog timers. For the ESP32-C3, this includes the Super WDT,
6868
// the RTC WDT, and the TIMG WDTs.
6969
let mut rtc = Rtc::new(peripherals.RTC_CNTL);
7070

71-
let timer_group1 = TimerGroup::new(peripherals.TIMG1, &clocks);
71+
let timer_group1 = TimerGroup::new(
72+
peripherals.TIMG1,
73+
&clocks,
74+
&mut system.peripheral_clock_control,
75+
);
7276
let mut wdt1 = timer_group1.wdt;
7377

7478
rtc.swd.disable();
@@ -79,8 +83,13 @@ fn main() -> ! {
7983

8084
init_heap();
8185

82-
vgaterm::configure_timer0(peripherals.TIMG0, &clocks);
83-
let mut _rx = vgaterm::uart::configure0(peripherals.UART0);
86+
vgaterm::configure_timer0(
87+
peripherals.TIMG0,
88+
&clocks,
89+
&mut system.peripheral_clock_control,
90+
);
91+
let mut _rx =
92+
vgaterm::uart::configure0(peripherals.UART0, &mut system.peripheral_clock_control);
8493
vgaterm::uart::interrupt_enable0(vgaterm::interrupt::Priority::Priority5);
8594

8695
unsafe {

0 commit comments

Comments
 (0)