Skip to content

boards/linum-stm32h753bi: Add zbus board integration and configuration - #19916

Open
JorgeGzm wants to merge 2 commits into
apache:masterfrom
JorgeGzm:port_zbus
Open

boards/linum-stm32h753bi: Add zbus board integration and configuration#19916
JorgeGzm wants to merge 2 commits into
apache:masterfrom
JorgeGzm:port_zbus

Conversation

@JorgeGzm

@JorgeGzm JorgeGzm commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Summary

Integration of the zbus message bus port (apache/nuttx-apps#3743) on
top of the iterable sections infrastructure (#19927), in two commits:

  1. zbus linker support: include/nuttx/linker/zbus.ld + a
    tools/Config.mk hook (CONFIG_ZBUS_LINKER_INSERT), an optional
    zero-touch mode using GNU ld INSERT AFTER for boards that do not
    include the common fragments (constraints documented in the file);
    plus the zbus Sphinx documentation.
  2. linum-stm32h753bi adoption (first adopter board): 2 #include
    lines in flash.ld and a zbus board configuration enabling the
    zbus example and its cmocka test suite, reproducible with
    ./tools/configure.sh linum-stm32h753bi:zbus.

Impact

  • Users: zbus becomes usable out of the box on the
    linum-stm32h753bi through the new :zbus configuration; any other
    board can adopt it the same way (two linker-script lines, or the
    INSERT mode with no board edit).
  • Existing boards/configs: none. The included fragments expand to
    nothing unless CONFIG_ZBUS is enabled (verified: the stock :nsh
    map has zero zbus sections), and the Config.mk hook is inert unless
    CONFIG_ZBUS_LINKER_INSERT=y.
  • Build process: Make and CMake both supported (both preprocess the
    board linker script, so the #include lines work on either).
  • Hardware: only the linum-stm32h753bi board is touched.
  • Documentation: zbus application pages and a zbus entry in the
    board configuration list.
  • Tooling: the reused zbus SVG diagrams are added to the
    .codespellrc skip list (their embedded base64 raster data trips the
    spell checker with false positives).
  • Security / compatibility: no changes to existing runtime code.

Testing

Target: linum-stm32h753bi (STM32H753BI),

  • :zbus build (Make and CMake): OK, the three _zbus_*_list sections
    collected name-sorted in flash as required by the zbus VDED algorithm.
  • On hardware: the 16-test zbus cmocka suite passes twice
    in the same boot and the zbus example produces the expected output,
    with the fourth message correctly masked for the listener and the
    listener notified before the subscriber:
nsh> zbus
zbus: publishing 5 messages to acc_chan
zbus:  listener: x=1 y=10 z=100
zbus:  subscriber: x=1 y=10 z=100
zbus:  listener: x=2 y=20 z=200
zbus:  subscriber: x=2 y=20 z=200
zbus:  listener: x=3 y=30 z=300
zbus: listener masked
zbus:  subscriber: x=3 y=30 z=300
zbus: listener unmasked
zbus:  subscriber: x=4 y=40 z=400
zbus:  listener: x=5 y=50 z=500
zbus:  subscriber: x=5 y=50 z=500
zbus: done
  • INSERT mode validated in a standalone ld harness (placement, sorting,
    no overlap).
  • tools/checkpatch.sh -c -u -m -g on both commits (nxstyle +
    codespell, same flags as CI): all checks pass. sphinx-build -W:
    clean.

ostest log:
log_ostest.txt

Depends-On: apache/nuttx-apps#3743

@github-actions github-actions Bot added Area: Build system Size: XL The size of the change in this PR is very large. Consider breaking down the PR into smaller pieces. Board: arm labels Aug 21, 2026
@github-actions

github-actions Bot commented Aug 21, 2026

Copy link
Copy Markdown

MemBrowse Memory Report

No memory changes detected for:

@xiaoxiang781216

Copy link
Copy Markdown
Contributor

@JorgeGzm could you split iterator section from zbus to new pr?

@github-actions

Copy link
Copy Markdown

🔗 Cross-repo PR dependencies

The read-only Build run reported the following dependent PR(s) and fetched head SHA(s):

CI run: https://github.com/apache/nuttx/actions/runs/32439921078

@linguini1

Copy link
Copy Markdown
Contributor

Do not list "new files". This is visible in the diff already. Please review the AI-generated PR descriptions and revise them for correctness and simplicity.

@github-actions github-actions Bot added Size: L The size of the change in this PR is large and removed Size: XL The size of the change in this PR is very large. Consider breaking down the PR into smaller pieces. labels Aug 21, 2026
@JorgeGzm JorgeGzm changed the title include/nuttx: Add link-time iterable sections infrastructure boards/linum-stm32h753bi: Add zbus board integration and configuration Aug 21, 2026
@JorgeGzm

Copy link
Copy Markdown
Contributor Author

@JorgeGzm could you split iterator section from zbus to new pr?

Done, the PR #19927 whas created.

@github-actions

Copy link
Copy Markdown

🔗 Cross-repo PR dependencies

The read-only Build run reported the following dependent PR(s) and fetched head SHA(s):

CI run: https://github.com/apache/nuttx/actions/runs/32515058484

@github-actions

Copy link
Copy Markdown

🔗 Cross-repo PR dependencies

The read-only Build run reported the following dependent PR(s) and fetched head SHA(s):

CI run: https://github.com/apache/nuttx/actions/runs/32531266071

@github-actions

Copy link
Copy Markdown

🔗 Cross-repo PR dependencies

The read-only Build run reported the following dependent PR(s) and fetched head SHA(s):

CI run: https://github.com/apache/nuttx/actions/runs/32757958806

jerpelea
jerpelea previously approved these changes Aug 25, 2026
@github-actions github-actions Bot added Size: XL The size of the change in this PR is very large. Consider breaking down the PR into smaller pieces. and removed Size: L The size of the change in this PR is large labels Aug 25, 2026
Comment thread tools/Config.mk Outdated
Comment thread tools/Config.mk Outdated
@github-actions

Copy link
Copy Markdown

🔗 Cross-repo PR dependencies

The read-only Build run reported the following dependent PR(s) and fetched head SHA(s):

CI run: https://github.com/apache/nuttx/actions/runs/32880838739

@github-actions

Copy link
Copy Markdown

🔗 Cross-repo PR dependencies

The read-only Build run reported the following dependent PR(s) and fetched head SHA(s):

CI run: https://github.com/apache/nuttx/actions/runs/32901775310

Comment thread include/nuttx/linker/zbus.ld Outdated
Comment thread include/nuttx/linker/zbus.ld Outdated
@github-actions

Copy link
Copy Markdown

🔗 Cross-repo PR dependencies

The read-only Build run reported the following dependent PR(s) and fetched head SHA(s):

CI run: https://github.com/apache/nuttx/actions/runs/32973406735

@linguini1 linguini1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can you run and attach an OSTest on the board? Since the linker scripts were modified.

Please add the Assisted-by field to your commits to indicate AI assistance.

@JorgeGzm

Copy link
Copy Markdown
Contributor Author

Can you run and attach an OSTest on the board? Since the linker scripts were modified.

Please add the Assisted-by field to your commits to indicate AI assistance.

nsh> ostest
stdio_test: write fd=1
stdio_test: Standard I/O Check: printf
stdio_test: write fd=2
...
user_main: Exiting
ostest_main: Exiting with status 0
stdio_test: Standard I/O Check: fprintf to stderr
nsh> 

@github-actions github-actions Bot added Area: Documentation Improvements or additions to documentation Size: L The size of the change in this PR is large and removed Area: Build system Size: XL The size of the change in this PR is very large. Consider breaking down the PR into smaller pieces. labels Aug 26, 2026
@github-actions

Copy link
Copy Markdown

❌ Cross-repo dependency could not be applied

The Build report says the declared dependency PR(s) could not be applied, so CI did not run against the combined code:

Reason: cherry-pick failed (if your PR has merge commits, rebase instead)

CI run: https://github.com/apache/nuttx/actions/runs/32998517896

@linguini1
linguini1 dismissed their stale review August 26, 2026 18:40

OS tested. However, in the future, please include the full OS test log either in the test section as text or as an attached text file.

@github-actions

Copy link
Copy Markdown

🔗 Cross-repo PR dependencies

The read-only Build run reported the following dependent PR(s) and fetched head SHA(s):

CI run: https://github.com/apache/nuttx/actions/runs/33009500013

@xiaoxiang781216

Copy link
Copy Markdown
Contributor

ci was fixed, please rebase your change to the last master. @JorgeGzm

NuttX-side support for the zbus message bus port (apps/system/zbus in
nuttx-apps), built on the link-time iterable sections infrastructure
added in a companion PR:

- include/nuttx/linker/common-rom.ld and common-insert.ld: register the
  zbus channel, observer and channel observation iterable sections
  (ITERABLE_SECTION blocks guarded by CONFIG_ZBUS, no-op otherwise) for
  the include and the zero-touch INSERT modes respectively;
  common-ram.ld: note that zbus needs no RAM sections.
- Documentation/applications/system/zbus: Sphinx documentation for the
  zbus application, with the upstream Zephyr diagrams (Apache-2.0).
- .codespellrc: skip the reused zbus SVG diagrams (embedded base64
  raster data trips the spell checker).

Assisted-by: Claude Code
Signed-off-by: Jorge Guzman <jorge.gzm@gmail.com>
Adopt the zbus message bus on the linum-stm32h753bi (first adopter
board):

- scripts/flash.ld: include the iterable sections common fragments
  (2 lines: common-rom.ld inside .text, common-ram.ld inside .data).
- configs/zbus/defconfig: board configuration enabling zbus with all
  observer types, the zbus example and its cmocka test suite
  (./tools/configure.sh linum-stm32h753bi:zbus).
- Board documentation: describe the new configuration.

Validated on hardware: the 16-test cmocka suite passes twice in the
same boot and the zbus example produces the expected output.

Assisted-by: Claude Code
Signed-off-by: Jorge Guzman <jorge.gzm@gmail.com>
@github-actions

Copy link
Copy Markdown

🔗 Cross-repo PR dependencies

The read-only Build run reported the following dependent PR(s) and fetched head SHA(s):

CI run: https://github.com/apache/nuttx/actions/runs/33078932636

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: Documentation Improvements or additions to documentation Board: arm Size: L The size of the change in this PR is large

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants