1 (edited by BKPatel 2015-09-03 02:47:08)

Topic: How to build .lib file for CyaSSL3.3.0

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

Share

Re: How to build .lib file for CyaSSL3.3.0

Hi BKPatel,

For our curiousity here at wolfSSL could you give us some details about your project. What are the end goals of your project, how will it be used etc. We are always excited to hear how consumers are using our product!



I have a few questions pertaining to your post:

1. Is there a reason it has to be CyaSSL 3.0.0 and you can not upgrade to wolfSSL 3.3.3 or later?
    (wolfSSL 3.6.6 would be the most recent)
    I ask because while we have support for both, TI has quickly adopted our library with the name-changed to wolfSSL
    as of release wolfSSL 3.3.3
    TI has shifted their development efforts from CyaSSL to wolfSSL.

2. Are you developing in Code Composer Studio or some other IDE/Environment?
    If in CCS see the end of this response for possible solution.

3. Have you seen our quick-start Readme for TivaC and wolfSSL here:
    https://github.com/wolfSSL/wolfssl-exam … /README.md

4. Is there a reason you are trying to build a .lib instead of using the TivaC .aem4f format?



Possible solution if using CCS:

You can follow these steps from the quick-start guide on linking to the .aem4f library. That is the format expected by TivaC.

Right click on your project and select Properties (usually near the bottom)
Under Build -> ARM Linker -> File Search Path

In the browser window on the right under "Include library file or command file as input"
Click the add button and add this line "C:\wolfssl\tirtos\packages\ti\net\wolfssl\lib\wolfssl.aem4f"

In the browser window on the right under "Add dir to library search path"
Click the add button and add this line "C:\wolfssl\tirtos\packages\ti\net\wolfssl\lib"

Kind Regards,

Kaleb

3 (edited by BKPatel 2015-09-04 05:23:12)

Re: How to build .lib file for CyaSSL3.3.0

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

Share

4 (edited by Kaleb J. Himes 2015-09-04 15:07:47)

Re: How to build .lib file for CyaSSL3.3.0

Hi BKPatel,

Your issue is clear to me now. What is the problem with TI-RTOS that makes you want to use FREE-RTOS. In researching your questions I have found many questions asked about building freeRTOS with TivaC, most of which have little or no response and all mention this is not a well-documented process. What are the end-goals for your project and are there any deadlines?

I ask because I am leaving for vacation tonight after work and will be out of the office until Sept. 14th. That is when I would begin tracking down a solution / building a toolchain to cross-compile. I know you had not gotten any response from the Texas Instruments support but I would have to point you back their way if you are pressed for time.

The best way to contact TI in this regards is to use http://e2e.ti.com/support/development_tools/ and search for old cases or ask about tool chains for compiling an external c library on linux for use in CCS.

In the recent past we did a build of our libraries with freeRTOS using the Rowley Crossworks compiler. Without looking into it much further my best guess is that it will require something along those lines, but it may be too early to say for sure.

I am aware that the TivaC is typically flashed with a .aem4f formatted library which is abstracted above binary so I'm not sure the current approach of attempting to output a binary library will work on the TivaC processor. I am not 100% on that however. I would need to contact TI and see what they have to say on the matter.
See: http://www.ti.com/lit/ug/spru523i/spru523i.pdf

The file extensions for pre-built libraries provided with the NDK include the following:

.aem4 For Cortex-M4 targets (ELF format, little endian, TI compiler)
.am4g For Cortex-M4 targets (ELF format, little endian, GNU compiler)
.arm4 For Cortex-M4 targets (ELF format, little endian, IAR compiler)
.aem4f For Cortex-M4F floating point targets (ELF format, little endian, TI compiler)
.am4fg For Cortex-M4F floating point targets (ELF format, little endian, GNU compiler)
.arm4f For Cortex-M4F floating point targets (ELF format, little endian, IAR compiler)

Thank You for contacting us. I hope you can resolve this quickly. Otherwise I look forward to supporting you upon my return.

Kind Regards,

Kaleb

5 (edited by Kaleb J. Himes 2015-09-04 15:18:38)

Re: How to build .lib file for CyaSSL3.3.0

Hi BKPatel,

While searching the TI forums for a toolchain to work with I found mention of this repository. I won't have time to test it before the 14th but may be helpful to you in the mean-time.

https://github.com/yuvadm/tiva-c

You'll notice he has tiva-c/third_party/FreeRTOS/

Regards,

Kaleb

6 (edited by BKPatel 2015-09-10 00:16:27)

Re: How to build .lib file for CyaSSL3.3.0

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

Share

Re: How to build .lib file for CyaSSL3.3.0

Hi BKPatel,

I am back in the office now. While I can not recommend you use the toolchain I sent previously as it is on github and I'm not sure what the licensing issues may be with that, I can suggest that cross compilation will need to be something along these lines:

./configure --host=arm-none-eabi

I don't believe arm-linux is the correct host to specify from compilation with Tiva C. I will look into this a little more today and see if I can't come up with a compile host platform that is fully supported on linux and/or Unix.

Regards,

Kaleb

8 (edited by BKPatel 2015-09-15 01:10:36)

Re: How to build .lib file for CyaSSL3.3.0

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

Post's attachments

config.log 13.19 kb, 1 downloads since 2015-09-15 

You don't have the permssions to download the attachments of this post.

Share

Re: How to build .lib file for CyaSSL3.3.0

Hi BKPatel,

I am getting close. I have the library compiling now but the make step is failing. As soon as I get this working I will send you a step-by-step on how I did it. Some of the steps may need to be modified for your particular board but should not be hard for you.

Expect an update soon.


Regards,

Kaleb

10 (edited by Kaleb J. Himes 2015-09-15 10:31:09)

Re: How to build .lib file for CyaSSL3.3.0

Hi BKPatel,

Here is what I have done so far:

Try:

arm-none-eabi-gcc --version

If it is not found do the following:

sudo apt-get install gcc-arm-none-eabi
sudo apt-get install libnewlib-arm-none-eabi

cd into wolfssl directory.
Edit

wolfssl/wolfcrypt/settings.h

by uncommenting

#define FREERTOS

and run the following:

./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.8.2 

(This assumes you are using cortex-m4, if the mcpu needs to be changed update it to your mcpu)

At this point you will need the project specific header files all in the relevant places. Which unfortunately I can not test as I don't have access to your project etc.

It is my hope that you can get it working from there. If you have any further questions please let us know.


Kind Regards,

Kaleb

Re: How to build .lib file for CyaSSL3.3.0

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

Post's attachments

build_logs.txt 21.2 kb, 1 downloads since 2015-09-16 

You don't have the permssions to download the attachments of this post.

Share

12 (edited by BKPatel 2015-09-16 02:56:10)

Re: How to build .lib file for CyaSSL3.3.0

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.

Post's attachments

WolfSSL.tar 416.6 kb, 3 downloads since 2015-09-16 

You don't have the permssions to download the attachments of this post.

Share

Re: How to build .lib file for CyaSSL3.3.0

Hi BKPatel,

Often times embedded platforms do not support directory structures. Or do not have dirent structure type available. To fix this we have included a pre-processor define NO_WOLFSSL_DIR. Could you try adding that to the pre-processor defines for your project to eliminate this error and let me know your results.

Kind Regards,

Kaleb

14 (edited by BKPatel 2015-09-17 23:52:16)

Re: How to build .lib file for CyaSSL3.3.0

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

Post's attachments

libwolfssl.la 890 b, 1 downloads since 2015-09-18 

You don't have the permssions to download the attachments of this post.

Share

Re: How to build .lib file for CyaSSL3.3.0

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

Share

16 (edited by Kaleb J. Himes 2015-09-21 08:47:11)

Re: How to build .lib file for CyaSSL3.3.0

Hi BKPatel,

Could you double check and ensure that by using "sudo ./configure" it is not restricting access to the resulting library IE making it sudo only?

If your autoconf and autoreconf are up to day there should be no need to tell it to read the configure script in shell (sudo sh). The only necessary commands should be as follows.

./autogen.sh
./configure <options here>
make
sudo make install

(We only have sudo here because default it targets /usr/local/lib which is restricted to sudo)
You can opt to do the following instead:

./configure <other options> --prefix=/home/user/my/custom/install/directory
make
make install

You can install the library where ever you want it so that it resides in a user accessible directory.
All of these options and more can be seen with

./configure --help

Kind Regards,

Kaleb

17 (edited by Kaleb J. Himes 2015-09-21 10:58:07)

Re: How to build .lib file for CyaSSL3.3.0

Hi BKPatel,

Link time solution:
It appears if the errors do not occur at build time but rather at link time then perhaps the errors dealing with pvPortMalloc and vPortFree may be because the freeRTOS implementation is unknown to the linker. Where is the freeRTOS library installed and is it in the LD_LIBRARY_PATH? For example:

export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/local/lib/freeRTOS"

Kind Regards,

Kaleb