JorgeGzm opened a new pull request, #20027:
URL: https://github.com/apache/nuttx/pull/20027
## Summary
Integration of the **zbus** message bus port (apache/nuttx-apps#3743) on
top of the iterable sections infrastructure (#19927, merged), in two
commits (NuttX-side zbus support, then the board adoption):
1. **zbus linker support**: the zbus `ITERABLE_SECTION()` blocks,
guarded by `CONFIG_ZBUS`, in `include/nuttx/linker/common-rom.ld`
(include mode) and `common-insert.ld` (zero-touch INSERT mode of
#19927); 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, its cmocka test suite and the OS test (`ostest`),
reproducible with `./tools/configure.sh linum-stm32h753bi:zbus`.
This resubmits the content of #19916, which was merged and then reverted
in #20009 because it landed before apache/nuttx-apps#3743: the board
configuration enables `CONFIG_EXAMPLES_ZBUS` and `CONFIG_TESTING_ZBUS`,
which only exist once the application side is in. Both dependencies are
declared with `depends-on:` lines, and this PR should only be merged
after both of them.
## 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).
- **Build process:** no build logic touched in this PR (the INSERT-mode
hook lives in #19927); Make and CMake both supported for the include
mode.
- **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
Host: Ubuntu 24.04.4 x86_64, arm-none-eabi-gcc 13.2.1 (GNU ld 2.41).
Target: linum-stm32h753bi (STM32H753BI), built with #19927 and
apache/nuttx-apps#3743 applied (as CI does).
- Stock `:nsh` build: no zbus references in the map or in the
preprocessed linker script (no-op proof).
- `: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 (ST-LINK V3): the 17-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
```
- `ostest` on the same boot, after the zbus suite (the zbus async
listener task stays alive throughout): `ostest_main: Exiting with
status 0`, no failures.
- INSERT mode: `common-insert.ld` preprocessed with `CONFIG_ZBUS` expands
to the three zbus `ITERABLE_SECTION` blocks inside `.iterable_sections`
(`INSERT AFTER .text`) and to an empty section without it;
`common-rom.ld` expands to nothing in that mode.
- `tools/checkpatch.sh -c -u -m -g` on both commits (nxstyle +
codespell, same flags as CI): all checks pass. `sphinx-build -W`:
clean.
Depends-On https://github.com/apache/nuttx/pull/20015
Depends-On apache/nuttx-apps/pull/3743
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]