Skip to content

[BUG] RP2040 NSH console broken messages and crashes (memory corruption) #16038

Closed
@keever50

Description

@keever50

Description / Steps to reproduce the issue

Board: raspberrypi-pico / any RP2040 based boards
Config: usbnsh, nsh or any nsh including configs.

Symptoms: Depending on the configuration, broken messages and crashes behave differently. This looks like a typical memory corruption issue. This is seen in the NSH printing garbage or missing lines. But also crashes happen in running ostest, which also fail at random moments depending on configuration.

Reproduce broken messages:

  1. Run commands like help or ls /dev
  2. Console shows broken messages

Reproduce crash and garbage:

  1. Press up without history
  2. Garbage, OS hang or program crashes at a later stage.

  1. Run ostest on random configurations
  2. ostest fails at random locations

  1. use syslog
  2. fails at random moments and prints garbage

A screenshot of broken messages:

Image

Cross check

  • This is tested with the NuttX simulation where this cannot be replicated.
  • This appears to get worse when syslog is enabled.
  • Any output, serial, RAM or USB produces these results
  • STM32 F446RE does not have this issue. It also has no history feature.

Attempts to fix issue

  • Updated the Pico SDK. No effect.
  • Clean NuttX install. No effect.

On which OS does this issue occur?

[OS: Linux]

What is the version of your OS?

Arch Linux 6.13.7-arch1-1

NuttX Version

Master

Issue Architecture

[Arch: arm]

Issue Area

[Area: OS Components]

Host information

Any configuration with NSH will produce this.

Verification

  • I have verified before submitting the report.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Arch: armIssues related to ARM (32-bit) architectureArea: OS ComponentsOS Components 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