-
Notifications
You must be signed in to change notification settings - Fork 7.4k
modules: chre #41735
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
modules: chre #41735
Conversation
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.
Thanks for this contribution.
A couple of blockers that must be addressed:
- In no places it is described what CHRE means.
- No description of what chre does, or how to use it with Zephyr.
- The sample here: https://github.com/zephyrproject-rtos/zephyr/blob/188a7d0f7d6af350db48ee7fe83d5da94b19515f/samples/application_development/chre/CMakeLists.txt lacks documentation, please add a
README.txt
- A Zephyr fork of chre must be created when rest of PR is ready for merge.
OK, I've update the example in this PR. I'm working with the CHRE team to see if they're OK owning the build files. I think that will be the best approach. The new sample actually runs the full CHRE, loads a nanoapp, sends an event, etc. The goal is to have everything under |
Marking as WIP as I'm moving the build files over to AOSP. When done this PR will only be the added module and the sample app. At that point I'll remove the WIP label. |
The following west manifest projects have been modified in this Pull Request:
Note: This message is automatically posted and updated by the Manifest GitHub Action. |
PR updated now that AOSP is willing to own all the build rules for Zephyr as well as adding this to their CI. To verify this PR please also cherry-pick the 2 changes at https://android-review.googlesource.com/c/platform/system/chre/+/1952616 (@MaureenHelm this is why this PR wasn't building for you, you needed the upstream change to fix the attribute order) |
I'd like to remind anyone interested in this PR to please review the change in https://android-review.googlesource.com/c/platform/system/chre/+/1952616/ |
7fe5fa4
to
f586cb7
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.
I got a new linker warning when building for frdm_k64f
:
$ west build -p auto -b frdm_k64f samples/modules/chre/ -- -DCONFIG_NEWLIB_LIBC=y
<snip>
[164/174] Linking CXX executable zephyr/zephyr_pre0.elf
/home/mhelm/.local/zephyr-sdk-0.13.1/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/10.3.0/../../../../arm-zephyr-eabi/bin/ld.bfd: warning: orphan section `.unstable_id' from `modules/chre/lib..__modules__lib__chre__platform__zephyr.a(version.cc.obj)' being placed in section `.unstable_id'
[168/174] Linking CXX executable zephyr/zephyr_pre1.elf
/home/mhelm/.local/zephyr-sdk-0.13.1/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/10.3.0/../../../../arm-zephyr-eabi/bin/ld.bfd: warning: orphan section `.unstable_id' from `modules/chre/lib..__modules__lib__chre__platform__zephyr.a(version.cc.obj)' being placed in section `.unstable_id'
[174/174] Linking CXX executable zephyr/zephyr.elf
/home/mhelm/.local/zephyr-sdk-0.13.1/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/10.3.0/../../../../arm-zephyr-eabi/bin/ld.bfd: warning: orphan section `.unstable_id' from `modules/chre/lib..__modules__lib__chre__platform__zephyr.a(version.cc.obj)' being placed in section `.unstable_id'
Memory region Used Size Region Size %age Used
FLASH: 33454 B 1 MB 3.19%
SRAM: 17088 B 192 KB 8.69%
SRAML: 0 GB 64 KB 0.00%
IDT_LIST: 0 GB 2 KB 0.00%
@MaureenHelm I uploaded https://android-review.googlesource.com/c/platform/system/chre/+/2055138 which seems to fix it. |
@MaureenHelm @nashif the upstream change landed in AOSP for supporting the linker section, but I seem to have lost permissions to https://github.com/zephyrproject-rtos/chre so I can't update the module. |
Need to use zephyrproject-rtos/chre#1 to get rid of the warnings |
Both the `_cpu_arch` and `k_thread_runtime_stats` structs can have a size of 0 in C, but will fail when building with C++. Add an extra byte in those cases. Signed-off-by: Yuval Peress <[email protected]>
Add initial build rules for CHRE. This change includes a Kconfig and CMakeLists.txt to begin compiling code from the CHRE module. Additional files are included to bridge the APIs from CHRE's to Zephyr's. These can be found in modules/chre/include and modules/chre/src. Additionally, add a sample to make sure that the module builds. It can be built via: ``` $ west build -b native_posix -p=always samples/application_development/chre ``` Signed-off-by: Yuval Peress <[email protected]>
@MaureenHelm I update the module commit hash from the |
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.
Nice! LGTM👍
Add initial build rules for CHRE. This change includes a Kconfig and
CMakeLists.txt to begin compiling code from the CHRE module.
Additional files are included to bridge the APIs from CHRE's to
Zephyr's. These can be found in modules/chre/include and
modules/chre/src.
Additionally, add a sample to make sure that the module builds. It can
be built via:
Issue #37223
Signed-off-by: Yuval Peress [email protected]