{{ message }}
Add proper Zephyr module support with updated HAL for v3/v4 compatibility#407
Open
tbitcs wants to merge 7 commits into
Open
Add proper Zephyr module support with updated HAL for v3/v4 compatibility#407tbitcs wants to merge 7 commits into
tbitcs wants to merge 7 commits into
Conversation
Introduce ATCA_ZEPHYR_SUPPORT CMake option to enable proper Zephyr module builds Map Kconfig CONFIG_ATCA_* symbols into ATCA_* CMake variables Refresh I2C and SPI HAL drivers to use Zephyr 3 include locations Build CryptoAuthLib as a Zephyr library when enabled Incompatible with Zephyr v2 due to changed include paths
Provides instructions on how to incorporate CryptoAuthLib as a Zephyr module, including out-of-tree and in-tree application setups. Explains how to configure available Kconfig options and how they are mapped into CMake options and the atca_config.h file for seamless Zephyr integration.
|
This PR has been marked as stale and will be automatically closed in 7 days. |
|
This PR has been marked as stale and will be automatically closed in 7 days. |
Author
|
Just checking in on the status of PR #407. I understand things can get busy, but I wanted to keep this from going stale. If there are any updates or concerns, please let me know how I can assist to help move this forward. Thank you! |
Collaborator
|
Hi @tbitcs , |
|
This PR has been marked as stale and will be automatically closed in 7 days. |
Author
|
Commenting to keep this PR from going stale. |
- hal_i2c_send: Use ATCA_IFACECFG_I2C_ADDRESS macro for ATCA_STRICT_C99 - hal_zephyr_spi: Fix spi_cs_control for Zephyr v3+ (gpio_dt_spec) - hal_zephyr_spi: Use hal_malloc/hal_free instead of stdlib malloc - hal_zephyr_spi: Fix sizeof(hal_data) bug (pointer vs struct) - hal_zephyr_spi: Fix memory leak in hal_spi_release - hal_zephyr_spi: Replace printf with printk - zephyr_options.cmake: Fix Kconfig-to-CMake variable name mapping - lib/CMakeLists.txt: Remove redundant project()/find_package(Zephyr) - lib/CMakeLists.txt: Normalize SET to set - Kconfig: Rewrite to Zephyr style (menuconfig, if guards, depends on) - Add ztest build-verification test suite Tested: Windows (HID HAL), Linux (I2C+SPI+UART+PKCS11+TNG), Zephyr 4.2 (module loads, Kconfig resolves) Co-Authored-By: Oz <oz-agent@warp.dev>
Author
baf1125 to
572487d
Compare
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.

Summary
This PR introduces first-class support for integrating CryptoAuthLib as a Zephyr module, compatible with Zephyr v3 and v4. It enables seamless integration into modern Zephyr-based applications using CMake and Kconfig, and updates the I2C and SPI HALs to align with Zephyr's evolving include path conventions.
Key Changes
module.ymlto enable Zephyr module recognition via west.ATCA_ZEPHYR_SUPPORTCMake option to toggle Zephyr build mode.zephyr_options.cmaketo mapCONFIG_ATCA_*Kconfig options to internal CMake flags.zephyr/drivers/...) required in Zephyr ≥ v3.zephyr_library()when enabledIntegration Instructions
To include CryptoAuthLib as a Zephyr module:
Option 1: In-tree
Place CryptoAuthLib under
modules/lib/cryptoauthliband it will be automatically detected.Option 2: Out-of-tree
If using a separate path:
Kconfig Support
Once integrated, you can configure CryptoAuthLib via
prj.confusing new symbols:These options automatically propagate to the CMake build system, enabling or disabling relevant sources and flags.
Compatibility Notes
Request
If possible, please test against MPLAB Harmony and existing Linux builds to ensure continued compatibility. Feedback and improvements welcome!
Feature branch: https://github.com/BitConcepts/cryptoauthlib/tree/feature/zephyr-module-support-v3-v4