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

Flusing log uart during fault #6660

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ewoodev
Copy link
Contributor

@ewoodev ewoodev commented Feb 6, 2025

No description provided.

@ewoodev ewoodev changed the title Flusing log uart Flusing log uart during fault Feb 6, 2025
When system fault is occured, The system is in the irq locking state, The logs that have not
yet been output remain in the uart buffer and are not output.
So, For debugging, it is necessary to flush the log uart buffer before outputting the fault log.

For flushing transmit buffe, we need to know xmit buffer is empty or not.
Therefore, Add to so that uart_xmitchars function returns amount sent.
the return value is 0, xmit buffer is empty.

Signed-off-by: eunwoo.nam <[email protected]>
@ewoodev ewoodev force-pushed the WORK-250206_flush_log_uart branch 6 times, most recently from 4532208 to 4ed0553 Compare February 6, 2025 13:33
…ault log.

since, The system fault is occured, uart log is stil in the uart buffer and not printed.
So, we can't see last log.

Therefore, Add flusing log uart buffer when fault is occured.

Signed-off-by: eunwoo.nam <[email protected]>
@ewoodev ewoodev force-pushed the WORK-250206_flush_log_uart branch from 4ed0553 to fef47cc Compare February 6, 2025 13:34

/* To avoid duplicated calling up_flush_console(). */
if (g_log_flush_running) {
return;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should have leave_critical_section here.

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.

2 participants