From 5472aff0dc478a1a54275cd75dbcd68058cae7fc Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Tue, 11 Sep 2018 16:13:07 +0300 Subject: [PATCH] targets: zephyr: Update for Zephyr 1.13 and SDK 0.9.3 (#2497) Zephyr 1.13 made some refactorings to its CMake infrastructure which must be propagated to applications. Also, some config options were removed/refactored, so cleanup prj.conf. JerryScript-DCO-1.0-Signed-off-by: Paul Sokolovsky paul.sokolovsky@linaro.org --- targets/zephyr/CMakeLists.txt | 3 ++- targets/zephyr/Makefile.travis | 9 +++++---- targets/zephyr/prj.conf | 2 -- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/targets/zephyr/CMakeLists.txt b/targets/zephyr/CMakeLists.txt index 815963914..30b7c7ba6 100644 --- a/targets/zephyr/CMakeLists.txt +++ b/targets/zephyr/CMakeLists.txt @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +cmake_minimum_required(VERSION 3.8) include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) project(NONE) @@ -27,7 +28,7 @@ set_target_properties(jerry-ext PROPERTIES IMPORTED_LOCATION ${CMAKE_CURRENT_BINARY_DIR}/../obj/lib/libjerry-ext.a) set_target_properties(jerry-ext PROPERTIES INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_CURRENT_SOURCE_DIR}/../../jerry-ext/include) -target_link_libraries(app jerry-core jerry-ext) +target_link_libraries(app PUBLIC jerry-core jerry-ext) zephyr_get_include_directories_for_lang_as_string(C includes) zephyr_get_system_include_directories_for_lang_as_string(C system_includes) diff --git a/targets/zephyr/Makefile.travis b/targets/zephyr/Makefile.travis index 54096c40b..308511d76 100644 --- a/targets/zephyr/Makefile.travis +++ b/targets/zephyr/Makefile.travis @@ -27,13 +27,14 @@ install-apt-get-deps: # Install Zephyr SDK. install-zephyr-sdk: - wget https://github.com/zephyrproject-rtos/meta-zephyr-sdk/releases/download/0.9.2/zephyr-sdk-0.9.2-setup.run -O ../zephyr-sdk-0.9.2-setup.run - sh ../zephyr-sdk-0.9.2-setup.run -- -y -d $(CURDIR)/../zephyr-sdk-0.9.2 + wget https://github.com/zephyrproject-rtos/meta-zephyr-sdk/releases/download/0.9.3/zephyr-sdk-0.9.3-setup.run -O ../zephyr-sdk-0.9.3-setup.run + sh ../zephyr-sdk-0.9.3-setup.run -- -y -d $(CURDIR)/../zephyr-sdk-0.9.3 cmake --version # Fetch Zephyr Project repository and install python dependencies. install-zephyr: - git clone https://github.com/zephyrproject-rtos/zephyr.git ../zephyr -b v1.10.0 + git clone https://github.com/zephyrproject-rtos/zephyr.git ../zephyr -b v1.13.0 + pip3 install --user -U pip pip3 install --user -U setuptools pip3 install --user -r ../zephyr/scripts/requirements.txt @@ -48,6 +49,6 @@ install: install-apt-get-deps install-noapt SHELL=bash script: export ZEPHYR_GCC_VARIANT=zephyr && \ - export ZEPHYR_SDK_INSTALL_DIR=$(CURDIR)/../zephyr-sdk-0.9.2 && \ + export ZEPHYR_SDK_INSTALL_DIR=$(CURDIR)/../zephyr-sdk-0.9.3 && \ source ../zephyr/zephyr-env.sh && \ $(MAKE) -f ./targets/zephyr/Makefile.zephyr BOARD=arduino_101 diff --git a/targets/zephyr/prj.conf b/targets/zephyr/prj.conf index a52380361..628689dd5 100644 --- a/targets/zephyr/prj.conf +++ b/targets/zephyr/prj.conf @@ -4,5 +4,3 @@ CONFIG_NEWLIB_LIBC=y CONFIG_FLOAT=y CONFIG_MAIN_STACK_SIZE=2048 CONFIG_CONSOLE_HANDLER=y -CONFIG_ARC_INIT=n -