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 <juro.bystricky@intel.com>
This commit is contained in:
Juro Bystricky
2017-03-06 14:14:36 -08:00
parent 6637130c74
commit b0a4c54057
2 changed files with 41 additions and 0 deletions

View File

@@ -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"

View File

@@ -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"