Skip to content

Commit 12b9c4c

Browse files
committed
Shrink several buffers to avoid stack overflows
1 parent 322b517 commit 12b9c4c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

boards/rp-pico-w/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ panic-probe = { version = "0.3", features = ["print-defmt"] }
3131
cyw43 = { version = "0.1.0", git = "https://github.com/jannic-dev-forks/cyw43", branch = "stable", features=["defmt"] }
3232
embassy-executor = { version = "0.1.0", git = "https://github.com/embassy-rs/embassy.git", features=["integrated-timers"], rev = "1fb6bfbec943742fb25e70391278bf4a4b638772" }
3333
embassy-futures = { version = "0.1.0" }
34-
embassy-net = { version = "0.1.0", git = "https://github.com/embassy-rs/embassy.git", rev = "1fb6bfbec943742fb25e70391278bf4a4b638772", features = ["defmt", "tcp", "dhcpv4", "medium-ethernet", "pool-16"] }
34+
embassy-net = { version = "0.1.0", git = "https://github.com/embassy-rs/embassy.git", rev = "1fb6bfbec943742fb25e70391278bf4a4b638772", features = ["defmt", "tcp", "dhcpv4", "medium-ethernet", "pool-4"] }
3535
defmt-rtt = "0.3"
3636

3737
[features]

boards/rp-pico-w/examples/pico_w_blinky.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ fn main() -> ! {
7676
// Safety: function never returns, executor is never dropped
7777
let executor: &'static mut Executor = unsafe { forever_mut(&mut executor) };
7878

79-
let task_pool: TaskPool<_, 10> = TaskPool::new();
79+
let task_pool: TaskPool<_, 1> = TaskPool::new();
8080
let task_pool = unsafe { forever(&task_pool) };
8181

8282
let state = cyw43::State::new();
@@ -140,7 +140,7 @@ async fn run(spawner: Spawner, pins: rp_pico_w::Pins, state: &'static cyw43::Sta
140140
info!("create cyw43 driver");
141141
let (mut control, runner) = cyw43::new(state, pwr, spi, fw).await;
142142

143-
let task_pool: TaskPool<_, 10> = TaskPool::new();
143+
let task_pool: TaskPool<_, 1> = TaskPool::new();
144144
let task_pool = unsafe { forever(&task_pool) };
145145
let spawn_token = task_pool.spawn(|| runner.run());
146146
spawner.spawn(spawn_token).unwrap();
@@ -182,7 +182,7 @@ async fn run(spawner: Spawner, pins: rp_pico_w::Pins, state: &'static cyw43::Sta
182182
let stack = Stack::new(net_device, config, stack_resources, seed);
183183
let stack = unsafe { forever(&stack) };
184184

185-
let task_pool: TaskPool<_, 10> = TaskPool::new();
185+
let task_pool: TaskPool<_, 1> = TaskPool::new();
186186
let task_pool = unsafe { forever(&task_pool) };
187187
let spawn_token = task_pool.spawn(|| stack.run());
188188
spawner.spawn(spawn_token).unwrap();

0 commit comments

Comments
 (0)