Skip to content
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

Warnings are treated as errors without MBEDTLS_FATAL_WARNINGS on cmake using IAR toolchain #5964

Closed
savent404 opened this issue Jun 21, 2022 · 0 comments · Fixed by #5950
Closed
Labels
bug priority-medium Medium priority - this can be reviewed as time permits size-s Estimated task size: small (~2d)

Comments

@savent404
Copy link
Contributor

savent404 commented Jun 21, 2022

Summary

mbedtls can't build on IAR toolchain

System information

Mbed TLS version (number or commit id): v3.1.0
Operating system and version: windows11
Configuration (if not default, please attach mbedtls_config.h): crypto_meteral
Compiler and options (if you used a pre-built binary, please indicate how you obtained it): iccarm.exe (8.4)
Additional environment information:

Expected behavior

cmake -Bbuild -G Ninja -DCMAKE_INSTALL_PREFIX=build/export \
    --toolchain cmake/cyt2b73cas_cm4_iar.toolchain \
    -DENABLE_PROGRAMS=OFF -DENABLE_TESTING=OFF \
    -DINSTALL_MBEDTLS_HEADERS=OFF  .
ninja -C build install

build pass

Actual behavior

[58/98] Building C object libs\mbedtls\library\CMakeFiles\mbedcrypto.dir\psa_crypto_driver_wrappers.c.o
FAILED: libs/mbedtls/library/CMakeFiles/mbedcrypto.dir/psa_crypto_driver_wrappers.c.o
C:\PROGRA~2\IARSYS~1\EMBEDD~1.4\arm\bin\iccarm.exe  --silent C:\Users\savent\Desktop\prj\shsm\libs\mbedtls\library\psa_crypto_driver_wrappers.c  -IC:\Users\savent\Desktop\prj\shsm\libs\mbedtls\include -IC:\Users\savent\Desktop\prj\shsm\libs\mbedtls\library --cpu=Cortex-M4 -Dtviibe1m -DCYT2B73CAS   -DCY_USE_PSVP=0 -DCPU_BOARD_REVC -DCY_MCU_rev_d -DSTARTER_KIT_REV3   -IC:\Users\savent\Desktop\sw\T2G_Sample_Driver_Library_7.3.0\common\hdr   -IC:\Users\savent\Desktop\sw\T2G_Sample_Driver_Library_7.3.0\common\hdr\cmsis\include   -IC:\Users\savent\Desktop\sw\T2G_Sample_Driver_Library_7.3.0\common\src\drivers   -IC:\Users\savent\Desktop\sw\T2G_Sample_Driver_Library_7.3.0\common\src\mw   -IC:\Users\savent\Desktop\sw\T2G_Sample_Driver_Library_7.3.0\tviibe1m\hdr\rev_d   -IC:\Users\savent\Desktop\sw\T2G_Sample_Driver_Library_7.3.0\tviibe1m\hdr\rev_d\ip   -IC:\Users\savent\Desktop\sw\T2G_Sample_Driver_Library_7.3.0\tviibe1m\hdr\rev_d\mcureg   -IC:\Users\savent\Desktop\sw\T2G_Sample_Driver_Library_7.3.0\tviibe1m\src   -IC:\Users\savent\Desktop\sw\T2G_Sample_Driver_Library_7.3.0\tviibe1m\src\interrupts\rev_d   -IC:\Users\savent\Desktop\sw\T2G_Sample_Driver_Library_7.3.0\tviibe1m\src\drivers   -IC:\Users\savent\Desktop\sw\T2G_Sample_Driver_Library_7.3.0\tviibe1m\src\system\rev_d --warn_about_c_style_casts --warnings_are_errors -Ohz -e --dependencies=ns libs\mbedtls\library\CMakeFiles\mbedcrypto.dir\psa_crypto_driver_wrappers.c.o.d -o libs\mbedtls\library\CMakeFiles\mbedcrypto.dir\psa_crypto_driver_wrappers.c.o

              return( PSA_ERROR_NOT_SUPPORTED );
              ^
"C:\Users\savent\Desktop\prj\shsm\libs\mbedtls\library\psa_crypto_driver_wrappers.c",1161  Error[Pe111]:
          statement is unreachable
[65/98] Building C object libs\mbedtls\library\CMakeFiles\mbedcrypto.dir\ripemd160.c.o
ninja: build stopped: subcommand failed.

Steps to reproduce

Additional information

I've solve this problem by this MR: #5950

@bensze01 bensze01 linked a pull request Jun 22, 2022 that will close this issue
4 tasks
@bensze01 bensze01 added bug size-s Estimated task size: small (~2d) labels Jun 22, 2022
@bensze01 bensze01 changed the title fix on IAR toolchain Warnings are treated as errors without MBEDTLS_FATAL_WARNINGS on cmake using IAR toolchain Jun 22, 2022
@bensze01 bensze01 added the priority-medium Medium priority - this can be reviewed as time permits label Jun 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug priority-medium Medium priority - this can be reviewed as time permits size-s Estimated task size: small (~2d)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants