Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ravedude] add output modes, newline after n bytes or after char #549

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

tippfehlr
Copy link
Contributor

@tippfehlr tippfehlr commented May 19, 2024

From --help:

    -o <output-mode>
            Output mode. Can be ascii, hex, dec or bin

        --newline-on <newline-on>
            Print a newline after this byte
            not used with output_mode ascii
            hex (0x) and bin (0b) notations are supported.
            matching chars/bytes are NOT removed
            to add newlines after \n (in non-ascii mode), use \n, 0x0a or 0b00001010
        --newline-after <newline-after>
            Print a newline after n bytes
            not used with output_mode ascii
            defaults to 16 for hex and dec and 8 for bin
            if dividable by 4, bytes will be grouped to 4

This helps when working with non-ascii output.

Other solutions:

  • use another serial console: too much context switching for me, having the serial console in watch mode is way better.
  • use ravedude and pipe into hexdump or xxd: they only handle streamed data line by line, meaning the data is not printed immediately. They also can’t add newlines.

sometimes printing ascii isn’t useful, and the raw hex, binary or
decimal data should be printed.
newline_after adds a newline after the n’th byte
newline_on adds a newline after the given byte
@tippfehlr tippfehlr marked this pull request as ready for review May 19, 2024 22:45
The help comments are written as “individual” statements,
not continuous text, therefore putting each statement on
their own line is more appropriate.
@Rahix
Copy link
Owner

Rahix commented Jun 8, 2024

Thanks a lot for your contribution! I like this change a lot.

Right now, we are doing a rather large rework of ravedude in #522. I'll get back to your PR once that work is finished, otherwise things will get a bit too messy. I don't expect a lot of conflicts with your changes, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants