Skip to content

platforms: Serial new dedicated writeBlocking method#25537

Merged
dakejahl merged 11 commits intomainfrom
pr-serial_write_blocking
Sep 15, 2025
Merged

platforms: Serial new dedicated writeBlocking method#25537
dakejahl merged 11 commits intomainfrom
pr-serial_write_blocking

Conversation

@dagar
Copy link
Copy Markdown
Member

@dagar dagar commented Sep 8, 2025

Work in progress

@dakejahl dakejahl marked this pull request as ready for review September 9, 2025 19:11
@dakejahl dakejahl requested a review from alexcekay September 9, 2025 19:28
@github-actions
Copy link
Copy Markdown

github-actions bot commented Sep 9, 2025

🔎 FLASH Analysis

px4_fmu-v5x [Total VM Diff: -16 byte (-0 %)]
    FILE SIZE        VM SIZE    
--------------  -------------- 
+0.0%     +46  [ = ]       0    .debug_abbrev
+0.0%     +24  [ = ]       0    .debug_aranges
+0.0%     +84  [ = ]       0    .debug_frame
+0.0%    +758  [ = ]       0    .debug_info
+0.0%    +276  [ = ]       0    .debug_line
+0.0%    +314  [ = ]       0    .debug_loclists
+0.0%     +24  [ = ]       0    .debug_rnglists
  [NEW]      +3  [ = ]       0    [Unmapped]
  +0.0%     +21  [ = ]       0    [section .debug_rnglists]
+0.0%    +118  [ = ]       0    .debug_str
+0.0%     +32  [ = ]       0    .symtab
  -0.3%     -32  [ = ]       0    [section .symtab]
   +50%     +16  [ = ]       0    device::Serial
   +20%     +16  [ = ]       0    device::Serial::~Serial()
  +7.1%     +32  [ = ]       0    hrt_elapsed_time
+0.1%     +16  [ = ]       0    [Unmapped]
-0.0%     -16  -0.0%     -16    .text
  +7.0%     +34  +7.0%     +34    hrt_elapsed_time
  -4.5%      -2  -4.5%      -2    device::Serial::~Serial()
  -4.8%      -4  -4.8%      -4    device::SerialImpl::write()
  -8.3%      -4  -8.3%      -4    hrt_store_absolute_time
 -13.3%     -40 -13.3%     -40    device::SerialImpl::readAtLeast()
+0.0% +1.64Ki  -0.0%     -16    TOTAL

px4_fmu-v6x [Total VM Diff: -8 byte (-0 %)]
    FILE SIZE        VM SIZE    
--------------  -------------- 
+0.0%     +46  [ = ]       0    .debug_abbrev
+0.0%     +24  [ = ]       0    .debug_aranges
+0.0%     +84  [ = ]       0    .debug_frame
+0.0%    +758  [ = ]       0    .debug_info
+0.0%    +276  [ = ]       0    .debug_line
+0.0%    +314  [ = ]       0    .debug_loclists
+0.0%     +20  [ = ]       0    .debug_rnglists
  [DEL]      -1  [ = ]       0    [Unmapped]
  +0.0%     +21  [ = ]       0    [section .debug_rnglists]
+0.0%    +118  [ = ]       0    .debug_str
+0.0%     +32  [ = ]       0    .symtab
  -0.3%     -32  [ = ]       0    [section .symtab]
   +50%     +16  [ = ]       0    device::Serial
   +20%     +16  [ = ]       0    device::Serial::~Serial()
 -33.3%     -16  [ = ]       0    hrt_call_enter
  +8.3%     +32  [ = ]       0    hrt_elapsed_time
   +50%     +16  [ = ]       0    latency_baseline
+0.1%      +8  [ = ]       0    [Unmapped]
-0.0%      -8  -0.0%      -8    .text
  +8.1%     +34  +8.1%     +34    hrt_elapsed_time
  +2.9%      +4  +2.9%      +4    hrt_call_enter
  -4.5%      -2  -4.5%      -2    device::Serial::~Serial()
  -4.8%      -4  -4.8%      -4    device::SerialImpl::write()
 -13.3%     -40 -13.3%     -40    device::SerialImpl::readAtLeast()
+0.0% +1.63Ki  -0.0%      -8    TOTAL

Updated: 2025-09-15T16:49:38

Comment thread platforms/nuttx/src/px4/common/SerialImpl.cpp Outdated
Comment thread platforms/nuttx/src/px4/common/SerialImpl.cpp Outdated
Comment thread platforms/posix/src/px4/common/SerialImpl.cpp Outdated
Comment thread platforms/qurt/src/px4/SerialImpl.cpp
@dakejahl dakejahl requested a review from katzfey September 15, 2025 16:41
@dakejahl dakejahl force-pushed the pr-serial_write_blocking branch from a3596f8 to 61fe39c Compare September 15, 2025 16:42
@dakejahl dakejahl self-assigned this Sep 15, 2025
@dakejahl dakejahl merged commit d3f912a into main Sep 15, 2025
70 of 71 checks passed
@dakejahl dakejahl deleted the pr-serial_write_blocking branch September 15, 2025 23:22
mrpollo pushed a commit that referenced this pull request Nov 24, 2025
* platforms: Serial new dedicated writeBlocking method

* finish writeBlocking()

* add back fsync

* updated posix, added string constant for port not open error

* format

* fix build

* remove fsync

* actually remove fsync

* remove fsync from write

* review feedback

---------

Co-authored-by: Jacob Dahl <dahl.jakejacob@gmail.com>
Co-authored-by: Jacob Dahl <37091262+dakejahl@users.noreply.github.com>
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.

4 participants