Skip to content

Commit

Permalink
fix: cleanup from merge
Browse files Browse the repository at this point in the history
  • Loading branch information
Sycrosity committed Jun 30, 2024
2 parents bafaec1 + 364e302 commit 35d1668
Show file tree
Hide file tree
Showing 10 changed files with 352 additions and 151 deletions.
4 changes: 2 additions & 2 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ rustflags = [
"-C",
"link-arg=-Tlinkall.x",

# # Required to obtain backtraces (e.g. when using the "esp-backtrace" crate.) on riscv32imc targets.
# # NOTE: May negatively impact performance of produced code
# Required to obtain backtraces (e.g. when using the "esp-backtrace" crate.) on riscv32imc targets.
# NOTE: May negatively impact performance of produced code
"-C",
"force-frame-pointers",
]
Expand Down
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"name": "Wokwi GDB",
"type": "lldb",
"request": "launch",
"program": "${workspaceFolder}/target/xtensa-esp32-none-elf/release/cansat",
"program": "${workspaceFolder}/target/xtensa-esp32-none-elf/release/teeny",
"cwd": "${workspaceFolder}",
"MIMode": "gdb",
"miDebuggerPath": "${userHome}/.espressif/tools/xtensa-esp32-elf/esp-2021r2-patch3-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gdb",
Expand Down
76 changes: 34 additions & 42 deletions Cargo.lock

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

43 changes: 27 additions & 16 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,27 +25,26 @@ esp-alloc = { version = "0.4.0", optional = true }

#for wifi connectivity for esp controllers.
esp-wifi = { version = "0.6.0", features = [
"phy-enable-usb",
"utils",
"wifi",
"embassy-net",
# "wifi-logs",
"dhcpv4",
"async",
"wifi-default",
"wifi",
"utils",
], optional = true }

heapless = "0.8.0"

smoltcp = { version = "0.11.0", default-features = false, features = [
"medium-ethernet",
"proto-dhcpv4",
"proto-igmp",
"proto-ipv4",
"socket-dhcpv4",
"socket-icmp",
"socket-raw",
"socket-tcp",
"socket-udp",
], optional = true }
# smoltcp = { version = "0.11.0", default-features = false, features = [
# "medium-ethernet",
# "proto-dhcpv4",
# "proto-igmp",
# "proto-ipv4",
# "socket-dhcpv4",
# "socket-icmp",
# "socket-raw",
# "socket-tcp",
# "socket-udp",
# ], optional = true }

#the gold standard for logging in rust
log = "0.4.20"
Expand Down Expand Up @@ -95,6 +94,10 @@ dotenv = "0.15.0"
# Rust debug is too slow.
# For debug builds always builds with some optimization
opt-level = "s"
codegen-units = 1 # LLVM can perform better optimizations using a single thread
debug-assertions = false
overflow-checks = false
lto = 'fat'

[profile.release]
codegen-units = 1 # LLVM can perform better optimizations using a single thread
Expand All @@ -108,13 +111,20 @@ overflow-checks = false
[profile.release.package.esp-wifi]
opt-level = 3

[profile.dev.package.esp-wifi]
opt-level = 3

[features]
default = ["log", "net", "alloc"]

alloc = ["dep:esp-alloc"]

net = ["dep:esp-wifi", "dep:embassy-net", "dep:embedded-svc", "dep:reqwless"]

verbose-wifi = ["esp-wifi/wifi-logs", "esp-wifi/dump-packets"]

release = ["log/release_max_level_off"]

log = [
"embassy-net/log",
"embassy-time/log",
Expand Down Expand Up @@ -146,3 +156,4 @@ esp32c3 = [
[patch.crates-io]
ssd1306 = { version = "0.9.0", git = "https://github.com/embedevices-rs/ssd1306", branch = "async" }
embassy-embedded-hal = { version = "0.1.1", git = "https://github.com/Sycrosity/embassy-embedded-hal" }
# reqwless = { version = "0.12.0", path = "/Users/louis/dev/embedded/reqwless" }
4 changes: 4 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ fn main() -> Result<(), Box<dyn Error>> {
"cargo::rustc-env=PASSWORD={}",
std::env::var("PASSWORD").unwrap_or_default()
);
println!(
"cargo::rustc-env=CLIENT_ID={}",
std::env::var("CLIENT_ID").unwrap_or_default()
);

Ok(())
}
Loading

0 comments on commit 35d1668

Please sign in to comment.