Skip to content
This repository was archived by the owner on Dec 15, 2021. It is now read-only.

RFC: replace crate with itm-decode #41

Closed
wants to merge 140 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
140 commits
Select commit Hold shift + click to select a range
d41652b
initial: extract decoder from probe-rs, repo house keeping
tmplt Feb 19, 2021
6cfffd9
format with rustfmt
tmplt Feb 19, 2021
f25abca
revamp trace packet structure
tmplt Feb 19, 2021
000f943
replace old codebase with new skeleton
tmplt Feb 20, 2021
aa21f63
decode ExceptionTrace packets
tmplt Feb 22, 2021
aed5d56
decode LocalTimestamp1 packets
tmplt Feb 22, 2021
cbd5bb5
decode LocalTimestamp2 packets
tmplt Feb 22, 2021
720f49b
decode smallest possible Synchronization packet
tmplt Feb 25, 2021
81c571e
decode GlobalTimestamp{1,2} packets
tmplt Feb 25, 2021
85b20f7
decode LocalTimestamp1 with common function instead
tmplt Feb 25, 2021
26eeb84
process_byte: improve structure and efficiency
tmplt Feb 25, 2021
d656b04
pull: decode one packet each call, if able
tmplt Feb 26, 2021
f89c342
add current_state: query the state of the decoder
tmplt Feb 26, 2021
8189190
return Err instead of unimplemented!()
tmplt Feb 26, 2021
4ce0d62
decode Overflow packets
tmplt Feb 26, 2021
c854199
simplity extract_timestamp
tmplt Feb 26, 2021
544ce27
handle_hardware_source: document unreachable!()
tmplt Feb 26, 2021
6276c7d
decode Instrumentation packets
tmplt Feb 26, 2021
4bd669c
apply rustfmt
tmplt Feb 26, 2021
cc7dcab
decode Extension packets
tmplt Feb 26, 2021
a3955db
decode PCSample packets
tmplt Feb 26, 2021
ecd74ce
verify payload size when decoding ExceptionTrace packets
tmplt Feb 26, 2021
158fe5b
decode EventCounterWrap packets
tmplt Feb 26, 2021
2031d07
decode DataTrace{PC,Address,Value} packets
tmplt Mar 1, 2021
0524733
remove unused dependency
tmplt Mar 1, 2021
61cb28e
remove old authors
tmplt Mar 1, 2021
b3f5bc2
make Decoder fields public
tmplt Mar 1, 2021
f30cc9c
change from VecDequeue to BitVec
tmplt Mar 1, 2021
a0c04f5
decode all possible Synchronization packets
tmplt Mar 1, 2021
071b77a
simplify DecoderError structure
tmplt Mar 1, 2021
7efc43a
pull: don't be naive upon error
tmplt Mar 1, 2021
964acc3
document structs and enums
tmplt Mar 1, 2021
485d012
improve TimestampDataRelation enum
tmplt Mar 2, 2021
45b792a
improve documentation
tmplt Mar 2, 2021
14ecce4
simplify sync procedure
tmplt Mar 2, 2021
30b269e
simplify syncing in pull somewhat
tmplt Mar 2, 2021
6125b85
split sync procedure into own function
tmplt Mar 2, 2021
260ba86
test Sync decode
tmplt Mar 2, 2021
b84de58
test Overflow decode
tmplt Mar 2, 2021
d00d691
test LocalTimestamp{1,2} decode
tmplt Mar 2, 2021
1c3b9f1
fix and test extract_timestamp
tmplt Mar 2, 2021
5e9d12a
change LTS1, GTS{1,2} to u64; fix extract_timestamp for GTS2
tmplt Mar 2, 2021
66ada53
fix GTS1 flag decode; test GTS{1,2} decode
tmplt Mar 2, 2021
f547892
test Instrumentation decode
tmplt Mar 2, 2021
4026096
test EventCounterWrap decode
tmplt Mar 2, 2021
3ed66dd
test ExceptionTrace decode
tmplt Mar 2, 2021
e5cd2c8
fix hardware source payload size decode; test PCsample decode
tmplt Mar 3, 2021
4670e12
test DataTracePC decode
tmplt Mar 3, 2021
91c8cbe
improve DataTraceAddress field name; test DataTraceAddress decode
tmplt Mar 3, 2021
fa4dd0d
test DataTraceValue decode
tmplt Mar 3, 2021
a28e0c3
test Extension decode
tmplt Mar 3, 2021
95794ee
replace adhoc example with utility
tmplt Mar 3, 2021
a7d848e
cargo: add homepage
tmplt Mar 3, 2021
a659c10
replace README.org with README.md
tmplt Mar 3, 2021
fee6a94
chore: pin funty to fix bitvec dep build
tmplt Mar 3, 2021
7a58acf
chore: bump bitvec dep
tmplt Mar 4, 2021
af6b1ba
bin: restructure with structopt
tmplt Mar 3, 2021
2eb43dc
bin: remove unnecessary notice
tmplt Mar 4, 2021
833e57e
chore: downgrade bitvec to 0.19.4
tmplt Mar 5, 2021
eff09f1
fix: handle invalid source payload sizes
tmplt Mar 5, 2021
b14b7cd
Merge branch 'master' into decode-string
tmplt Mar 5, 2021
6f9c89e
fix: greatly improve pull performance
tmplt Mar 5, 2021
96b0638
bin: learn -s: decode instrumentation payloads as UTF-8 strings
tmplt Mar 5, 2021
9fc03ac
bump to version 0.1.6
tmplt Mar 5, 2021
20b3192
ignore local trace files
tmplt Mar 5, 2021
cbaf502
optionally serde-derive public structures via "serde" feature
tmplt Mar 6, 2021
4f6ddc8
bump to version 0.2.0
tmplt Mar 6, 2021
1f4c4e8
ignore emacs backup files
tmplt Mar 7, 2021
4f48ad0
Decoder::pull_with_timestamp: first implementation
tmplt Mar 8, 2021
8cc2e8a
pull_with_timestamp: support bitstreams that don't contain LTS{1,2}
tmplt Mar 9, 2021
20f152f
pull_with_timestamp: fix shift and discard GTS after use
tmplt Mar 10, 2021
3e9b3ed
pull_with_timestamp: refactor common procedures
tmplt Mar 10, 2021
9e7c786
test pull_with_timestamp
tmplt Mar 10, 2021
7e880a1
test pull_with_timestamp with only global timestamps
tmplt Mar 10, 2021
df9fe04
Introduce feature `bin`
Urhengulas Mar 11, 2021
7b2fc55
Merge pull request #10 from Urhengulas/feature-bin
tmplt Mar 15, 2021
acd96d0
bump version
tmplt Mar 17, 2021
a6efda4
bin: support stdin input
tmplt Apr 7, 2021
5dae0d7
rename Decoder::feed -> Decoder::push
tmplt Apr 7, 2021
9157f86
bin: alias - to stdin
tmplt Apr 8, 2021
fce9d7e
bin: fix file reading for stdin
tmplt Apr 8, 2021
2220e45
bin: only create stim map if required
tmplt Apr 8, 2021
aab433b
fix: flipped DataTraceValue access direction
tmplt Apr 22, 2021
8b73c4c
fix: outdated DataTraceValue test cases
tmplt Jun 10, 2021
6ca901e
replace inline exception enum with VectActive enum from cortex_m
tmplt Jun 10, 2021
c2a55bf
meta: bump to 0.4.0
tmplt Jun 10, 2021
37f887f
add Decode::pull_with_timestamp
tmplt Jun 17, 2021
edd3694
fix pull_with_timestamp tests
tmplt Jun 17, 2021
8f8581a
refactor: split unit and integration tests
tmplt Jun 17, 2021
93b3b1b
meta: improve crate description
tmplt Jun 17, 2021
bd40076
meta: update bitvec
tmplt Jun 17, 2021
1077ec8
pull_with_timestamp: return a struct instead of a tuple
tmplt Jun 17, 2021
a03e058
meta: document licences
tmplt Jun 22, 2021
6b6905e
cargo: update repository/homepage, tag 0.4.0-alpha.0
tmplt Jun 29, 2021
268f398
DecoderError -> MalformedPacket, InvalidSyncSize -> InvalidSync
tmplt Aug 4, 2021
f63ebb1
push: take &[u8] instead of Vec<u8>
tmplt Aug 4, 2021
4de815a
refactor: simplify Decoder state
tmplt Aug 4, 2021
0302da0
improve docs
tmplt Aug 4, 2021
6f67572
refactor: introduce a DecoderOptions struct
tmplt Aug 4, 2021
6b0e0d6
minor refactor and docs improvements
tmplt Aug 4, 2021
559d5e0
tag alpha 0.4.0-alpha.1
tmplt Aug 4, 2021
400447e
refactor: minor improvements
tmplt Aug 5, 2021
494c30e
improve cortex_m docs
tmplt Aug 5, 2021
32793e4
impl Display for MalformedPacket with thiserror
tmplt Aug 10, 2021
abce269
cargo: bump to v0.4.0
tmplt Aug 10, 2021
e0765ae
store malformed packets in TimestampedTracePackets
tmplt Aug 14, 2021
106f47d
pull_with_timestamp: count consumed packets
tmplt Aug 15, 2021
9cd02c5
fix incorrect packet consumption counting
tmplt Aug 15, 2021
1605586
apply clippy fixes
tmplt Oct 31, 2021
bda71c9
add CI
tmplt Oct 31, 2021
17cbfec
refactor: take Read instance, adopt an iter-based API
tmplt Nov 21, 2021
692c816
cargo: copy manifest fields from rust-embedded/itm
tmplt Nov 25, 2021
ed91e29
remove deprecated files to be replaced by crate rewrite
tmplt Nov 25, 2021
ba9a654
Merge remote-tracking branch 'itm-decode/replace-itm-crate'
tmplt Nov 25, 2021
5de6c82
iter/timestamps: mark LocalTimestampOptions::Disabled unimplemented
tmplt Nov 26, 2021
1ca1ad5
handle_hardware_source: exploit bitmatch attribute
tmplt Nov 26, 2021
469f8ae
buffer: make recursive functions iterative
tmplt Nov 26, 2021
144ae55
cargo: split itm-decode into its own crate
tmplt Nov 26, 2021
9bb325b
export chrono, TimestampOptions -> TimestampsOptions
tmplt Nov 26, 2021
97c06d7
itm-decode: add --timestamps options
tmplt Nov 26, 2021
b05edff
remove Default impl for DecoderOptions
tmplt Nov 26, 2021
703934c
change LTS1::ts to u32
tmplt Nov 26, 2021
d35b41c
iter: Gts: improve impl, correctly save, add test
tmplt Nov 26, 2021
267fe66
itm-decode: improve implementation
tmplt Nov 27, 2021
6d63ac6
document most stuctures and enums
tmplt Nov 27, 2021
8fc5ddc
fix documentation test
tmplt Nov 27, 2021
12f482a
cargo: pin cortex-m from rust-embedded instead
tmplt Nov 27, 2021
3931431
iter: document tests
tmplt Nov 27, 2021
7f07cba
remove WG-related files
tmplt Dec 3, 2021
7fbe422
remove WG-related files
tmplt Dec 3, 2021
1358a13
iter: replace chrono::DateTime with chrono::Duration
tmplt Dec 3, 2021
94f0808
iter: replace `chrono::Duration` with `std::time::Duration`
tmplt Dec 3, 2021
6530e8c
Merge branch 'refactor/duration'
tmplt Dec 3, 2021
23dbd28
timestamps: document panic
tmplt Dec 3, 2021
89c5247
changelog: document v0.4.0 changes
tmplt Dec 3, 2021
5bdf3c1
readme: remove outdated maintain notice
tmplt Dec 3, 2021
3dafc75
readme: itmdump -> itm-decode
tmplt Dec 3, 2021
0c52bd0
fix serde derivation
tmplt Dec 3, 2021
bd3a34d
changelog: remove broken PR link
tmplt Dec 3, 2021
cda699f
iter: consume decoder on Singles/Timestamps ctor
tmplt Dec 6, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/CODEOWNERS

This file was deleted.

4 changes: 0 additions & 4 deletions .github/bors.toml

This file was deleted.

59 changes: 59 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: CI
on:
pull_request:
push:
branches:
- master

env:
CARGO_TERM_COLOR: always

jobs:
style:
name: style
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt

- name: cargo fmt -- --check
uses: actions-rs/cargo@v1
with:
command: fmt
args: -- --check

clippy:
name: clippy
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v1
- run: rustup component add clippy
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}

test:
name: test
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true

- name: cargo test --all
uses: actions-rs/cargo@v1
with:
command: test
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*.rs.bk
/Cargo.lock
/target/
*.bin
.#*
Cargo.lock
target
34 changes: 0 additions & 34 deletions .travis.yml

This file was deleted.

30 changes: 25 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,25 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

### Changed

- `Decoder::singles` and `Decoder::timestamps` now consume the parent `Decoder` on iterator constuction.

### Fixed

- `serde` derivation and build with `--features serde`.

## [v0.4.0] - 2021-12-03

### Changed

The library has been completely reimplemented, following the development of [`itm-decode`](https://github.com/rtic-scope/itm-decode) (now archived).
This new implementation offers, in addition to the previous implementation, an `Iterator`-based design, more granular enums, synchronization packet support, and timestamp generation of trace packets.

The (missing) `itm-dump` binary has been replaced by `itm-decode` shipped in this repository.

Related topics: https://github.com/rust-embedded/itm/pull/41, https://github.com/rust-embedded/wg/pull/589.

## [v0.3.1] - 2018-07-04

### Fixed
Expand Down Expand Up @@ -66,8 +85,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- `itmdump` tool that parses instrumentation packets from the stimulus port 0
and dumps the payload to `stdout`.

[Unreleased]: https://github.com/japaric/itm/compare/v0.3.0...HEAD
[v0.3.0]: https://github.com/japaric/itm/compare/v0.2.1...v0.3.0
[v0.2.1]: https://github.com/japaric/itm/compare/v0.2.0...v0.2.1
[v0.2.0]: https://github.com/japaric/itm/compare/v0.1.1...v0.2.0
[v0.1.1]: https://github.com/japaric/itm/compare/v0.1.0...v0.1.1
[Unreleased]: https://github.com/rtic-scope/itm/compare/v0.4.0...HEAD
[v0.4.0]: https://github.com/rtic-scope/itm/compare/v0.3.0...v0.4.0
[v0.3.0]: https://github.com/rtic-scope/itm/compare/v0.2.1...v0.3.0
[v0.2.1]: https://github.com/rtic-scope/itm/compare/v0.2.0...v0.2.1
[v0.2.0]: https://github.com/rtic-scope/itm/compare/v0.1.1...v0.2.0
[v0.1.1]: https://github.com/rtic-scope/itm/compare/v0.1.0...v0.1.1
37 changes: 0 additions & 37 deletions CODE_OF_CONDUCT.md

This file was deleted.

20 changes: 2 additions & 18 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,18 +1,2 @@
[package]
authors = [
"The Cortex-M Team <cortex-m@teams.rust-embedded.org>",
"Jorge Aparicio <jorge@japaric.io>",
]
description = "Tool to parse and dump ITM packets"
documentation = "https://docs.rs/itm"
edition = "2018"
keywords = ["parse", "ARM", "ITM"]
license = "MIT OR Apache-2.0"
name = "itm"
repository = "https://github.com/japaric/itm"
version = "0.4.0"

[dependencies]
byteorder = "1.3.0"
thiserror = "1.0.19"
either = "1.5.0"
[workspace]
members = ["itm", "itm-decode"]
Loading