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

hal/imxrt: Support RTT as a HAL console #600

Merged
merged 1 commit into from
Oct 7, 2024
Merged

Conversation

Darchiv
Copy link
Member

@Darchiv Darchiv commented Sep 26, 2024

UART is enabled by default (current behavior), but can be turned off by defining UART_CONSOLE_KERNEL with an empty value. RTT is enabled by defining RTT_ENABLED with a truthy value and (optionally) selecting a channel to use by RTT_CONSOLE_KERNEL (0-based). UART and RTT may be used at the same time.

RTT driver reuses the control block configured by plo, which must also create a map named via RTT_SYSPAGE_MAP_NAME (default: "rtt"). Channel configuration is not altered at all, so RTT will work even when user-mode driver takes control - exception dumps will still be printed.

JIRA: RTOS-754

Description

Motivation and Context

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-evk.

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

  • This PR needs additional PRs to work (list the PRs, preferably in merge-order).
  • I will merge this PR by myself when appropriate.

Copy link

github-actions bot commented Sep 26, 2024

Unit Test Results

7 725 tests  ±0   7 010 ✅ ±0   37m 29s ⏱️ - 1m 19s
  445 suites ±0     715 💤 ±0 
    1 files   ±0       0 ❌ ±0 

Results for commit af8e92e. ± Comparison against base commit d99dc74.

♻️ This comment has been updated with latest results.

@Darchiv Darchiv marked this pull request as ready for review September 26, 2024 14:54
Copy link
Contributor

@jmaksymowicz jmaksymowicz left a comment

Choose a reason for hiding this comment

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

Looks good, just a few suggestions.

hal/arm/rtt.c Show resolved Hide resolved
hal/arm/rtt.c Show resolved Hide resolved
hal/arm/rtt.c Outdated Show resolved Hide resolved
hal/arm/rtt.c Outdated Show resolved Hide resolved
hal/arm/rtt.c Outdated Show resolved Hide resolved
hal/arm/rtt.c Outdated Show resolved Hide resolved
hal/arm/rtt.h Outdated Show resolved Hide resolved
lib/helpers.h Show resolved Hide resolved
hal/armv7m/imxrt/117x/console.c Show resolved Hide resolved
lib/helpers.h Outdated Show resolved Hide resolved
lib/helpers.h Outdated Show resolved Hide resolved
hal/armv7m/imxrt/117x/console.c Outdated Show resolved Hide resolved
hal/arm/rtt.c Outdated Show resolved Hide resolved
agkaminski
agkaminski previously approved these changes Sep 27, 2024
UART is enabled by default (current behavior), but can be turned off
by defining UART_CONSOLE_KERNEL with an empty value. RTT is enabled by
defining RTT_ENABLED with a truthy value and (optionally) selecting a
channel to use by RTT_CONSOLE_KERNEL (0-based). UART and RTT may be used
at the same time.

RTT driver reuses the control block configured by plo, which must also
create a map named via RTT_SYSPAGE_MAP_NAME (default: "rtt"). Channel
configuration is not altered at all, so RTT will work even when
user-mode driver takes control - exception dumps will still be printed.

JIRA: RTOS-754
@Darchiv Darchiv merged commit 90cefb5 into master Oct 7, 2024
34 checks passed
@Darchiv Darchiv deleted the Darchiv/RTOS-754 branch October 7, 2024 08:02
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