xous-core/services/log-server
bunnie ea31f54a79 console escape codes working better
just couldn't let it go. figured out the issue is a race condition
in how the Litex UARTs are constructed...I don't know how Litex
normally handles this kind of situation but they have this funky
construction where reading the fifo doesn't advance it, you have
to...clear the pending bit. I think it was meant to be a "clever"
thing that saves an instruction or something like that since you
always have to clear the pending bit.

Anyways, the previous incarnation of this loop checked to see
if the pending bit was set again and if it was it'd run back
and fetch another character. This turns out to be a bad idea
because the pending bit goes through a multireg and other stuff
before it's readable which means it has a lot of delay on it.
This leads to a race condition.

This version actually checks if the fifo is empty and if it isn't,
it reads the character *and* pumps the pending bit (because
the FIFO doesn't auto-advance when you read it, you have to clear
the pending bit).

This works a lot better, but it's not at all well documented how
this works and it's very hard to tell from reading the source code
because it's written using really fancy migen abstractions that
are also poorly documented and have a lot of cursed constructions.

Anyways. At least the console doesn't die now when you type
a control character, *but* you do have the problem that the
escape codes get mis-interpreted sometimes. If it really really
becomes important later on to fix that it would involve tracing
out the sequence of keys that arrive at InjectKey and figuring
out if things are coming out of order or what is triggering the
bad escape codes.
2022-01-28 04:21:40 +08:00
..
.vscode refactor "examples" -> "services" 2020-10-14 02:04:21 +08:00
src console escape codes working better 2022-01-28 04:21:40 +08:00
build.rs clean up commented out things 2022-01-25 16:39:45 +08:00
Cargo.toml clean up commented out things 2022-01-25 16:39:45 +08:00
README.md refactor "examples" -> "services" 2020-10-14 02:04:21 +08:00

Log output

This contains the core kernel for Xous. It is implemented as a library that you include with your pid 0 program.