You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "FASTSHIFT (via GitHub)" <gi...@apache.org> on 2026/10/10 10:13:56 UTC
[PR] arch/arm/armv7-m: Add a sched note driver that writes to an ITM port [nuttx]
FASTSHIFT opened a new pull request, #20573:
URL: https://github.com/apache/nuttx/pull/20573
*Note: Please adhere to [Contributing Guidelines](https://github.com/apache/nuttx/blob/master/CONTRIBUTING.md).*
## Summary
Add `CONFIG_ARMV7M_NOTE_ITM`, a note driver that writes the sched notes to an ITM stimulus port. The notes leave the chip through the trace sink the debugger set up (SWO or TPIU), so no RAM buffer or console is needed on the target, and they share the time base of ETM/DWT trace if that is enabled.
The payloads of the port, concatenated in order, are the note byte stream. The ITM is enabled by the debugger; if it is not, the driver does nothing. If the port FIFO stays full, the rest of the note is dropped after `CONFIG_ARMV7M_NOTE_ITM_TIMEOUT` polls.
The second commit enables it in `nucleo-f429zi:trace` so CI builds it. This needs `DRIVERS_NOTE_MAX=2` together with noteram, and `ARMV7M_NOTE_ITM` is now counted in the check in `note_driver.c`, so a too small value is a build error instead of a failed registration at boot.
## Impact
- New option, default n. No change for existing configs except `nucleo-f429zi:trace` (two lines in the defconfig).
- Without a debugger attached the cost is two register reads per note.
- With a slow sink (SWO at a low baud rate, many context switches) the CPU can spin with interrupts off for up to the timeout per word.
## Testing
Build:
- `nucleo-f429zi:trace` builds and links.
- `nucleo-h743zi:nsh` with `SCHED_INSTRUMENTATION_SWITCH` and this option builds and links.
- With `DRIVERS_NOTE_MAX=1` and noteram the build stops at the new `#error`.
- checkpatch is clean.
Hardware:
- Board and debugger: TODO (SWO or TPIU)
- Host: TODO (OS, `arm-none-eabi-gcc` version)
- Ran `ostest` and captured port 1 on the host. TODO: what was checked
```
TODO: capture / decoded notes
```
--
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] arch/arm/armv7-m: Add a sched note driver that writes to an ITM port [nuttx]
Posted by "FASTSHIFT (via GitHub)" <gi...@apache.org>.
FASTSHIFT closed pull request #20573: arch/arm/armv7-m: Add a sched note driver that writes to an ITM port
URL: https://github.com/apache/nuttx/pull/20573
--
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] arch/arm/armv7-m: Add a sched note driver that writes to an ITM port [nuttx]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #20573:
URL: https://github.com/apache/nuttx/pull/20573#issuecomment-6096560463
<!-- membrowse-pr-comment -->
## <img src="https://membrowse.com/membrowse-logo.svg" height="24" align="top"> MemBrowse Memory Report
*No memory changes detected for:*
- [arduino-mega2560](https://membrowse.com/public/apache/nuttx/target/arduino-mega2560/compare?head=786b43623da1e8092640d200a615b561b0193907&base=9a943e6d5a07234e4b4347a17608911a86e5606e)
- [esp32-devkitc](https://membrowse.com/public/apache/nuttx/target/esp32-devkitc/compare?head=786b43623da1e8092640d200a615b561b0193907&base=9a943e6d5a07234e4b4347a17608911a86e5606e)
- [hifive1-revb](https://membrowse.com/public/apache/nuttx/target/hifive1-revb/compare?head=786b43623da1e8092640d200a615b561b0193907&base=9a943e6d5a07234e4b4347a17608911a86e5606e)
- [mirtoo](https://membrowse.com/public/apache/nuttx/target/mirtoo/compare?head=786b43623da1e8092640d200a615b561b0193907&base=9a943e6d5a07234e4b4347a17608911a86e5606e)
- [qemu-armv8a](https://membrowse.com/public/apache/nuttx/target/qemu-armv8a/compare?head=786b43623da1e8092640d200a615b561b0193907&base=9a943e6d5a07234e4b4347a17608911a86e5606e)
- [qemu-intel64](https://membrowse.com/public/apache/nuttx/target/qemu-intel64/compare?head=786b43623da1e8092640d200a615b561b0193907&base=9a943e6d5a07234e4b4347a17608911a86e5606e)
- [rx65n-rsk2mb](https://membrowse.com/public/apache/nuttx/target/rx65n-rsk2mb/compare?head=786b43623da1e8092640d200a615b561b0193907&base=9a943e6d5a07234e4b4347a17608911a86e5606e)
- [s698pm-dkit](https://membrowse.com/public/apache/nuttx/target/s698pm-dkit/compare?head=786b43623da1e8092640d200a615b561b0193907&base=9a943e6d5a07234e4b4347a17608911a86e5606e)
- [stm32-nucleo-f103rb](https://membrowse.com/public/apache/nuttx/target/stm32-nucleo-f103rb/compare?head=786b43623da1e8092640d200a615b561b0193907&base=9a943e6d5a07234e4b4347a17608911a86e5606e)
--
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org