increase main task stack size in esp-idf

This commit is contained in:
Evan Feenstra
2022-06-16 11:58:57 -07:00
parent 5da6633182
commit 9d771c1363
4 changed files with 16 additions and 7 deletions

View File

@@ -90,3 +90,11 @@ espflash board-info
export CC=$PWD/.embuild/espressif/tools/riscv32-esp-elf/esp-2021r2-8.4.0/riscv32-esp-elf/bin/riscv32-esp-elf-gcc
cargo +nightly build --release
esptool.py --chip esp32c3 elf2image target/riscv32imc-esp-espidf/release/sphinx-key
esptool.py --chip esp32c3 -p /dev/tty.usbserial-1420 -b 460800 --before=default_reset --after=hard_reset write_flash --flash_mode dio --flash_freq 40m --flash_size 4MB 0x10000 target/riscv32imc-esp-espidf/release/sphinx-key.bin
espmonitor /dev/tty.usbserial-1420

View File

@@ -6,9 +6,9 @@ edition = "2018"
[dependencies]
sphinx-key-parser = { path = "../parser" }
# vls-protocol-signer = { path = "../../../evanf/validating-lightning-signer/vls-protocol-signer", default-features = false, features = ["secp-lowmemory"] }
# vls-protocol-signer = { path = "../../../evanf/validating-lightning-signer/vls-protocol-signer", default-features = false, features = ["std", "secp-lowmemory"] }
# vls-protocol-signer = { git = "https://gitlab.com/lightning-signer/validating-lightning-signer", default-features = false, features = ["secp-lowmemory"] }
vls-protocol-signer = { git = "https://gitlab.com/Evanfeenstra/validating-lightning-signer", branch = "std-signer", default-features = false, features = ["secp-lowmemory"] }
vls-protocol-signer = { git = "https://gitlab.com/Evanfeenstra/validating-lightning-signer", branch = "std-signer", default-features = false, features = ["std", "secp-lowmemory"] }
anyhow = {version = "1", features = ["backtrace"]}
log = "0.4"

View File

@@ -1,12 +1,13 @@
use lightning_signer::persist::{DummyPersister, Persist};
use lightning_signer::Arc;
// use lightning_signer::Arc;
use sphinx_key_parser::MsgDriver;
use std::sync::Arc;
use vls_protocol::model::PubKey;
use vls_protocol::msgs::{self, read_serial_request_header, write_serial_response_header, Message};
use vls_protocol::serde_bolt::WireString;
use vls_protocol_signer::handler::{Handler, RootHandler};
pub use vls_protocol_signer::lightning_signer;
pub use vls_protocol_signer::vls_protocol;
use vls_protocol::model::PubKey;
use vls_protocol_signer::handler::{Handler, RootHandler};
pub struct InitResponse {
pub root_handler: RootHandler,
@@ -28,7 +29,7 @@ pub fn init(bytes: Vec<u8>) -> anyhow::Result<InitResponse> {
.collect::<Vec<_>>();
log::info!("allowlist {:?}", allowlist);
let seed = init.dev_seed.as_ref().map(|s| s.0).expect("no seed");
log::info!("seed {:?}", seed);
log::info!("create root handler now");
let root_handler = RootHandler::new(0, Some(seed), persister, allowlist);
log::info!("root_handler created");
let init_reply = root_handler

View File

@@ -1,5 +1,5 @@
# Rust often needs a bit of an extra main task stack size compared to C (the default is 3K)
CONFIG_ESP_MAIN_TASK_STACK_SIZE=7000
CONFIG_ESP_MAIN_TASK_STACK_SIZE=13000
# Use this to set FreeRTOS kernel tick frequency to 1000 Hz (100 Hz by default).
# This allows to use 1 ms granuality for thread sleeps (10 ms by default).