Skip to content
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

imxrt-multi: add support for console over RTT #514

Merged
merged 7 commits into from
Oct 16, 2024
Merged

Conversation

jmaksymowicz
Copy link
Contributor

@jmaksymowicz jmaksymowicz commented Sep 13, 2024

Allows for UART-like devices to be created which transmit data over RTT.

Description

Console can be defined to use either UART (as before) or an RTT channel. For now it is not possible to have console through both UART and RTT.

Each RTT channel can be configured to work in non-blocking or blocking mode. In non-blocking mode data is discarded if there is no space left in the buffer. In blocking mode the code attempts to detect if there is a host receiving data over the RTT interface and if there is, the code waits a pre-defined period until there is space left in the buffer.

Motivation and Context

With this change it is possible to access console (e.g. psh) over RTT interface.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Chore (refactoring, style fixes, git/CI config, submodule management, no code logic changes)

How Has This Been Tested?

  • Already covered by automatic testing.
  • New test added: (add PR link here).
  • Tested by hand on: imxrt1170

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing linter checks and tests passed.
  • My changes generate no new compilation warnings for any of the targets.

Special treatment

CHange implements library for RTT (multichannel, bidirectional)
communicaton over debug probe JTAG/SWD.

JIRA: RTOS-754
Copy link

github-actions bot commented Sep 13, 2024

Unit Test Results

7 741 tests  +16   7 026 ✅ +16   43m 18s ⏱️ + 6m 20s
  461 suites +16     715 💤 ± 0 
    1 files   ± 0       0 ❌ ± 0 

Results for commit 0dd1c94. ± Comparison against base commit a34c653.

♻️ This comment has been updated with latest results.

multi/imxrt-multi/rttuart.h Outdated Show resolved Hide resolved
multi/imxrt-multi/rttuart.h Outdated Show resolved Hide resolved
multi/imxrt-multi/uart.c Outdated Show resolved Hide resolved
multi/imxrt-multi/rttuart.c Outdated Show resolved Hide resolved
multi/imxrt-multi/rttuart.c Outdated Show resolved Hide resolved
multi/imxrt-multi/config.h Outdated Show resolved Hide resolved
multi/imxrt-multi/rtt.c Outdated Show resolved Hide resolved
librtt/librtt.c Show resolved Hide resolved
librtt/librtt.c Show resolved Hide resolved
librtt/librtt.c Outdated Show resolved Hide resolved
multi/imxrt-multi/config.h Outdated Show resolved Hide resolved
multi/imxrt-multi/config.h Outdated Show resolved Hide resolved
multi/imxrt-multi/imxrt-multi.c Outdated Show resolved Hide resolved
multi/imxrt-multi/config.h Show resolved Hide resolved
multi/imxrt-multi/config.h Outdated Show resolved Hide resolved
multi/imxrt-multi/config.h Show resolved Hide resolved
multi/imxrt-multi/config.h Outdated Show resolved Hide resolved
@jmaksymowicz jmaksymowicz force-pushed the gerard5/RTOS-754 branch 2 times, most recently from 8b23615 to e20a3d0 Compare October 16, 2024 08:40
librtt/librtt.c Outdated Show resolved Hide resolved
Fix rtt structure read before initialization
Add better argument validation
Add volatile modifier where necessary
Add option to use cached memory for buffers
Renamed files and functions from "rtt" to "librtt"

JIRA: RTOS-754
Add more utility functions to probe channel status.

JIRA: RTOS-754
multi/imxrt-multi/rtt.c Outdated Show resolved Hide resolved
Remove hard-coded RTT address and get it from memory map.
Change RTT initialization to keep existing buffer contents if buffers
are valid.
Allow more channels in the control block than defined at compile
time (they will not be usable by the userspace driver).

JIRA: RTOS-754
Rename RTT_CHANNEL_* to RTT*

JIRA: RTOS-754
@Darchiv Darchiv merged commit 48a5f47 into master Oct 16, 2024
36 checks passed
@Darchiv Darchiv deleted the gerard5/RTOS-754 branch October 16, 2024 11:00
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.

3 participants