lowRISC / sonata-system

A full micro-controller system utilizing the CHERIoT Ibex core, part of the Sunburst project funded by UKRI
Apache License 2.0
24 stars 15 forks source link

uartdpi: Ignore write failures #53

Closed HU90m closed 5 months ago

HU90m commented 5 months ago

Currently if there is failure to write to the TTY or file, an assert fails and the simulation core dumps.

This patch changes that to log the error that was observed and continue the simulation.

nbdd0121 commented 5 months ago

In what circumstance would the write fail? If the TTY is not open on the other end it should just block rather than fail?

HU90m commented 5 months ago

These are non blocking writes, so it fails with errno EAGAIN. We could make them blocking, but I don't want the whole sim to stop just because the TTY hasn't been connected.