Fix: Build calib component also for CA2 device configurations - #424
Open
fr89k wants to merge 1 commit into
Open
Conversation
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.
v3.8.0: CA2 device configurations do not compile calib at all (link failures, non-functional CA2 support)
Affected version
d49c7d5) — regression introduced with the new per-device CMake selection; v3.7.9 is not affectedConfiguration
Any configuration supporting only CA2-class devices (ECC204/ECC206, TA010, SHA104/SHA105).
Problem
The calib sources are only compiled when the CMake variable
ATCA_CA_SUPPORTis set:lib/CMakeLists.txt:270:if (ATCA_CA_SUPPORT)→add_subdirectory(calib)lib/calib/CMakeLists.txt:4:if(ATCA_CA_SUPPORT)→target_sources(cryptoauth PRIVATE ${CALIB_SRC})but the per-device checks set that variable only for classic cryptoauth parts (e.g.
ecc608_checks.cmake:set(ATCA_CA_SUPPORT ON)), while CA2 parts set a different one (ecc204_checks.cmake:set(ATCA_CA2_SUPPORT ON)).A CA2-only configuration therefore compiles none of the calib sources — including the CA2 devices' own command implementations (
calib_ca2_*).At the same time, the same-named preprocessor macro
ATCA_CA_SUPPORT(lib/atca_config_check.h) still evaluates to 1 in such builds, soatcacert_client.cand theatcab_*dispatch layer keep referencing those functions. Linking any consumer fails, e.g.:Even without atcacert, the resulting library cannot talk to the configured CA2 device, since its entire command layer is missing.
Expected behaviour
Selecting only a CA2 device produces a library containing the CA2 command implementations and dispatchers, and consumers link.
Suggested fix
Compile calib whenever classic or CA2 support is selected.