This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

There is a bug in sdk 1.3.0. When compile the "mbedtls" under the path of "modules\nrfxlib\nrf_security\src\mbedtls\" . I get the following error : mbedtls/library/chacha20.c:29:10: error: #include expects "FILENAME" or

I think there is a bug in the west tool.  If only one -Dxxxx=”xx.h"  parameter  in the command-line, the quotes will be filtered.  So update the  "nrfxlib\nrf_security\src\mbedtls\shared\CMakeLists.txt" , add a ‘NONE’ micro into the command-line:

-  target_compile_definitions(mbedcrypto_shared PRIVATE
-     MBEDTLS_CONFIG_FILE="nrf-config-noglue.h"
-  )

+  target_compile_definitions(mbedcrypto_shared PRIVATE
+   NONE PRIVATE MBEDTLS_CONFIG_FILE="nrf-config-noglue.h"
+  )

it looks work for me 

Parents Reply
  • Hi,

    This work around does not work for me, but I have another one

    I have analyzed in gcc command line which failed:

    IC:/Users/myname/ncs/v1.3.0/nrfxlib/crypto/nrf_cc310_platform/include

    -IC:/Users/myname/ncs/v1.3.0/mbedtls/include

    -IC:/Users/myname/ncs/v1.3.0/mbedtls/include/mbedtls

    -Imodules/nrfxlib/nrf_security/include

    ...

    One path one relative and not absolute

    To force absolute path, I update followinf file (line 33):

    in ncs\v1.3.0\nrfxlib\nrf_security\src\mbedtls\cc310\CMakeLists.txt

    target_include_directories(mbedcrypto_cc310_noglue PRIVATE

    ${NRF_CC310_MBEDCRYPTO_INCLUDE_PATH}
    ${common_includes}
    ${APPLICATION_BINARY_DIR}/${config_include}
    )

    I guess this fix shall be applied to several mbedtls\XXXX\CMakeLists.txt

    (shared/vanilla/and oberon)

    Hope it will help you

    JeanFi

Children
No Data
Related