zephyr: Build MicroPython as a cmake target.

Refactors the zephyr build infrastructure to build MicroPython as a
cmake target, using the recently introduced core cmake rules.

This change makes it possible to build the zephyr port like most other
zephyr applications using west or cmake directly. It simplifies building
with extra cmake arguments, such as specifying an alternate conf file or
adding an Arduino shield. It also enables building the zephyr port
anywhere in the host file system, which will allow regressing across
multiple boards with the zephyr twister script.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
This commit is contained in:
Maureen Helm
2020-10-11 13:11:31 -05:00
committed by Damien George
parent 51fa1339f1
commit f573e73bae
8 changed files with 198 additions and 185 deletions
+7 -6
View File
@@ -460,6 +460,7 @@ function ci_zephyr_setup {
-v "$(pwd)":/micropython \
-e ZEPHYR_SDK_INSTALL_DIR=/opt/sdk/zephyr-sdk-0.11.3 \
-e ZEPHYR_TOOLCHAIN_VARIANT=zephyr \
-e ZEPHYR_BASE=/zephyrproject/zephyr \
-w /micropython/ports/zephyr \
zephyrprojectrtos/ci:v0.11.8
docker ps -a
@@ -472,10 +473,10 @@ function ci_zephyr_install {
}
function ci_zephyr_build {
docker exec zephyr-ci bash -c "make clean; ./make-minimal ${MAKEOPTS}"
docker exec zephyr-ci bash -c "make clean; ./make-minimal ${MAKEOPTS} BOARD=frdm_k64f"
docker exec zephyr-ci bash -c "make clean; make ${MAKEOPTS}"
docker exec zephyr-ci bash -c "make clean; make ${MAKEOPTS} BOARD=frdm_k64f"
docker exec zephyr-ci bash -c "make clean; make ${MAKEOPTS} BOARD=mimxrt1050_evk"
docker exec zephyr-ci bash -c "make clean; make ${MAKEOPTS} BOARD=reel_board"
docker exec zephyr-ci west build -p auto -b qemu_x86 -- -DCONF_FILE=prj_minimal.conf
docker exec zephyr-ci west build -p auto -b frdm_k64f -- -DCONF_FILE=prj_minimal.conf
docker exec zephyr-ci west build -p auto -b qemu_x86
docker exec zephyr-ci west build -p auto -b frdm_k64f
docker exec zephyr-ci west build -p auto -b mimxrt1050_evk
docker exec zephyr-ci west build -p auto -b reel_board
}