Skip to content

Add --no-color so I can redirect the output of uart0 but to a file. #555

@mofosyne

Description

@mofosyne

Tried

simavr -m atmega328p -f 16000000 --no-color ./example-avr.elf 2> testoutput.md

But got

�[32m## Fixed Linear Conversion (8-bit AVR)..
�[0m�[32m..
�[0m�[32m| ADC | Millivolt | ADC back | error |..
�[0m�[32m|-----|-----------|----------|-------|..
�[0m�[32m|   0 |         0 |        0 |     0 |..
�[0m�[32m|  16 |     65535 |        0 |   -16 |..
�[0m�[32m|  32 |         0 |        0 |   -32 |..
�[0m�[32m|  48 |     65535 |        0 |   -48 |..
�[0m�[32m|  64 |         0 |        0 |   -64 |..
�[0m�[32m|  80 |     65535 |        0 |   -80 |..
�[0m�[32m|  96 |         0 |        0 |   -96 |..
�[0m�[32m| 112 |     65535 |        0 |  -112 |..
�[0m�[32m| 128 |         0 |        0 |  -128 |..
�[0m�[32m| 144 |     65535 |        0 |   112 |..
�[0m�[32m| 160 |         0 |        0 |    96 |..
�[0m�[32m| 176 |     65535 |        0 |    80 |..
�[0m�[32m| 192 |         0 |        0 |    64 |..
�[0m�[32m| 208 |     65535 |        0 |    48 |..
�[0m�[32m| 224 |         0 |        0 |    32 |..
�[0m�[32m| 240 |     65535 |        0 |    16 |..
�[0m

Looks like simavr is adding terminal colors. Can you disable this via --no-color?

(Also would be nice to be able to redirect these uart output to file as well via -f uart0=output.txt or something similar)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions