-
Notifications
You must be signed in to change notification settings - Fork 3k
UnbufferedSerial: Introduce the class to replace RawSerial #11961
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
UnbufferedSerial: Introduce the class to replace RawSerial #11961
Conversation
86fff81
to
3ad8002
Compare
@hugueskamba, thank you for your changes. |
3ad8002
to
01d72ef
Compare
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 pretty good. Think you'll need one change in the retarget bit.
707656f
to
ed45bef
Compare
ed45bef
to
a39e03b
Compare
a39e03b
to
6f88b2c
Compare
Also docs PR reference here please. |
Test run: FAILEDSummary: 3 of 4 test jobs failed Failed test jobs:
|
The failures look related, please review |
63c34b5
to
77cf419
Compare
This force-push restores |
77cf419
to
323b81d
Compare
This force-push updates the commit message as |
When using LTO |
@kjbracey-arm @bulislaw @evedon See the comparison below. Note: The comparison below is between the applications when they were built with LTO.
|
323b81d
to
142b1d2
Compare
The numbers are quite good. I think the extra 133 bytes of Flash for ARM toolchain is a price worth paying for UnbufferedSerial |
142b1d2
to
3885a0b
Compare
This force-push removes the static pinmap changes from this branch. Another PR has been created to address that issue. |
Test run: FAILEDSummary: 2 of 4 test jobs failed Failed test jobs:
|
CI restarted |
Test run: FAILEDSummary: 1 of 11 test jobs failed Failed test jobs:
|
@0xc0170 |
Restarted tests to confirm the failures and provide reports |
* Deprecate RawSerial. * Introduce UnbufferedSerial to provide unbuffered I/O by implementing with a FileHandle interface for I/O streams. * Add Greentea test for the UnbufferedSerial class.
3885a0b
to
7b84540
Compare
This force-push modifIes the newly added test to take into account targets that remove all bytes from the FIFO. |
CI started |
Test run: SUCCESSSummary: 11 of 11 test jobs passed |
Description
Summary of change
with a FileHandle interface for I/O streams.
See the comparison below.
Note:
The
RawSerial
app and theUnbufferedSerial
app were built with LTO.LTO for the ARM toolchain provides a RAM saving of 262 bytes and ROM saving up to 6069 bytes.
LTO for the GCC_ARM toolchain provides a RAM saving of 216 bytes and ROM saving up to 2869 bytes.
The comparison below is between the applications when they were built with LTO.
UnbufferedSerial
withDirectSerial
in retarget is more memory efficient thanRawSerial
withDirectSerial
in retarget (with or without LTO) for GCC_ARM toolchain but less efficient for ARM toolchain.Documentation
https://github.com/ARMmbed/mbed-os/blob/master/docs/design-documents/drivers/serial/serial.md#detailed-design--unbufferedserial
Pull request type
Test results
Reviewers
@evedon @kjbracey-arm
Release Notes
Summary of changes
Add the UnbufferedSerial class to provide unbuffered I/O access.
It is intended to be used instead of RawSerial. See documentration section for more details.
Impact of changes
Migration actions required