Add Zephyr 4.1+ build compatibility for wolfssl_tls_sock sample.#9765
Open
night1rider wants to merge 14 commits intowolfSSL:masterfrom
Open
Add Zephyr 4.1+ build compatibility for wolfssl_tls_sock sample.#9765night1rider wants to merge 14 commits intowolfSSL:masterfrom
night1rider wants to merge 14 commits intowolfSSL:masterfrom
Conversation
Contributor
Author
|
Jenkins retest this please |
b5f11c7 to
bd4a6a9
Compare
…ace removed Kconfig options (PTHREAD_IPC, POSIX_CLOCK, NET_SOCKETS_POSIX_NAMES) with version-conditional config fragments and fix min/max macro collision with Zephyr's sys/util.h.
…ther zephyr examples
c5d0add to
103d90b
Compare
…, reposition sys/types.h, and add missing macros to tracking list. Update benchmark app for native sim to use a sleep function for the timer, and remove timer for waiting on server and instead use a share variable both threads can access.
103d90b to
e47c696
Compare
Contributor
Author
|
Jenkins retest this please |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add Zephyr 4.1+ build compatibility for wolfssl_tls_sock sample
Problem
The
wolfssl_tls_socksample fails to build on Zephyr >= 4.1. Zephyr deprecatedCONFIG_PTHREAD_IPC,CONFIG_POSIX_CLOCK, andCONFIG_NET_SOCKETS_POSIX_NAMESin 3.7 (v3.7.0 release notes) and removed them by 4.1 (PR #82398), which the sample depended on. Additionally, Zephyr'smin()/max()macros insys/util.hcollide with wolfSSL'sstatic inlinedefinitions.Solution
CMakeLists.txtnow parses$ZEPHYR_BASE/VERSIONand selects eitherzephyr_legacy.conf(< 4.1) orzephyr_v4.1.conf(>= 4.1) viaEXTRA_CONF_FILE.zephyr_legacy.conf: Original options for Zephyr < 4.1. These were deprecated in 3.7 (v3.7.0 release notes - POSIX deprecations) and removed by 4.1 (PR #82398):CONFIG_PTHREAD_IPC=yCONFIG_POSIX_CLOCK=yCONFIG_NET_SOCKETS_POSIX_NAMES=yzephyr_v4.1.conf: Replacement options for Zephyr >= 4.1:CONFIG_POSIX_API=y- umbrella replacingPTHREAD_IPC,POSIX_CLOCK, andNET_SOCKETS_POSIX_NAMES. Selects the POSIX subsystems that replaced them (v3.7.0 migration guide - POSIX, POSIX overview docs).user_settings.h: AddedWOLFSSL_HAVE_MIN/WOLFSSL_HAVE_MAXto prevent macro collision with Zephyr'ssys/util.h(all versions).Testing
Successfully compiled
wolfssl_tls_sockon Zephyr 4.3 with zephyr-sdk-0.17.4 for bothnative_simandfrdm_rw612/rw612targets.Compatibility
zephyr_legacy.confzephyr_v4.1.confTODO
wolfssl_tls_sockagainst multiple Zephyr versions to catch compatibility regressions in future releases.