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

Share

Re: Can't build wolfSSL with TI-RTOS support

Hi an.schall,

I will be taking a look at this as soon as I have a chance. Been a little busy here this week, I just wanted to let you know I have seen/am aware of your question I am just trying to find time to give it the attention it deserves. Will get back to you ASAP.


Best Regards,

- Kaleb

Re: Can't build wolfSSL with TI-RTOS support

Hi an.scall,

Have you seen our README on github for building TIRTOS with wolfSSL? I noticed you edited the .mak in our directory. Rather you should be modifying the .mak in ti/ directory.

You can find the README here: https://github.com/wolfSSL/wolfssl-exam … /README.md

I just worked through those same steps but instead of using

C:\

file paths I used

/home/khimes/ti 

and

/home/khimes/wolfssl

.
Everything worked beautifully for setting up and building the tcpEchoTLS example provided by TI in their examples repo. There would be a lot of modifications required to get our examples off github working in Linux. That is something I plan to do in the future but have not had time to work on yet. However the readme will get you going on Linux.

Best Regards,

- Kaleb

Re: Can't build wolfSSL with TI-RTOS support

Hi an.schall,

We haven't heard back from you in awhile I just wanted to confirm that you were able to get your project working. If not let us know and we'll see if there is anything further we can do to assist you.


Regards,

- Kaleb

Re: Can't build wolfSSL with TI-RTOS support

Dear Kaleb,

thanks for the update. I will try to reproduce the steps. However, I should mention that I am working with TI Stellaris Launchpad (LM4F120H5QR), which is the predecessor of Tiva-C. TI doesn't support this platform anymore.

Also sorry for the late reply. I wasn't subscribed to this thread and thus didn't get any mail notification. I stalled working an this process due to other projects. I will let you know once I tried it.

Best,
André

Share

Re: Can't build wolfSSL with TI-RTOS support

Hi all,

is any progress about compile with support ti-rtos ?

Best Regards

Share

Re: Can't build wolfSSL with TI-RTOS support

Hi Everyone,

It has recently been realized that at some point the rules to make wolfssl went missing from the tirtos.mak distributed in tirtos_tivac_x_xx_xx_xx. We are not sure yet which versions specifically have been effected but I can confirm this in tirtos_tivac_2_16_00_08.

If you add the following rules back in to tirtos_tivac_x_xx_xx_xx/tirtos.mak you should be good to go with the guide found here: https://github.com/wolfSSL/wolfssl-exam … /README.md

wolfssl:
    @ echo building wolfssl ...
    @ $(XDCTOOLS_INSTALL_DIR)/gmake -f $(WOLFSSL_TIRTOS_DIR)/wolfssl.mak \
      XDC_INSTALL_DIR=$(XDCTOOLS_INSTALL_DIR) \
      SYSBIOS_INSTALL_DIR=$(BIOS_INSTALL_DIR) \
      NDK_INSTALL_DIR=$(NDK_INSTALL_DIR) \
      WOLFSSL_INSTALL_DIR=$(WOLFSSL_INSTALL_DIR) \
      TIRTOS_INSTALLATION_DIR=$(TIRTOS_INSTALL_DIR) \
      $(XDCARGS) -C $(WOLFSSL_TIRTOS_DIR)

clean-wolfssl:
    @ echo cleaning wolfssl ...
    @ $(XDCTOOLS_INSTALLATION_DIR)/gmake -f $(WOLFSSL_TIRTOS_DIR)/wolfssl.mak \
      XDC_INSTALL_DIR=$(XDCTOOLS_INSTALLATION_DIR) \
      SYSBIOS_INSTALL_DIR=$(BIOS_INSTALLATION_DIR) \
      NDK_INSTALL_DIR=$(NDK_INSTALLATION_DIR) \
      WOLFSSL_INSTALL_DIR=$(WOLFSSL_INSTALLATION_DIR) \
      TIRTOS_INSTALLATION_DIR=$(TIRTOS_INSTALLATION_DIR) \
      -C $(WOLFSSL_TIRTOS_DIR) clean

I also updated the example tirtos.mak here to reflect these new rules: https://github.com/wolfSSL/wolfssl-exam … tirtos.mak


Regards,

Kaleb