Topic: Build Problem on wolfSSL embedded SSL, lwip, SafeRTOS and LM3S9D96

Hi Everybody,

wolfSSL will be used for our project. The project includes below layer:

  Webserver
-----------------
    wolfSSL
-----------------
      LwIp
-----------------
  SafeRTOS
-----------------
LM3S9D96

As the wolfSSL uses some function of libc, the linker gives some error as below:

/crosscompiler/arm-2011.03/bin/../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/lib/libc.a(lib_a-fstatr.o): In function `_fstat_r':
fstatr.c:(.text+0x1c): undefined reference to `_fstat'
/crosscompiler/arm-2011.03/bin/../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/lib/libc.a(lib_a-openr.o): In function `_open_r':
openr.c:(.text+0x20): undefined reference to `_open'
/crosscompiler/arm-2011.03/bin/../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/lib/libc.a(lib_a-sbrkr.o): In function `_sbrk_r':
sbrkr.c:(.text+0x18): undefined reference to `_sbrk'
/crosscompiler/arm-2011.03/bin/../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/lib/libc.a(lib_a-writer.o): In function `_write_r':
writer.c:(.text+0x20): undefined reference to `_write'
/crosscompiler/arm-2011.03/bin/../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/lib/libc.a(lib_a-closer.o): In function `_close_r':
closer.c:(.text+0x18): undefined reference to `_close'
/crosscompiler/arm-2011.03/bin/../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/lib/libc.a(lib_a-gettimeofdayr.o): In function `_gettimeofday_r':
gettimeofdayr.c:(.text+0x1c): undefined reference to `_gettimeofday'
/crosscompiler/arm-2011.03/bin/../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/lib/libc.a(lib_a-isattyr.o): In function `_isatty_r':
isattyr.c:(.text+0x18): undefined reference to `_isatty'
/crosscompiler/arm-2011.03/bin/../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/lib/libc.a(lib_a-lseekr.o): In function `_lseek_r':
lseekr.c:(.text+0x20): undefined reference to `_lseek'
/crosscompiler/arm-2011.03/bin/../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/lib/libc.a(lib_a-readr.o): In function `_read_r':
readr.c:(.text+0x20): undefined reference to `_read'

We use CodeSourcery Lite and CodeSourcery includes newlib as libc.  These syscall functions are not defined for LM3S9D96.

Is there any way to build the wolfSSL Project without the libc syscall functions?

Sincerely,

Share

Re: Build Problem on wolfSSL embedded SSL, lwip, SafeRTOS and LM3S9D96

hai tiantik!
I am trying to port wolfSSL over lwip+SafeRTOS.....but there are problems when trying to integrate lwip and SafeRTOS.Can you please provide me guidelines regarding the same using code composer studio( I am using TMS 570 instead of LM3S9D96)

Share

Re: Build Problem on wolfSSL embedded SSL, lwip, SafeRTOS and LM3S9D96

Hi Alphonsa,

We have ported wolfSSL to both SafeRTOS and FreeRTOS as well as LwIP.  I believe you will need to follow the steps outlined in Section 2.4 of the wolfSSL Manual, then define WOLFSSL_SAFERTOS and WOLFSSL_LWIP in <wolfssl_root>/wolfssl/wolfcrypt/settings.h.  Have you already done this?

Thanks,
Chris

Re: Build Problem on wolfSSL embedded SSL, lwip, SafeRTOS and LM3S9D96

Alphonsa,

We have had users compile wolfSSL with a large variety of compilers.  Code Composer studio hasn't come up yet though.  Generally wolfSSL is pretty easy to compile with new compilers, but let us know if you run into any problems.

Best Regards,
Chris

Re: Build Problem on wolfSSL embedded SSL, lwip, SafeRTOS and LM3S9D96

Chris,
I have one more question, whether we need OS support ie we must use FreeRTOS+lwIP+wolfSSL
   or
wolfSSL can run on the top of lwip stack without any OS support.

Share

Re: Build Problem on wolfSSL embedded SSL, lwip, SafeRTOS and LM3S9D96

We have had many users run wolfSSL in a bare metal (no OS) environment.  Once your bare metal and LwIP environment was set up, wolfSSL should layer in on top of that, yes.

Best Regards,
Chris