sirhcel / esp-idf-hal Goto Github PK
View Code? Open in Web Editor NEWThis project forked from esp-rs/esp-idf-hal
embedded-hal implementation for Rust on ESP32 and ESP-IDF
License: Apache License 2.0
This project forked from esp-rs/esp-idf-hal
embedded-hal implementation for Rust on ESP32 and ESP-IDF
License: Apache License 2.0
The new example ledc-simple
could be successfully built but causes a stack overflow when flashed from this repo.
esp-idf-hal $ cargo espflash --target riscv32imc-esp-espidf --example ledc-simple --monitor /dev/tty.usbserial-113110
Serial port: /dev/tty.usbserial-113110
Connecting...
Chip type: ESP32-C3 (revision 3)
Crystal frequency: 40MHz
Flash size: 4MB
Features: WiFi
MAC address: [...]
Finished dev [unoptimized + debuginfo] target(s) in 0.10s
[00:00:01] ######################################## 12/12 segment 0x0
[00:00:00] ######################################## 1/1 segment 0x8000
[00:00:18] #############################>---------- 159/214 segment 0x10000 writing chunks
[...]
I (321) cpu_start: Starting scheduler.
I (329) ledc_simple: Configuring output channel
I (339) ledc_simple: Starting duty-cycle loop
I (339) ledc_simple: Duty 0/5
***ERROR*** A stack overflow in task main has been detected.
Core 0 register dump:
MEPC : 0x40383796 RA : 0x40383e5c SP : 0x3fc8d700 GP : 0x3fc8bc00
TP : 0x3fc7ad2c T0 : 0x4005890e T1 : 0x0000000f T2 : 0x00000001
S0/FP : 0x00000003 S1 : 0x00000001 A0 : 0x3fc8d718 A1 : 0x3c06f250
A2 : 0x00000003 A3 : 0x3fc8d742 A4 : 0x00000001 A5 : 0x3fc8e000
A6 : 0x00000001 A7 : 0x00000000 S2 : 0x00001881 S3 : 0x00000001
S4 : 0x00000000 S5 : 0x00000000 S6 : 0x00000000 S7 : 0x00000000
S8 : 0x00000000 S9 : 0x00000000 S10 : 0x00000000 S11 : 0x00000000
T3 : 0x00000000 T4 : 0x00000000 T5 : 0x00000001 T6 : 0x00000000
MSTATUS : 0x00001801 MTVEC : 0x40380001 MCAUSE : 0x00000007 MTVAL : 0x00000000
MHARTID : 0x00000000
Stack memory:
3fc8d700: 0x00000000 0x00000000 0x00000000 0x40386e04 0x00000000 0x00000000 0x452a2a2a 0x524f5252
[...]
In contrast, building and flashing a copy of it on top of rust-esp32-std-demo
results in a program running as expected:
rust-esp32-std-demo $ cargo espflash --example ledc-simple --monitor /dev/tty.usbserial-113110
Serial port: /dev/tty.usbserial-113110
Connecting...
Chip type: ESP32-C3 (revision 3)
Crystal frequency: 40MHz
Flash size: 4MB
Features: WiFi
MAC address: 7c:df:a1:61:bb:d4
Compiling rust-esp32-std-demo v0.22.7 (/[...]/rust-esp32-std-demo)
Finished dev [optimized + debuginfo] target(s) in 1.43s
[00:00:01] ######################################## 12/12 segment 0x0
[00:00:00] ######################################## 1/1 segment 0x8000
[00:00:14] ######################################## 127/127 segment 0x10000
[...]
I (282) cpu_start: Starting scheduler.
I (287) ledc_simple: Configuring output channel
I (287) ledc_simple: Starting duty-cycle loop
I (297) ledc_simple: Duty 0/5
I (2297) ledc_simple: Duty 1/5
I (4297) ledc_simple: Duty 2/5
I (6297) ledc_simple: Duty 3/5
I (8297) ledc_simple: Duty 4/5
I (10297) ledc_simple: Duty 5/5
I (12297) ledc_simple: Duty 0/5
[...]
Both binaries differ in size but I expected them to be built with an identical configuration. I've used a development version of cargo-espflash
for building and flashing the example in both cases:
$ cargo install --bin cargo-espflash --git https://github.com/sirhcel/espflash/ --rev 5d71444 cargo-espflash
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.