Skip to content

[BUG] Default configuration values hardcoded in code #16420

@raiden00pl

Description

@raiden00pl

Description / Steps to reproduce the issue

There are many places in NuttX where configuration defaults are set in the source code, not from Kconfig.

This should be handled by Kconfig only otherwise it can lead to hard to detect problems like in this issue #16256

We can find these definitions using simple commands:

  • git grep "#define CONFIG"
  • git grep " # define CONFIG"
  • git grep " #define CONFIG"

Some results returned in this way are false positives, so additional verification is required.

In some way the problem is related to this issue #11637

Another related problem is the use of #define CONFIG_ for definitions that don't come from Kconfig. Shouldn't definitions in this format be reserved for Kconfig only? When I see CONFIG_XXX_YYY definition used somewhere in the code I expect it to be defined in .config / include/nuttx/config.h, which is often not true in NuttX.

On which OS does this issue occur?

[OS: Linux]

What is the version of your OS?

NuttX Version

Issue Architecture

[Arch: all]

Issue Area

[Area: Configuring]

Host information

No response

Verification

  • I have verified before submitting the report.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Arch: allIssues that apply to all architecturesArea: 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