arm float: Add Kconfig options

Adds Kconfig options CPU_HAS_FPU, FLOAT and FP_SHARING for the arm
architecture.

NOTE: All SOCs in the MK64F12 family have an FPU so that makes it a
convenient location to enable the hidden CPU_HAS_FPU option.

Change-Id: I71771d24f20f52079314bb8db9bf8a0aa827ab41
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
This commit is contained in:
Peter Mitsis 2016-05-16 11:21:02 -04:00
commit 005925e2dd
2 changed files with 34 additions and 0 deletions

View file

@ -31,6 +31,39 @@ config CPU_CORTEX_M
help help
This option signifies the use of a CPU of the Cortex-M family. This option signifies the use of a CPU of the Cortex-M family.
config CPU_HAS_FPU
# Hidden config selected by CPU family
bool
default n
help
This option is enabled when the CPU has a hardware floating point
unit.
menu "Floating Point Options"
depends on CPU_HAS_FPU
config FLOAT
bool
prompt "Floating point registers"
default n
help
This option allows tasks and fibers to use the floating point registers.
By default, only a single task or fiber may use the registers.
Disabling this option means that any task or fiber that uses a
floating point register will get a fatal exception.
config FP_SHARING
bool
prompt "Floating point register sharing"
depends on FLOAT
default n
help
This option allows multiple tasks and fibers to use the floating point
registers.
endmenu
if CPU_CORTEX_M if CPU_CORTEX_M
source "arch/arm/core/cortex_m/Kconfig" source "arch/arm/core/cortex_m/Kconfig"
endif endif

View file

@ -22,6 +22,7 @@ depends on SOC_SERIES_KINETIS_K6X
config SOC_MK64F12 config SOC_MK64F12
bool "SOC_MK64F12" bool "SOC_MK64F12"
select HAS_KSDK select HAS_KSDK
select CPU_HAS_FPU
endchoice endchoice