Skip to content

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

@dirksavage88

Description

@dirksavage88

Description / Steps to reproduce the issue

In imxrt_serial.c, there is an implicit check for DEV_CONSOLE definition, however this check is ignored when assigning lpuart1 when no dev console is defined: it is assigned initially to ttyS0, then it is (erroneously) assigned to ttyS1 (confirmed in GDB).

The default registration assignment gets shifted by 1 (e.g. for enabling 8 uarts, the registered devices are assigned to ttys1-ttys8, NOT ttys0-ttys7). While I am not 100% sure why it gets registered twice, I could see an issue if maybe early serial init registers it, then the arm_serial init registers it again.

It is expected that without a DEV_CONSOLE defined, lpuart1 should be assigned to ttyS0, and it should be assigned only once (and explicit checks should exist for DEV_CONSOLE)

See this PR

On which OS does this issue occur?

[OS: Linux]

What is the version of your OS?

ubuntu 24.04

NuttX Version

master

Issue Architecture

[Arch: arm]

Issue Area

[Area: Configuring]

Host information

No response

Verification

  • I have verified before submitting the report.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Arch: armIssues related to ARM (32-bit) architectureArea: ConfiguringConfiguring issuesOS: LinuxIssues related to Linux (building system, etc)Type: BugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions