Skip to content

Commit

Permalink
boot: zephyr: fix duplicate symbols with tinycrypt
Browse files Browse the repository at this point in the history
When building Zephyr with mcuboot, with tinycrypt instead of
mbedtls, there are duplicate symbols between the tinycrypt
module and the in-tree copy of tinycrypt that is included with
mcuboot.

The issues are only with symbols in the file

${TINYCRYPT_DIR}/source/utils.c

If Zephyr is being built with the tinycrypt module present,
prefer that over the in-tree copy.

Signed-off-by: Chris Friedt <[email protected]>
  • Loading branch information
Chris Friedt committed Jul 24, 2024
1 parent fb2cf0e commit 7f69d11
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion boot/zephyr/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,10 @@ if(CONFIG_BOOT_SIGNATURE_TYPE_ECDSA_P256 OR CONFIG_BOOT_ENCRYPT_EC256)
${TINYCRYPT_DIR}/source/ecc.c
${TINYCRYPT_DIR}/source/ecc_dsa.c
${TINYCRYPT_DIR}/source/sha256.c
${TINYCRYPT_DIR}/source/utils.c
)
if(NOT CONFIG_ZEPHYR_TINYCRYPT_MODULE)
zephyr_library_sources(${TINYCRYPT_DIR}/source/utils.c)
endif()
elseif(CONFIG_BOOT_USE_NRF_CC310_BL)
zephyr_library_sources(${NRF_DIR}/cc310_glue.c)
zephyr_library_include_directories(${NRF_DIR})
Expand Down

0 comments on commit 7f69d11

Please sign in to comment.