Hi Kaleb,

I tried with sudo sh ./configure --host=arm-none-eabi C_EXTRA_FLAGS="-O3 -mthumb -mcpu=cortex-m4" LDFLAGS="-lc -lrdimon -specs=rdimon.specs" CC=arm-none-eabi-gcc-4.9.3 ac_cv_func_malloc_0_nonnull=yes ac_cv_func_realloc_0_nonnull=yes

And than make src/libwolfssl.la. This is doing compilation. Only make is giving error for compilation for Test Suite files.

When I do make install or make install src/libwolfssl.la it is generating error as mentioned above.

Thanks,
Bhavesh

Hi Kaleb,

Making changes for some of pre-processor I am able to build libwolfssl.la file.
But when I run command make install libwolfssl.lib I am getting following error:

`pvPortMallocinternal.c:'
(.keys.c:text+(.0x1808)text+: 0x362)undefined : reference undefined to reference `vPortFreeto '
`pvPortMallocsrc/'
.libskeys.c:/libwolfssl.a(.(src_libwolfssl_latext+-internal.o0x378))::  Inundefined  functionreference  `to FreeX509Name'`pvPortMalloc:
'
internal.c:keys.c:(.(.text+text+0x18d8)0x38a): : undefined undefined reference reference to to `vPortFree`pvPortMalloc'
'
src/keys.c:.libs(./libwolfssl.atext+(src_libwolfssl_la0x39c)-internal.o: ):undefined  Inreference  functionto  ``pvPortMallocFreeX509''
:
src/internal.c:.libs(./libwolfssl.atext+(src_libwolfssl_la0x1966)-keys.o: ):undefined keys.c:reference (.to text+`vPortFree0x3ae)'
: src/more .libsundefined /libwolfssl.areferences (src_libwolfssl_lato -internal.o`pvPortMalloc):' internal.c:follow
(.text+0x1fbc): more undefined references to `vPortFree' follow
src/.libs/libwolfssl.a(src_libwolfssl_lacollect2: error: ld returned 1 exit status
-io.o): In function `EmbedReceive':
io.c:(.text+0xa): undefined reference to `lwip_recv'
src/.libs/libwolfssl.a(src_libwolfssl_la-io.o): In function `EmbedSend':
io.c:(.text+0x7a): undefined reference to `lwip_send'
src/.libs/libwolfssl.a(src_libwolfssl_la-keys.o): In function `SetKeysSide':
keys.c:(.text+0x34e): undefined reference to `pvPortMalloc'
keys.c:(.text+0x362): undefined reference to `pvPortMalloc'
keys.c:(.text+0x378): undefined reference to `pvPortMalloc'
keys.c:(.text+0x38a): undefined reference to `pvPortMalloc'
keys.c:(.text+0x39c): undefined reference to `pvPortMalloc'
src/.libs/libwolfssl.a(src_libwolfssl_la-keys.o):keys.c:(.text+0x3ae): more undefined references to `pvPortMalloc' follow
collect2: error: ld returned 1 exit status
make[1]: *** [wolfcrypt/test/testwolfcrypt] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [wolfcrypt/benchmark/benchmark] Error 1
make[1]: Leaving directory `/media/bhavesh/F4F24186F2414DD4/tiNew/wolfssl-3.6.6'
make: *** [install] Error 2

I am not able to link .la file directly into CCS. Due to following error:

<Linking>
"/media/bhavesh/F4F24186F2414DD4/tiNew/wolfssl-3.6.6/src/libwolfssl.la", line 1: error #19027-D: invalid directive libwolfssl - ignored
"/media/bhavesh/F4F24186F2414DD4/tiNew/wolfssl-3.6.6/src/libwolfssl.la", line 2: error #19027-D: invalid directive Generated - ignored
"/media/bhavesh/F4F24186F2414DD4/tiNew/wolfssl-3.6.6/src/libwolfssl.la", line 4: error #19027-D: invalid directive Please - ignored
"/media/bhavesh/F4F24186F2414DD4/tiNew/wolfssl-3.6.6/src/libwolfssl.la", line 5: error #19027-D: invalid directive It - ignored
"/media/bhavesh/F4F24186F2414DD4/tiNew/wolfssl-3.6.6/src/libwolfssl.la", line 7: error #19027-D: invalid directive The - ignored
"/media/bhavesh/F4F24186F2414DD4/tiNew/wolfssl-3.6.6/src/libwolfssl.la", line 8: error #10045-D: illegal input character:  "'"
"/media/bhavesh/F4F24186F2414DD4/tiNew/wolfssl-3.6.6/src/libwolfssl.la", line 10: error #19027-D: invalid directive Names - ignored
"/media/bhavesh/F4F24186F2414DD4/tiNew/wolfssl-3.6.6/src/libwolfssl.la", line 11: error #10045-D: illegal input character:  "'"
"/media/bhavesh/F4F24186F2414DD4/tiNew/wolfssl-3.6.6/src/libwolfssl.la", line 13: error #19027-D: invalid directive The - ignored
"/media/bhavesh/F4F24186F2414DD4/tiNew/wolfssl-3.6.6/src/libwolfssl.la", line 14: error #10045-D: illegal input character:  "'"
"/media/bhavesh/F4F24186F2414DD4/tiNew/wolfssl-3.6.6/src/libwolfssl.la", line 16: error #19027-D: invalid directive Linker - ignored
"/media/bhavesh/F4F24186F2414DD4/tiNew/wolfssl-3.6.6/src/libwolfssl.la", line 17: error #10045-D: illegal input character:  "'"
"/media/bhavesh/F4F24186F2414DD4/tiNew/wolfssl-3.6.6/src/libwolfssl.la", line 19: error #19027-D: invalid directive Libraries - ignored
"/media/bhavesh/F4F24186F2414DD4/tiNew/wolfssl-3.6.6/src/libwolfssl.la", line 20: error #10045-D: illegal input character:  "'"
error #10008-D: cannot find file "c"
error #10008-D: cannot find file "rdimon"
error #10008-D: cannot find file "m'"
"/media/bhavesh/F4F24186F2414DD4/tiNew/wolfssl-3.6.6/src/libwolfssl.la", line 22: error #19027-D: invalid directive Names - ignored
"/media/bhavesh/F4F24186F2414DD4/tiNew/wolfssl-3.6.6/src/libwolfssl.la", line 23: error #10045-D: illegal input character:  "'"
"/media/bhavesh/F4F24186F2414DD4/tiNew/wolfssl-3.6.6/src/libwolfssl.la", line 25: error #19027-D: invalid directive Version - ignored
"/media/bhavesh/F4F24186F2414DD4/tiNew/wolfssl-3.6.6/src/libwolfssl.la", line 27: error #10043-D: expecting "";"" instead of "age"
"/media/bhavesh/F4F24186F2414DD4/tiNew/wolfssl-3.6.6/src/libwolfssl.la", line 28: error #10043-D: expecting "";"" instead of "revision"
"/media/bhavesh/F4F24186F2414DD4/tiNew/wolfssl-3.6.6/src/libwolfssl.la", line 30: error #19027-D: invalid directive Is - ignored
"/media/bhavesh/F4F24186F2414DD4/tiNew/wolfssl-3.6.6/src/libwolfssl.la", line 33: error #19027-D: invalid directive Should - ignored
"/media/bhavesh/F4F24186F2414DD4/tiNew/wolfssl-3.6.6/src/libwolfssl.la", line 36: error #19027-D: invalid directive Files - ignored
"/media/bhavesh/F4F24186F2414DD4/tiNew/wolfssl-3.6.6/src/libwolfssl.la", line 37: error #10045-D: illegal input character:  "'"
"/media/bhavesh/F4F24186F2414DD4/tiNew/wolfssl-3.6.6/src/libwolfssl.la", line 38: error #10045-D: illegal input character:  "'"
"/media/bhavesh/F4F24186F2414DD4/tiNew/wolfssl-3.6.6/src/libwolfssl.la", line 40: error #19027-D: invalid directive Directory - ignored
"/media/bhavesh/F4F24186F2414DD4/tiNew/wolfssl-3.6.6/src/libwolfssl.la", line 41: error #10045-D: illegal input character:  "'"

undefined                 first referenced
  symbol                       in file     
---------                 ----------------
wolfSSL_CTX_new           ./eth_socket.obj
wolfSSL_Init              ./eth_socket.obj
wolfSSL_free              ./eth_socket.obj
wolfSSL_new               ./eth_socket.obj
wolfSSL_read              ./eth_socket.obj
wolfSSL_set_fd            ./eth_socket.obj
wolfTLSv1_2_client_method ./eth_socket.obj

error #10234-D: unresolved symbols remain
"/media/bhavesh/F4F24186F2414DD4/tiNew/wolfssl-3.6.6/src/libwolfssl.la", line 31: error #10104: undefined symbol "no" used in expression
"/media/bhavesh/F4F24186F2414DD4/tiNew/wolfssl-3.6.6/src/libwolfssl.la", line 34: error #10104: undefined symbol "no" used in expression
error #10010: errors encountered during linking; "Test_Project.out" not built

>> Compilation failure
gmake: *** [Test_Project.out] Error 1
gmake: Target `all' not remade because of errors.

So wolfssl.a file is required for linking.
Can you help me to sort out make install issue.
Attaching .la file if that can be helpful.

Thanks,
Bhavesh

I have changed src/ and wolfssl/ folders.
Attaching tar files for these two. Full library is excedding size of 10 MB so not able to updload it.
If possible how can full directory can be saved?

Changes made:

in settings.h:
- uncommented #define FREERTOS and #define WOLFSSL_LWIP. Without  WOLFSSL_LWIP it was giving sys/socket.h not found error at src/io.c:87:36.
- added LWIP folder from /lwip-1.4.1/src/include and changed path of include files.

Hi Kaleb,

Thanks for the recommendations. I am able to go forward with suggestions you have given,
I made Tiva and FreeRTOS specific changes and built the library again.
It is failing at one point.  Following is the error log.

In file included from ./wolfssl/internal.h:27:0,
                 from src/ssl.c:32:
src/ssl.c:3551:33: error: dereferencing pointer to incomplete type
             XSTRNCAT(name, entry->d_name, MAX_FILENAME_SZ/2);
                                 ^

Including log file as well as WolfSSL zip with the changes.
Can you please let me know reasonn for this error?

Thanks,
Bhavesh

Hi Kaleb,

I tried using sudo sh ./configure --host=arm-none-eabi but still it is giving below error.

checking build system type... i686-pc-linux-gnu
checking host system type... arm-none-eabi
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for arm-none-eabi-strip... arm-none-eabi-strip
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether UID '0' is supported by ustar format... yes
checking whether GID '0' is supported by ustar format... yes
checking how to create a ustar tar archive... gnutar
checking how to print strings... printf
checking for style of include used by make... GNU
checking for arm-none-eabi-gcc... arm-none-eabi-gcc
checking whether the C compiler works... no
configure: error: in `/media/bhavesh/F4F24186F2414DD4/tiNew/wolfssl-3.6.6':
configure: error: C compiler cannot create executables
See `config.log' for more details

Attaching config.log for more details.

I ran  sudo sh ./configure --host=arm-none-eabi CC=gcc It built for intel processor. With this when I include generated .a in CCS than at linking it is generating following error.
fatal error #10178: attempt to link an object file that is not built for Advanced RISC Machines ARM ("/usr/local/lib/libwolfssl.a<src_libwolfssl_la-ssl.o>" = Intel 80386)

Have anyone encounered this kind of issue on any other ARM processor?
I also tried WolfSSL 3.6.6 instead of CyaSSL 3.3.0. But still results are same. Log attached is for WolfSSL3.6.6

Thanks,
Bhavesh

Hi Kaleb,

Thanks for the reply. I tried but not able to resolve the issue.
I have included FreeRTOS with LWIP in to the project and that is working well. Now my requirement is REST APIs (GET,POST etc) which are called should be secured.
I tried with CyaSSL 3.3.0 and WolfSSL 3.4.6. I tried to build the code using Visual Studio and it is not allowing to build lib for ARM.
I also tried it with Ubuntu as mentioned in section 2.6 https://wolfssl.com/wolfSSL/Docs-wolfss … lfssl.html
But it is always generating .a file for Intel x86 not for ARM.

With TI-RTOS I am getting Stack Overflow errors after continuously sending GET, POST command even without using HTTPS so can not continue with it .
Can you help me to build library file which can be used with Tiva C Processor than I can start further coding?
My project is currently in Development stage and deadline is 20th Sep to complete Secure GET and POST command using HTTPS.

Thanks,
Bhavesh

Hi Kebal,

I am not using TI-RTOS due to some issues with it. I am using FreeRTOS with TI processor TivaC Series.
If not using TI-RTOS than wolfssl.ae4mf gives NDK and TI Kernel errors.
I tried to build library for WolfSSL as mentioned in section 2.6 https://wolfssl.com/wolfSSL/Docs-wolfss … lfssl.html
I am trying to build it for ARM using Ubuntu
Following line is giving error and it is not able to configure
sudo ./configure --host=arm-linux CC=arm-linux-gcc AR=arm-linux-ar RANLIB=arm-linux
Generated error is:
configure: error: in `/media/bhavesh/2C0A44700A4438DA/ti/wolfssl-3.4.6':
configure: error: C compiler cannot create executables

If I just give sudo ./configure --host=arm and followed the steps, it is generating libwolfssl.a file.
When I linked this in CCS and build it is giving me follwoing error:
fatal error #10178: attempt to link an object file that is not built for Advanced RISC Machines ARM ("/usr/local/lib/libwolfssl.a<src_libwolfssl_la-ssl.o>" = Intel 80386)

dpkg -l | grep gcc gives list of command and it is showing gcc-arm-none-eabi    4.9.3.2015q2-1trusty1 in the list.
Do you know how to generate library for TivaC Series Processor?

Thanks,
Bhavesh

Hi,

I am using Texas Instruments Tiva C Series processor with FreeRTOS. I want to implement CyaSSL3.3.0 into the code.
While Building the code I am getting linker errors for functions like CyaSSL_Init(),  CyaSSL_CTX_new() etc. are not defined.
To solve this issue, .lib file for CyaSSL has to be added in linker. Using TI-RTOS make file it is gegerating .aem4f file and that is not useful. Does anyone know how to build .lib file?

I am open with using WolfSSL also. Suggestions are welcome to solve this. Already asked in Texas Instrument Forum but no answer.
Following are console logs. Not using GCC compiler but using TI compiler.
-----------------------------------------------------------------------------------------------
'Building target: freertos_demo.out'
'Invoking: ARM Linker'
"D:/tiNew/ccsv6/tools/compiler/ti-cgt-arm_5.2.2/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 --abi=eabi -me -O2 -g --gcc --define=ccs="ccs" --define=SINGLE_THREADED --define=NO_WRITEV --define=PART_TM4C1294NCPDT --define=TARGET_IS_TM4C129_RA1 --define=SNOWFLAKE --diag_warning=225 --display_error_number --diag_wrap=off --gen_func_subsections=on --ual -z --stack_size=51200 -m"freertos_demo_ccs.map" --heap_size=10240 -i"D:/tiNew/ccsv6/tools/compiler/ti-cgt-arm_5.2.2/lib" -i"D:/tiNew/ccsv6/tools/compiler/ti-cgt-arm_5.2.2/include" --reread_libs --warn_sections --display_error_number --diag_wrap=off --xml_link_info="freertos_demo_linkInfo.xml" --rom_model -o "freertos_demo.out" "./cgifuncs.obj" "./freertos_demo.obj" "./fs.obj" "./idle_task.obj" "./images.obj" "./led_task.obj" "./lwip_task.obj" "./random.obj" "./startup_ccs.obj" "./utils/locator.obj" "./utils/lwiplib.obj" "./utils/uartstdio.obj" "./utils/ustdlib.obj" "./third_party/lwip-1.4.1/apps/httpserver_raw/httpd.obj" "./third_party/FreeRTOS/Source/croutine.obj" "./third_party/FreeRTOS/Source/list.obj" "./third_party/FreeRTOS/Source/queue.obj" "./third_party/FreeRTOS/Source/tasks.obj" "./third_party/FreeRTOS/Source/timers.obj" "./third_party/FreeRTOS/Source/portable/MemMang/heap_2.obj" "./third_party/FreeRTOS/Source/portable/CCS/ARM_CM4F/port.obj" "./third_party/FreeRTOS/Source/portable/CCS/ARM_CM4F/portasm.obj" "./drivers/pinout.obj" "../freertos_demo_ccs.cmd" -l"libc.a" -l"D:/tiNew/TivaWare_C_Series-2.1.1.71/examples/boards/dk-tm4c129x/freertos_demo/ccs/../../../../../driverlib/ccs/Debug/driverlib.lib" -l"D:/tiNew/TivaWare_C_Series-2.1.1.71/examples/boards/dk-tm4c129x/freertos_demo/ccs/../../../../../grlib/ccs/Debug/grlib.lib"
<Linking>

undefined first referenced
symbol in file
--------- ----------------
CyaSSL_CTX_load_verify_locations ./lwip_task.obj
CyaSSL_CTX_new ./lwip_task.obj
CyaSSL_CTX_use_PrivateKey_file ./lwip_task.obj
CyaSSL_CTX_use_certificate_file ./lwip_task.obj
CyaSSL_Init ./lwip_task.obj
CyaSSLv23_server_method ./lwip_task.obj

error #10234-D: unresolved symbols remain
error #10010: errors encountered during linking; "freertos_demo.out" not built

>> Compilation failure
gmake: *** [freertos_demo.out] Error 1

**** Build Finished ****
-------------------------------------------------------------------------------
Thanks,
Bhavesh