mirror of
https://git.yoctoproject.org/meta-zephyr
synced 2026-05-04 16:39:48 +02:00
meta-zephyr: add support for cortexm3 toolchain
Cortex-M3 is not supported natively by oe-embedded, so we need to
do it here. With these changes it should be possible to run:
To build all Zephyr tests:
$ MACHINE=qemuarm bitbake zephyr-kernel-test-all
$ MACHINE=qemuarm bitbake zephyr-kernel-test-all -ctestimage
To build "philosophers" sample:
$ MACHINE=qemuarm bitbake zephyr-philosophers
Once built, you can run the created "philosophers" image in qemu
(at this point the various paths have to be entered manually):
$ ./tmp/sysroots/x86_64-linux/usr/bin/qemu-system-arm \
-kernel ./tmp/deploy/images/qemuarm/philosophers.elf \
-cpu cortex-m3 -machine lm3s6965evb -nographic -vga none
Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
This commit is contained in:
20
conf/distro/machine/include/tune-cortexm3.inc
Normal file
20
conf/distro/machine/include/tune-cortexm3.inc
Normal file
@@ -0,0 +1,20 @@
|
||||
DEFAULTTUNE ?= "cortexm3"
|
||||
|
||||
#require conf/machine/include/arm/arch-armv7a.inc
|
||||
|
||||
TUNEVALID[cortexm3] = "Enable Cortex-M3 specific processor optimizations"
|
||||
TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexm3', ' -mcpu=cortex-m3', '', d)}"
|
||||
AVAILTUNES += "cortexm3"
|
||||
|
||||
TUNEVALID[armv7m] = "Enable Cortex-M3 specific processor optimizations"
|
||||
TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'armv7m', ' -march=armv7-m', '', d)}"
|
||||
MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'armv7m', 'armv7m:', '' ,d)}"
|
||||
|
||||
TUNE_PKGARCH_tune-cortexm3 = "cortexm3"
|
||||
|
||||
ARMPKGARCH_tune-cortexm3 = "armv7m"
|
||||
PACKAGE_EXTRA_ARCHS_tune-cortexm3 ="cortexm3"
|
||||
|
||||
TUNE_FEATURES_tune-cortexm3 = "armv7m vfp cortexm3"
|
||||
PACKAGE_EXTRA_ARCHS_tune-cortexm3 = "${PACKAGE_EXTRA_ARCHS_tune-armv7at} armv7m-vfp"
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
require conf/distro/poky.conf
|
||||
require conf/distro/machine/include/tune-cortexm3.inc
|
||||
|
||||
DISTRO = "zephyr"
|
||||
DISTRO_NAME = "Zephyr"
|
||||
@@ -7,3 +8,4 @@ TCLIBC = "baremetal"
|
||||
|
||||
TEST_TARGET = "QemuTargetZephyr"
|
||||
TEST_SUITES = "zephyr"
|
||||
DEFAULTTUNE_arm ?= "cortexm3"
|
||||
|
||||
1
recipes-devtools/gcc/gcc-cross_6.%.bbappend
Normal file
1
recipes-devtools/gcc/gcc-cross_6.%.bbappend
Normal file
@@ -0,0 +1 @@
|
||||
EXTRA_OECONF_append_armv7m = " --with-arch=armv7-m --with-mode=thumb "
|
||||
Reference in New Issue
Block a user