From 005925e2ddb39bd9f3d1fa288dbf9d7b350d5d0b Mon Sep 17 00:00:00 2001 From: Peter Mitsis Date: Mon, 16 May 2016 11:21:02 -0400 Subject: [PATCH] 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 --- arch/arm/core/Kconfig | 33 ++++++++++++++++++++++++ arch/arm/soc/nxp_kinetis/k6x/Kconfig.soc | 1 + 2 files changed, 34 insertions(+) diff --git a/arch/arm/core/Kconfig b/arch/arm/core/Kconfig index 74d4cc5b420..85ee2fe8f24 100644 --- a/arch/arm/core/Kconfig +++ b/arch/arm/core/Kconfig @@ -31,6 +31,39 @@ config CPU_CORTEX_M help 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 source "arch/arm/core/cortex_m/Kconfig" endif diff --git a/arch/arm/soc/nxp_kinetis/k6x/Kconfig.soc b/arch/arm/soc/nxp_kinetis/k6x/Kconfig.soc index 18373049d37..07606e0866c 100644 --- a/arch/arm/soc/nxp_kinetis/k6x/Kconfig.soc +++ b/arch/arm/soc/nxp_kinetis/k6x/Kconfig.soc @@ -22,6 +22,7 @@ depends on SOC_SERIES_KINETIS_K6X config SOC_MK64F12 bool "SOC_MK64F12" select HAS_KSDK + select CPU_HAS_FPU endchoice