-
Notifications
You must be signed in to change notification settings - Fork 3k
mbed_retarget: Add a minimal console implementation to provide basic functionalities #11796
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
mbed_retarget: Add a minimal console implementation to provide basic functionalities #11796
Conversation
c204bf1
to
a37de1c
Compare
@hugueskamba, thank you for your changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work.
Can you add in the "Release Notes" section of the PR that there is a new configuration option platform.stdio-minimal-console-only
a37de1c
to
94a042d
Compare
This force-push sets the default value of the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like it should be a good saving. Can refine it a bit.
af99484
to
8eec656
Compare
The two force-pushes (this and this) addresses the first round of comments by @kjbracey-arm |
8eec656
to
1180b3c
Compare
3bbd53d
to
6e32242
Compare
d00c27c
to
584fb82
Compare
This force-push removes |
584fb82
to
af1ea58
Compare
The actual |
e986995
to
d8dd686
Compare
This force-push addresses the latest round of comments by @kjbracey-arm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few more adjustments... And see my comment about removing references to "class" and "MinimalConsole" - still there in commit message and GitHub description.
d8dd686
to
2d21e53
Compare
This force-push addresses the latest round of comments by @kjbracey-arm. |
…functionalities The retarget code allocates an array of FileHandle* for console and file handling (filehandles). A tiny target only needs a console (putc/getc). There is no need for file handling. The POSIX layer and the array of FileHandle* is not required for small targets that only need a console ; this code is optionally compiled out if the configuration parameter platform.stdio-minimal-console-only is set to `"true"`.
2d21e53
to
051991f
Compare
I'll review shortly, started CI meanwhile |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That looks good, but we need to document this option in our handbook. Why/when would you use it, what difference does it make and what are the consequences.
as you are currently working on fdopen: |
The Please create an issue if you want to continue the discussion - we shouldn't derail discussion on this PR. |
Test run: FAILEDSummary: 1 of 11 test jobs failed Failed test jobs:
|
@0xc0170 should the test just be re-started? |
Test restarted |
All green now! |
Description (required)
The retarget code allocates an array of
FileHandle
* for console and filehandling (filehandles). A tiny target only needs a console (
putc/getc
).There is no need for file handling.
The POSIX layer and the array of
FileHandle
* is not required for smalltargets that only need a console ; this code is optionally compiled
out if the configuration parameter
platform.stdio-minimal-console-only
isset to
"true"
.Summary of change (What the change is for and why)
Add a minimal console implementation in
mbed_retarget
to provide basic functionalities.Documentation (Details of any document updates required)
#11634
Pull request type (required)
Test results (required)
Reviewers (optional)
@kjbracey-arm
Release Notes (required for feature/major PRs)
Summary of changes
Add a minimal console implementation in
mbed_retarget
to provide basic console functionalities.A new configuration parameter
platform.stdio-minimal-console-only
has been added to select it.Impact of changes
Smaller memory footprint for applications that only require basic console functionalities.
Migration actions required
N/A