Skip to content

KConfig and prj.conf support for float or double values #33102

@GeorgeGkinis

Description

@GeorgeGkinis

Is your enhancement proposal related to a problem? Please describe.
I have the need to pass floats or doubles to my application through Kconfig and prj.conf

Describe the solution you'd like
I would like to assign a float or double value within my prj.conf for Kconfig such as :
CONFIG_MY_FLOAT_SETTING=42.01

Describe alternatives you've considered
Using a integer and a decimal part, but it has its limitations and is straight up ugly :
CONFIG_MY_FLOAT_SETTING_INT=42
CONFIG_MY_FLOAT_SETTING_DEC=01 // <- syntax error

Additional context
I see that once upon a time float support had been added for the Linux kernel?
https://patchwork.kernel.org/project/linux-kbuild/patch/[email protected]/

Metadata

Metadata

Assignees

No one assigned

    Labels

    EnhancementChanges/Updates/Additions to existing featuresNeeds reviewThis PR needs attention from Zephyr's maintainersarea: Kconfig

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions