From b0a4c5405775aafb22e7d1fb4bc4137b408418bc Mon Sep 17 00:00:00 2001 From: Juro Bystricky Date: Mon, 6 Mar 2017 14:14:36 -0800 Subject: [PATCH] arduino-101-ble: new MACHINE Support for Arduino BLE ARM core. The core is based on Cortex-M0, so a corresponding tune/toolchain is required as well. Signed-off-by: Juro Bystricky --- conf/machine/arduino-101-ble.conf | 10 +++++++++ conf/machine/include/tune-cortexm0.inc | 31 ++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 conf/machine/arduino-101-ble.conf create mode 100644 conf/machine/include/tune-cortexm0.inc diff --git a/conf/machine/arduino-101-ble.conf b/conf/machine/arduino-101-ble.conf new file mode 100644 index 0000000..f80c7fb --- /dev/null +++ b/conf/machine/arduino-101-ble.conf @@ -0,0 +1,10 @@ +#@TYPE: Machine +#@NAME: arduino-101-ble + +#@DESCRIPTION: Machine configuration for Arduino 101 Board. + +DEFAULTTUNE = "cortexm0" +require conf/machine/include/tune-cortexm0.inc + +TARGET_LINK_HASH_STYLE = "" +ZEPHYR_INHERIT_CLASSES += "zephyr-flash-dfu" diff --git a/conf/machine/include/tune-cortexm0.inc b/conf/machine/include/tune-cortexm0.inc new file mode 100644 index 0000000..d4f95e4 --- /dev/null +++ b/conf/machine/include/tune-cortexm0.inc @@ -0,0 +1,31 @@ +DEFAULTTUNE ?= "cortexm0" + +require conf/machine/include/arm/arch-armv6.inc + +TUNEVALID[cortexm0] = "Enable Cortex-M0 specific processor optimizations" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexm0', ' -mcpu=cortex-m0', '', d)}" +AVAILTUNES += "cortexm0" + +TUNEVALID[no-thumb-interwork] = "Enable thumb mode" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'no-thumb-interwork', ' -mno-thumb-interwork', '', d)}" +AVAILTUNES += "no-thumb-interwork" + +TUNEVALID[no-ffast-math] = "Enable thumb mode" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'no-ffast-math', ' -fno-fast-math', '', d)}" +AVAILTUNES += "no-ffast-math" + +TUNEVALID[soft] = "Enable thumb mode" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'soft', ' -mfloat-abi=soft', '', d)}" +AVAILTUNES += "soft" + +TUNEVALID[armv6m] = "Enable Cortex-M0 specific processor optimizations" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'armv6m', ' -march=armv6-m', '', d)}" +MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'armv6m', 'armv6m:', '' ,d)}" + +ARMPKGARCH_tune-cortexm0 = "cortexm0" +TUNE_FEATURES_tune-cortexm0 = "${TUNE_FEATURES_tune-armv6} cortexm0" + +PACKAGE_EXTRA_ARCHS_tune-cortexm0 = "${PACKAGE_EXTRA_ARCHS_tune-armv6m} cortexm0-vfp" + +TUNE_FEATURES_tune-cortexm0 = "armv6m vfp cortexm0 thumb no-thumb-interwork soft" +