arm - mbed tls NET and TIMING modules not available -


i have compiled mbedtls k64f board arm mbed os. trying run examples come in dtls_client.c , dtls_server.c. initially, on compiling client got error:

"the net , timing modules not available mbed os - please use network , timing functions provided mbed os" 

i found related having 2 lines active in config.h file.

    #define mbedtls_net_c     #define mbedtls_timing_c  commented them , check requires values:  #if !defined(mbedtls_ssl_cli_c) || !defined(mbedtls_ssl_proto_dtls) ||    \     !defined(mbedtls_net_c)  || !defined(mbedtls_timing_c) ||             \     !defined(mbedtls_entropy_c) || !defined(mbedtls_ctr_drbg_c) ||        \     !defined(mbedtls_x509_crt_parse_c) || !defined(mbedtls_rsa_c) ||      \     !defined(mbedtls_certs_c) || !defined(mbedtls_pem_parse_c) int main( void ) {     mbedtls_printf( "mbedtls_ssl_cli_c and/or mbedtls_ssl_proto_dtls and/or "             "mbedtls_net_c and/or mbedtls_timing_c and/or "             "mbedtls_entropy_c and/or mbedtls_ctr_drbg_c and/or "             "mbedtls_x509_crt_parse_c and/or mbedtls_rsa_c and/or "             "mbedtls_certs_c and/or mbedtls_pem_parse_c not defined.\n" );     return( 0 ); } 

now see compilation error related redefinition of functions:

main.cpp:(.text.startup.main+0x18): undefined reference `mbedtls_net_init' main.cpp:(.text.startup.main+0xce): undefined reference `mbedtls_net_connect' main.cpp:(.text.startup.main+0x2fc): undefined reference `mbedtls_net_recv_timeout' main.cpp:(.text.startup.main+0x300): undefined reference `mbedtls_net_send' main.cpp:(.text.startup.main+0x304): undefined reference `mbedtls_net_recv' main.cpp:(.text.startup.main+0x308): undefined reference `mbedtls_timing_get_delay' main.cpp:(.text.startup.main+0x30c): undefined reference `mbedtls_timing_set_delay' main.cpp:(.text.startup.main+0x35c): undefined reference `mbedtls_net_free' 

how can define calls make work?

already answered here: https://tls.mbed.org/discussions/platform-specific/compiling-mbeddtls-on-k64f:

hi jordi,
dtls_client.c , dtls_server.c sample applications arrive part of mbed tls git repository.
note mbed-os arrives own mbed tls feature directory. test tls feature, can use tls client app , modify fit dtls protocol, , server. can @ example reference how configure dtls client , server.
hope helps
mbed tls team member
ron


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -