summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWojciech Zmuda <wojciech.zmuda@huawei.com>2020-12-10 16:02:08 +0000
committerNaveen Saini <naveen.kumar.saini@intel.com>2020-12-14 08:16:12 +0800
commit4dee0261c1e0a552431d7ea1fd06207bc57e2420 (patch)
treeeab856ba8997aef00cbae292f4ec9aad700d586b
parent33fde6e6bc598897537c8c43024e0c380d083858 (diff)
downloadmeta-zephyr-4dee0261c1e0a552431d7ea1fd06207bc57e2420.tar.gz
meta-zephyr-4dee0261c1e0a552431d7ea1fd06207bc57e2420.tar.bz2
meta-zephyr-4dee0261c1e0a552431d7ea1fd06207bc57e2420.zip
conf: machine: add support for Nordic nRF52832 Cortex-M4 chip
Add include for Cortex-M4 tunes and nRF52832. The nRF config appends 'nordic' to MACHINEOVERRIDES, so the kernel recipe can include Nordic HAL when this override is detected. Signed-off-by: Wojciech Zmuda <wojciech.zmuda@huawei.com> Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
-rw-r--r--conf/machine/include/nrf52832.inc10
-rw-r--r--conf/machine/include/tune-cortexm4.inc19
2 files changed, 29 insertions, 0 deletions
diff --git a/conf/machine/include/nrf52832.inc b/conf/machine/include/nrf52832.inc
new file mode 100644
index 0000000..73e628a
--- /dev/null
+++ b/conf/machine/include/nrf52832.inc
@@ -0,0 +1,10 @@
+#@TYPE: Machine
+#@NAME: nrf52832
+
+#@DESCRIPTION: Machine configuration for Nordic Semiconductor nRF52832 (Cortex-M4) SoC.
+
+require conf/machine/include/tune-cortexm4.inc
+
+MACHINEOVERRIDES =. "nordic:"
+
+TUNE_FEATURES = "armv7m cortexm4"
diff --git a/conf/machine/include/tune-cortexm4.inc b/conf/machine/include/tune-cortexm4.inc
new file mode 100644
index 0000000..a823b6b
--- /dev/null
+++ b/conf/machine/include/tune-cortexm4.inc
@@ -0,0 +1,19 @@
+DEFAULTTUNE ?= "cortexm4"
+
+require conf/machine/include/arm/arch-armv7a.inc
+
+TUNEVALID[cortexm4] = "Enable Cortex-M4 specific processor optimizations"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexm4', ' -mcpu=cortex-m4', '', d)}"
+AVAILTUNES += "cortexm4"
+
+TUNEVALID[armv7m] = "Enable Cortex-M4 specific processor optimizations"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'armv7m', ' -march=armv7e-m', '', d)}"
+MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'armv7m', 'armv7m:', '' ,d)}"
+
+TUNE_PKGARCH_tune-cortexm4 = "cortexm4"
+
+ARMPKGARCH_tune-cortexm4 = "armv7m"
+PACKAGE_EXTRA_ARCHS_tune-cortexm4 ="cortexm4"
+
+TUNE_FEATURES_tune-cortexm4 = "armv7m vfp cortexm4"
+PACKAGE_EXTRA_ARCHS_tune-cortexm4 = "${PACKAGE_EXTRA_ARCHS_tune-armv7at} armv7m-vfp armv7m"