Topic: Can't build wolfSSL with TI-RTOS support
Hi everyone,
I want to get wolfSSL working in combination with TI-RTOS on Ubuntu 15.10.
I downloaded TI-RTOS for TivaC from [1] and installed it to /opt/ti. Next, I cloned wolfSSL from Github [2], I uncommented
#define WOLFSSL_TIRTOS
and modified products.mak in {wolfssl_root}/tirtos to have the following content:
#
# ======== products.mak ========
#
#
# Read the http://processors.wiki.ti.com/index.php/Using_wolfSSL_with_TI-RTOS
# for instructions to download the software required.
# XDC_INSTALL_DIR is the path to XDCtools directory.
XDC_INSTALL_DIR = /opt/ti/xdctools_3_31_01_33_core
# BIOS_INSTALL_DIR is the path to TI-RTOS Kernel (SYS/BIOS) directory. If you
# have installed TI-RTOS, it is located in the products/bios_* path.
BIOS_INSTALL_DIR = /opt/ti/tirtos_tivac_2_14_04_31/products/bios_6_42_03_35
# NDK_INSTALL_DIR is the path to TI-RTOS NDK directory. If you have
# installed TI-RTOS, it is located in the products/ndk_* path.
NDK_INSTALL_DIR = /opt/ti/tirtos_tivac_2_14_04_31/products/ndk_2_24_03_35
# TIVAWARE_INSTALL_DIR is the path to Tivaware driverlib directory. If you have
# installed TI-RTOS, it is located in the products/TivaWare_* path.
TIVAWARE_INSTALL_DIR = /opt/ti/tirtos_tivac_2_14_04_31/products/TivaWare_C_Series-2.1.1.71b
# Define the code generation tools path for TI, IAR and GCC ARM compilers.
# If you have installed Code Composer Studio, the TI and GCC compiler are
# located in the ccsv*/tools/compiler/* path.
#
# Leave assignment empty to disable any toolchain.
ti.targets.arm.elf.M4F =
iar.targets.arm.M4F =
gnu.targets.arm.M4F =
Next, I issued the following commands in {wolfssl_root}:
$ ./configure --prefix=/opt/wolf/ --enable-aesgcm --enable-aesccm
$ make
I get the following errors:
make -j5 all-am
make[1]: Entering directory '/home/andre/tmp/wolfssl-git/wolfssl-master'
CC wolfcrypt/src/src_libwolfssl_la-hash.lo
CC wolfcrypt/src/src_libwolfssl_la-random.lo
CC wolfcrypt/src/src_libwolfssl_la-rsa.lo
CC wolfcrypt/src/src_libwolfssl_la-hmac.lo
CC wolfcrypt/src/src_libwolfssl_la-sha256.lo
In file included from wolfcrypt/src/hash.c:26:0:
./wolfssl/wolfcrypt/settings.h:470:0: warning: "USE_FAST_MATH" redefined
#define USE_FAST_MATH
^
In file included from wolfcrypt/src/random.c:26:0:
./wolfssl/wolfcrypt/settings.h:470:0: warning: "USE_FAST_MATH" redefined
#define USE_FAST_MATH
^
<command-line>:0:0: note: this is the location of the previous definition
In file included from wolfcrypt/src/random.c:26:0:
./wolfssl/wolfcrypt/settings.h:477:0: warning: "HAVE_ECC" redefined
#define HAVE_ECC
^
<command-line>:0:0: note: this is the location of the previous definition
<command-line>:0:0: note: this is the location of the previous definition
In file included from wolfcrypt/src/random.c:26:0:
./wolfssl/wolfcrypt/settings.h:486:40: fatal error: ti/sysbios/hal/Seconds.h: No such file or directory
compilation terminated.
In file included from wolfcrypt/src/hash.c:26:0:
./wolfssl/wolfcrypt/settings.h:477:0: warning: "HAVE_ECC" redefined
#define HAVE_ECC
^
<command-line>:0:0: note: this is the location of the previous definition
In file included from wolfcrypt/src/hash.c:26:0:
./wolfssl/wolfcrypt/settings.h:486:40: fatal error: ti/sysbios/hal/Seconds.h: No such file or directory
compilation terminated.
In file included from wolfcrypt/src/rsa.c:26:0:
./wolfssl/wolfcrypt/settings.h:470:0: warning: "USE_FAST_MATH" redefined
#define USE_FAST_MATH
^
<command-line>:0:0: note: this is the location of the previous definition
In file included from wolfcrypt/src/rsa.c:26:0:
./wolfssl/wolfcrypt/settings.h:477:0: warning: "HAVE_ECC" redefined
#define HAVE_ECC
^
<command-line>:0:0: note: this is the location of the previous definition
In file included from wolfcrypt/src/rsa.c:26:0:
./wolfssl/wolfcrypt/settings.h:486:40: fatal error: ti/sysbios/hal/Seconds.h: No such file or directory
compilation terminated.
Makefile:2449: recipe for target 'wolfcrypt/src/src_libwolfssl_la-rsa.lo' failed
make[1]: *** [wolfcrypt/src/src_libwolfssl_la-rsa.lo] Error 1
make[1]: *** Auf noch nicht beendete Prozesse wird gewartet …
Makefile:2435: recipe for target 'wolfcrypt/src/src_libwolfssl_la-hash.lo' failed
make[1]: *** [wolfcrypt/src/src_libwolfssl_la-hash.lo] Error 1
Makefile:2421: recipe for target 'wolfcrypt/src/src_libwolfssl_la-random.lo' failed
make[1]: *** [wolfcrypt/src/src_libwolfssl_la-random.lo] Error 1
In file included from wolfcrypt/src/hmac.c:26:0:
./wolfssl/wolfcrypt/settings.h:470:0: warning: "USE_FAST_MATH" redefined
#define USE_FAST_MATH
^
<command-line>:0:0: note: this is the location of the previous definition
In file included from wolfcrypt/src/hmac.c:26:0:
./wolfssl/wolfcrypt/settings.h:477:0: warning: "HAVE_ECC" redefined
#define HAVE_ECC
^
<command-line>:0:0: note: this is the location of the previous definition
In file included from wolfcrypt/src/hmac.c:26:0:
./wolfssl/wolfcrypt/settings.h:486:40: fatal error: ti/sysbios/hal/Seconds.h: No such file or directory
compilation terminated.
Makefile:2414: recipe for target 'wolfcrypt/src/src_libwolfssl_la-hmac.lo' failed
make[1]: *** [wolfcrypt/src/src_libwolfssl_la-hmac.lo] Error 1
In file included from wolfcrypt/src/sha256.c:28:0:
./wolfssl/wolfcrypt/settings.h:470:0: warning: "USE_FAST_MATH" redefined
#define USE_FAST_MATH
^
<command-line>:0:0: note: this is the location of the previous definition
In file included from wolfcrypt/src/sha256.c:28:0:
./wolfssl/wolfcrypt/settings.h:477:0: warning: "HAVE_ECC" redefined
#define HAVE_ECC
^
<command-line>:0:0: note: this is the location of the previous definition
In file included from wolfcrypt/src/sha256.c:28:0:
./wolfssl/wolfcrypt/settings.h:486:40: fatal error: ti/sysbios/hal/Seconds.h: No such file or directory
compilation terminated.
Makefile:2428: recipe for target 'wolfcrypt/src/src_libwolfssl_la-sha256.lo' failed
make[1]: *** [wolfcrypt/src/src_libwolfssl_la-sha256.lo] Error 1
make[1]: Leaving directory '/home/andre/tmp/wolfssl-git/wolfssl-master'
Makefile:1652: recipe for target 'all' failed
make: *** [all] Error 2
What is going wrong? bias, ndk, TIvaWare and UIA exist:
ls -l /opt/ti/tirtos_tivac_2_14_04_31/products/
insgesamt 16
drwxrwxr-x 5 root root 4096 Jan 27 15:35 bios_6_42_03_35
drwxrwxr-x 6 root root 4096 Jan 27 15:35 ndk_2_24_03_35
drwxrwxrwx 13 root root 4096 Jan 27 15:34 TivaWare_C_Series-2.1.1.71b
drwxrwxr-x 7 root root 4096 Jan 27 15:35 uia_2_00_02_39
Also, there seems to be Seconds.h:
find /opt/ti/ -iname 'seconds.h'
./tirtos_tivac_2_14_04_31/products/bios_6_42_03_35/packages/ti/sysbios/family/arm/cc26xx/Seconds.h
./tirtos_tivac_2_14_04_31/products/bios_6_42_03_35/packages/ti/sysbios/family/arm/cc32xx/Seconds.h
./tirtos_tivac_2_14_04_31/products/bios_6_42_03_35/packages/ti/sysbios/family/arm/lm4/Seconds.h
./tirtos_tivac_2_14_04_31/products/bios_6_42_03_35/packages/ti/sysbios/hal/Seconds.h
[1] - http://software-dl.ti.com/dsps/dsps_pub … _04_31.bin
[2] - https://github.com/wolfSSL