-
Notifications
You must be signed in to change notification settings - Fork 18
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
Fix iar compilation issues #39
Fix iar compilation issues #39
Conversation
Update to a version of mbed-os-atecc608a that ignores cryptoauthlib's app/api_206a, as we don't need it and it currently doesn't build with IAR.
Test run with ARM and IAR compilers: https://jenkins-internal.mbed.com/job/mbed-crypto-release-ci-testing/664/ |
@@ -103,7 +103,7 @@ enum { | |||
key_bits = 256, | |||
hash_alg = PSA_ALG_SHA_256, | |||
alg = PSA_ALG_ECDSA(hash_alg), | |||
sig_size = PSA_ASYMMETRIC_SIGN_OUTPUT_SIZE(key_type, key_bits, alg), |
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.
In "Set signature size directly", could you copy and paste the error or warning message into the commit message? It'll help to make it more clear why this failed in IAR.
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.
Done
As we know this example is using ECC, set the signature size directly rather than using PSA_ASYMMETRIC_SIGN_OUTPUT_SIZE, as it gives the following error with IAR: Error[Pe184]: type of cast must be arithmetic or pointer
The atCRC function wants crc to be a uint8_t array of length 2, while atcab_lock_config_zone_crc wants crc to be a uint16_t. IAR treats this as an error rather than a warning like ARM and GCC, so handle it explicitly.
5b651cd
to
6083393
Compare
This PR updates the atecc608a driver to include a version of cryptoauthlib that supports IAR.
This uncovered a few issues with IAR that this PR also fixes.