feat: Write UART output to uart.log file for VS Code extension#158
Open
feat: Write UART output to uart.log file for VS Code extension#158
Conversation
Add open_uart_log() and close_uart_log() functions to write UART output to a dedicated file at PROJECT_ROOT/uart.log. The file is flushed after each character for real-time monitoring by the ChipFlow VS Code extension. This enables the extension's UART Console panel to display simulation output in real-time by watching the log file. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
open_uart_log()andclose_uart_log()functions in models.cc/huart.logat project root during simulationPurpose
This enables the ChipFlow VS Code extension's UART Console panel to display simulation output in real-time by watching the log file.
Changes
chipflow/common/sim/models.cc: Add uart_log file handle and open/close functions, write characters to filechipflow/common/sim/models.h: Export the new functionschipflow/common/sim/main.cc.jinja: Call open_uart_log/close_uart_logKnown Issue
The generated main.cc wasn't picking up the template changes - needs investigation into why the jinja template isn't being regenerated.
🤖 Generated with Claude Code