JoNil / elf2uf2-rs

BSD Zero Clause License
81 stars 31 forks source link

Always flush stdout to prevent buffering of data #18

Closed datdenkikniet closed 1 year ago

datdenkikniet commented 1 year ago

Thanks for the cool crate :)

This prevents stdout from buffering data internally.

This is relevant when sending binary data (e.g. defmt logs) to stdout, as it will look for some marker to flush (usually \n) which only semi-randomly appears. This causes the data to be buffered internally and flushed as a big block, instead of continually as it flows out of the device, making for a less-than-ideal logging experience.

Our use case is logging over USB with defmt-bbq for the rusty-probe-firmware.

datdenkikniet commented 1 year ago

@JoNil ping! :D (Sorry if it's superfluous, just wanted to make sure you saw the PR).