Skip to content

Conversation

@dirksavage88
Copy link
Contributor

@dirksavage88 dirksavage88 commented Sep 29, 2025

Summary

Addresses inconsistencies in serial uart registration when no DEV_CONSOLE is defined/assigned (See #17116). The registration order is implicitly based on DEV_CONSOLE definition, and it results in lpuart1 registration on ttys0 and ttys1 with no dev console defined.

Impact

Minor impact to users using imxrt106x boards: will impact those who do not have a dev console enabled.

Testing

Compiled on ubuntu 24.04. Tested on Teensy 4.1 derivative board when no dev console defined, but need to test with a dev console on each successive lpuart to make sure the registration order is correct. This derivative board has all 8 lpuarts pins broken out, whereas the teensy4.1 nsh board only has several uarts defined.
build.zip

TODO: test on actual teensy 4.1

@github-actions github-actions bot added Arch: arm Issues related to ARM (32-bit) architecture Size: L The size of the change in this PR is large labels Sep 29, 2025
@acassis
Copy link
Contributor

acassis commented Sep 30, 2025

Hi @dirksavage88 please fix this long line:

/* Pick ttys1/ttys2.  This could be one of UART2-12. It can't be UART1 because that

/****************************************************************************
* arch/arm/src/imxrt/hardware/rt106x/imxrt106x_pinmux.h
*
* SPDX-License-Identifier: Apache-2.0
Copy link
Contributor

Choose a reason for hiding this comment

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

Hi @dirksavage88 Why did you remove SPDX-License-Identifier ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This file was originally copied from the px4 fork of Nuttx. The fork is behind upstream nuttx releases, so I am not surprised if this was an artifact of that.

Here is the px4 forked version for reference

Copy link
Contributor

Choose a reason for hiding this comment

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

@dirksavage88 Ok, but in NuttX it's necessary. See other files.

@jerpelea

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is added back in no?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added it back in @simbit18. This removed license identifier was from an old commit. I've since squashed the commit history so it does not show in the history

@dirksavage88
Copy link
Contributor Author

Hi @dirksavage88 please fix this long line:

/* Pick ttys1/ttys2.  This could be one of UART2-12. It can't be UART1 because that

I've fixed these long comments

* Explicit registration of ttys0 when no console defined
* Fixes overwriting registration of lpuart1 on ttys1 when no console on ttys0
* Change regstration logic to check for console assignment
* See issue 17116

Signed-off-by: dirksavage88 <[email protected]>
@dirksavage88 dirksavage88 force-pushed the pr-imxrt106x_uartregistration branch from 09194ed to c941c8a Compare October 10, 2025 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Arch: arm Issues related to ARM (32-bit) architecture 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.

[BUG] IMXRT106x serial uart registration overwrites registration of lpuart 1 when no dev console is defined

3 participants