Skip to content

Commit 004186b

Browse files
committed
feat(examples): added esp32 example
Signed-off-by: Jad K. Haddad <jadkhaddad@gmail.com>
1 parent 186ed8c commit 004186b

13 files changed

Lines changed: 2479 additions & 54 deletions

File tree

examples/aplit.rs

Lines changed: 0 additions & 54 deletions
This file was deleted.

examples/esp32/.cargo/config.toml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[target.xtensa-esp32-none-elf]
2+
runner = "espflash flash --monitor --chip esp32"
3+
4+
[env]
5+
ESP_LOG = "info"
6+
WIFI_SSID = "your_wifi_ssid"
7+
WIFI_PASSWORD = "your_wifi_password"
8+
9+
[build]
10+
rustflags = ["-C", "link-arg=-nostartfiles"]
11+
12+
target = "xtensa-esp32-none-elf"
13+
14+
[unstable]
15+
build-std = ["alloc", "core"]

examples/esp32/.gitignore

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Generated by Cargo
2+
# will have compiled files and executables
3+
debug/
4+
target/
5+
6+
# These are backup files generated by rustfmt
7+
**/*.rs.bk
8+
9+
# MSVC Windows builds of rustc generate these, which store debugging information
10+
*.pdb
11+
12+
# RustRover
13+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
14+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
15+
# and can be added to the global gitignore or merged into this file. For a more nuclear
16+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
17+
#.idea/
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"recommendations": [
3+
"rust-lang.rust-analyzer",
4+
"tamasfe.even-better-toml",
5+
"fill-labs.dependi"
6+
]
7+
}

examples/esp32/.vscode/launch.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
]
5+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"rust-analyzer.cargo.allTargets": false,
3+
"rust-analyzer.cargo.target": "xtensa-esp32-none-elf",
4+
"rust-analyzer.server.extraEnv": {
5+
"RUSTUP_TOOLCHAIN": "stable"
6+
},
7+
"rust-analyzer.check.extraEnv": {
8+
"RUSTUP_TOOLCHAIN": "esp"
9+
},
10+
"rust-analyzer.cargo.extraEnv": {
11+
"RUSTUP_TOOLCHAIN": "esp"
12+
},
13+
}

examples/esp32/.vscode/tasks.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"label": "build-debug",
6+
"command": "cargo build",
7+
"type": "shell",
8+
}
9+
]
10+
}

0 commit comments

Comments
 (0)