Skip to content

Commit

Permalink
Print esp-println generated defmt messages (esp-rs#466)
Browse files Browse the repository at this point in the history
* Print defmt frames output by esp-println

* Add changelog entry

* Display log level

* Bump MSRV to 1.70

* Refactor for opt-in defmt

* Make defmt a default feature

* Update CHANGELOG.md

Co-authored-by: Sergio Gasquez Arcos <[email protected]>

* Fix panic on frame containing multiple lines

* Fix panic due to newline normalization

* Don't enable defmt by default

---------

Co-authored-by: Sergio Gasquez Arcos <[email protected]>
  • Loading branch information
bugadani and SergioGasquez committed Nov 2, 2023
1 parent 96d2c8c commit 155b261
Show file tree
Hide file tree
Showing 7 changed files with 579 additions and 267 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Added reset strategies (#487)

- Read esp-println generated defmt messages (#466)

### Fixed

### Changed
Expand Down
98 changes: 93 additions & 5 deletions Cargo.lock

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

89 changes: 55 additions & 34 deletions espflash/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,44 +23,65 @@ path = "./src/bin/espflash.rs"
required-features = ["cli"]

[dependencies]
addr2line = { version = "0.21.0", optional = true }
base64 = "0.21.4"
binrw = "0.12.0"
bytemuck = { version = "1.14.0", features = ["derive"] }
clap = { version = "4.4.6", features = ["derive", "env", "wrap_help"], optional = true }
clap_complete = { version = "4.4.3", optional = true }
comfy-table = { version = "7.0.1", optional = true }
crossterm = { version = "0.25.0", optional = true } # 0.26.x causes issues on Windows
ctrlc = { version = "3.4.1", optional = true }
dialoguer = { version = "0.10.4", optional = true }
directories = { version = "5.0.1", optional = true }
env_logger = { version = "0.10.0", optional = true }
esp-idf-part = "0.4.1"
flate2 = "1.0.27"
hex = { version = "0.4.3", features = ["serde"], optional = true }
indicatif = { version = "0.17.7", optional = true }
lazy_static = { version = "1.4.0", optional = true }
log = "0.4.20"
miette = { version = "5.10.0", features = ["fancy"] }
parse_int = { version = "0.6.0", optional = true }
regex = { version = "1.9.6", optional = true }
rppal = { version = "0.14.1", optional = true }
serde = { version = "1.0.188", features = ["derive"] }
serialport = "4.2.2"
sha2 = "0.10.8"
slip-codec = "0.3.4"
strum = { version = "0.25.0", features = ["derive"] }
thiserror = "1.0.49"
toml = "0.8.2"
addr2line = { version = "0.21.0", optional = true }
base64 = "0.21.4"
binrw = "0.12.0"
bytemuck = { version = "1.14.0", features = ["derive"] }
clap = { version = "4.4.6", features = [
"derive",
"env",
"wrap_help",
], optional = true }
clap_complete = { version = "4.4.3", optional = true }
comfy-table = { version = "7.0.1", optional = true }
crossterm = { version = "0.25.0", optional = true } # 0.26.x causes issues on Windows
ctrlc = { version = "3.4.0", optional = true }
defmt-decoder = { version = "=0.3.8", features = ["unstable"], optional = true }
defmt-parser = { version = "=0.3.3", features = ["unstable"], optional = true }
dialoguer = { version = "0.10.4", optional = true }
directories = { version = "5.0.1", optional = true }
env_logger = { version = "0.10.0", optional = true }
esp-idf-part = "0.4.1"
flate2 = "1.0.27"
hex = { version = "0.4.3", features = ["serde"], optional = true }
indicatif = { version = "0.17.7", optional = true }
lazy_static = { version = "1.4.0", optional = true }
log = "0.4.20"
miette = { version = "5.10.0", features = ["fancy"] }
parse_int = { version = "0.6.0", optional = true }
regex = { version = "1.9.6", optional = true }
rppal = { version = "0.14.1", optional = true }
serde = { version = "1.0.188", features = ["derive"] }
serialport = "4.2.2"
sha2 = "0.10.8"
slip-codec = "0.3.4"
strum = { version = "0.25.0", features = ["derive"] }
thiserror = "1.0.49"
toml = "0.8.2"
update-informer = { version = "1.1.0", optional = true }
xmas-elf = "0.9.0"
xmas-elf = "0.9.0"

[target.'cfg(unix)'.dependencies]
libc = "0.2.101"

[features]
default = ["cli"]
# If you are using this package as a library you can disable the 'cli' feature.
cli = ["dep:addr2line", "dep:clap", "dep:clap_complete", "dep:comfy-table", "dep:crossterm", "dep:ctrlc", "dep:dialoguer", "dep:directories", "dep:env_logger", "dep:hex", "dep:indicatif", "dep:lazy_static", "dep:parse_int", "dep:regex", "dep:update-informer"]
# Enable this feature to flash using a Raspberry Pi's built-in UART peripheral.
default = ["cli"]
cli = [
"dep:addr2line",
"dep:clap",
"dep:clap_complete",
"dep:comfy-table",
"dep:crossterm",
"dep:ctrlc",
"dep:dialoguer",
"dep:directories",
"dep:env_logger",
"dep:hex",
"dep:indicatif",
"dep:lazy_static",
"dep:parse_int",
"dep:regex",
"dep:update-informer",
]
defmt = ["dep:defmt-decoder", "dep:defmt-parser"]
raspberry = ["dep:rppal"]
Loading

0 comments on commit 155b261

Please sign in to comment.