-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
OpenThread HDLC RCP communication support #75986
OpenThread HDLC RCP communication support #75986
Conversation
Hello @xavraz, and thank you very much for your first pull request to the Zephyr project! |
@xavraz thanks for your contribution. Also, can you explain what is the purpose of this PR? The RCP architecture is supported in zephyr. |
@canisLupus1313, thank you for your comment. OT-RCP ArchitectureThis PR corresponds to an ot-rcp host support. The existing support in Zephyr is for an ot-rcp device, as follows : Zephyr codeConcerning your question "included some of the Openthread files in the Zephyr code."
C++ code in ZephyrThere are already few files in zephyr directory as follows for example
• zephyr\modules\thrift\src\thrift\server\TServerFramework.cpp |
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.
THe commit message titles need to follow https://docs.zephyrproject.org/latest/contribute/guidelines.html#commit-message-guidelines
drivers/hdlc_rcp_if/Kconfig.nxp
Outdated
# Openthead HDLC RCP communication Interface configuration options | ||
# Copyright 2024 NXP | ||
# All rights reserved. | ||
# SPDX-License-Identifier: BSD-3-Clause |
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.
BSD license should be changed to Apache-2.0
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 will change the licences following all your comments.
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.
Note that you can only change the license if you are the author. If you took the code from somewhere else, then you need to use the original license.
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.
canisLupus1313 commented 2 days ago
@xavraz thanks for your contribution.
It seems that You have included some of the Openthread files in the Zephyr code. I would say would be better to include form openthread module.
Concerning the OpenThread files included in the Zephyr code, this has been done to ensure the compatibility if the OpenThread library version is modified. This permits to go back to an older OpenThread version. Otherwise, if the source code is set in modules\lib\openthread\src\xxx, then, it is not possible to go back to an older OpenThread version.
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.
resolved
modules/openthread/CMakeLists.txt
Outdated
${ZEPHYR_BASE}/arch/arm/include | ||
${ZEPHYR_BASE}/../modules/lib/openthread/src | ||
${ZEPHYR_BASE}/../modules/lib/openthread/src/core | ||
${ZEPHYR_BASE}/../modules/lib/openthread/third_party/mbedtls/repo/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.
Zephyr is using it's own mbed TLS: https://github.com/zephyrproject-rtos/mbedtls not exactly same as the on in OT.
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.
resolved
#define OT_PLAT_DBG_LEVEL_NONE 0 | ||
#define OT_PLAT_DBG_LEVEL_ERR 1 | ||
#define OT_PLAT_DBG_LEVEL_WARNING 2 | ||
#define OT_PLAT_DBG_LEVEL_INFO 3 | ||
#define OT_PLAT_DBG_LEVEL_DEBUG 4 |
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.
Why are you defining those?
It should be possible to reuse logging from https://docs.zephyrproject.org/latest/services/logging/index.html
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.
resolved
@xavraz Thanks for clarification. |
@rlubos @JA-NXP @George-Stefan I've updated the west.yml to reflect the HAL update. Need to get +1 from you reapplied so we can get this merged. Will need an override from @nashif to merge. |
f3aee8d
to
79bbca9
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.
There's still some compliance report about trailing whitespaces though.
Update the licensing list to include the BSD-3-clause OpenThread files. Approved by TSC zephyrproject-rtos#79882 Signed-off-by: David Leach <[email protected]>
79bbca9
to
05aaaa5
Compare
Hi @xavraz! To celebrate this milestone and showcase your contribution, we'd love to award you the Zephyr Technical Contributor badge. If you're interested, please claim your badge by filling out this form: Claim Your Zephyr Badge. Thank you for your valuable input, and we look forward to seeing more of your contributions in the future! 🪁 |
|
This PR adds support to an RCP design, the core of OpenThread lives on the host processor connected to an RCP radio controller over a HDLC interface.
Tested on a board using NXP's RW612 component.