-
Notifications
You must be signed in to change notification settings - Fork 682
Update Zephyr RTOS port for Zephyr 1.10 release #2120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Note that this shouldn't be merged before the official 1.10 release (ETA is beginning of December). |
@SebastianBoe, @grgustaf, @jimmy-huang, @poussa : FYI. |
targets/zephyr/CMakeLists.txt
Outdated
COMMAND echo Z_CFLAGS=${system_includes}${includes}${definitions}${options} | ||
COMMAND echo NOSTDINC_FLAGS=${system_includes} | ||
COMMAND echo ZEPHYRINCLUDE=${includes} | ||
COMMAND echo KBUILD_CFLAGS=${definitions}${options} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Glad to see that this worked :)
f962b5b
to
ecd19dd
Compare
Update: Makefile.zephyr was updated, CI now passes. |
@akosthekiss : Can you please review Makefile.travis changes (as updating your #2102) ? |
4929b56
to
3b6a073
Compare
Updated for latest changes in Zephyr build system. |
410ff5e
to
5595101
Compare
Zephyr 1.10 has been released, so this is ready for merge now. @akosthekiss, @yichoi, @LaszloLango, @dbatyai : Can you please review? |
@@ -0,0 +1,31 @@ | |||
include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add the license header.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
targets/zephyr/CMakeLists.txt
Outdated
target_link_libraries(app jerry-core jerry-ext) | ||
|
||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Too many empty lines.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
targets/zephyr/CMakeLists.txt
Outdated
set_target_properties(jerry-core PROPERTIES IMPORTED_LOCATION ${CMAKE_CURRENT_BINARY_DIR}/../obj/lib/libjerry-core.a) | ||
set_target_properties(jerry-core PROPERTIES INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_CURRENT_SOURCE_DIR}/../../jerry-core/include) | ||
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These set_target_properties
lines are quite long. What about wrapping them?
For example:
set_target_properties(jerry-ext PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
${CMAKE_CURRENT_SOURCE_DIR}/../../jerry-ext/include)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
targets/zephyr/Makefile.travis
Outdated
|
||
# Fetch Zephyr Project repository and install python dependencies. | ||
install-zephyr: install-apt-get-deps | ||
git clone https://github.com/zephyrproject-rtos/zephyr.git ../zephyr -b zephyr-v1.9.1 | ||
git clone https://github.com/zephyrproject-rtos/zephyr.git ../zephyr -b v1.10-branch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this branch live forever? IMHO it will be better to use the release tag and not the branch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This branch would transition thru 1.10.x point releases, and the idea was to check that JrS remains buildable with them, but as you wish, switching to the tag.
Nice patch, I have just a few minor comments. |
In 1.10, Zephyr RTOS switched to CMake as means to generate application makefiles. Consequently, drop Makefile, and introduce CMakeLists.txt, and update master Makefile.zephyr accordingly. With these changes, take a chance to make following "cosmetic" changes: 1. Make "qemu_x86" board target the default instead of "arduino_101". Arduino 101 is just one of the boards of many supported by Zephyr (and thus JerryScript port), while qemu_x86 is something everyone has. 2. Zephyr make target to run QEMU switched from "qemu" to "run". 3. Don't rely that there's zephyr.strip, it's presence is now board-dependent. The most we can rely on is zephyr.elf. JerryScript-DCO-1.0-Signed-off-by: Paul Sokolovsky paul.sokolovsky@linaro.org
MDEF files have been deprecated and ignored for few Zephyr releases. JerryScript-DCO-1.0-Signed-off-by: Paul Sokolovsky paul.sokolovsky@linaro.org
qemu_x86 target now has stack guard enabled by default and it trips with the default stack size. Set it to 2K for now. JerryScript-DCO-1.0-Signed-off-by: Paul Sokolovsky paul.sokolovsky@linaro.org
Zephyr 1.10 requires SDK 0.9.2 and CMake 3.8.2. Also, don't hardcode CC path, it depends on a board and choosed automatically by Zephyr build system. JerryScript-DCO-1.0-Signed-off-by: Paul Sokolovsky paul.sokolovsky@linaro.org
5595101
to
1a85619
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but please squash the commits with an appropriate commit message.
Thanks! Originally, these commits were intended to be separate. If your request them to be squashed, let me do that in the separate PR: #2155 |
Zephyr 1.10 has switched to CMake-based build system (kind of like JerryScript, but the best way to think about it is of course as "different CMake-based build system").
Besides updating for new build system, the patch also removes some old stuff and updates for other changes in Zephyr.