1 (edited by andersanxiley 2015-11-10 05:51:21)

Topic: How to build on KDS (FreeRTOS)

Hi,

I have the Kinetis Design Studio with FreeRTOS compiling successfully for the FRDM-K64F. I wanna add the wolfSSL library but i'm a kind of lost on how to select the correct files to drag to the environment.

In the folder wolfssl-3.7.0 there are sources and includes files in many folders, like src, wolfssl, cyassl and so on...

I also haven't found in the manual which files are necessary. I am only aware that I must change the settings.h file to select the FreeRTOS.

Best regards,

Share

Re: How to build on KDS (FreeRTOS)

Hi,

In general, you should be able to follow the steps listed in Section 2.4 of the wolfSSL Manual:

https://wolfssl.com/wolfSSL/Docs-wolfss … lfssl.html

This will walk you through adding the source files and header files to your project.  We recently added a define to ./wolfssl/wolfcrypt/settings.h for KSDK + FreeRTOS, FREESCALE_FREE_RTOS.

With the most current KSDK release, you are also able to download wolfSSL from the Freescale website, as a add-on for the KSDK.  This comes with a few example KDS and IAR project files.

Best Regards,
Chris

Re: How to build on KDS (FreeRTOS)

I have a very similar situation. My target MCU is STM32F207/217 or STM32F407/417, the STMCube will automatic generate LwIP for the project, where to insert the wolfSSL is a question.

Is there any example for STM32F2/4 MCU?

Regards
Sam

Share

Re: How to build on KDS (FreeRTOS)

Hi Sam,

We don't have an example of using wolfSSL with the STMCube, but in general the link to Section 2.4 of the wolfSSL Manual above explains what files you need to compile/include from the wolfSSL package.  You can either compile the wolfSSL files together with your application code, or compile wolfSSL as a separate library project then link against. it.

Are you running into any errors at this point?

Best Regards,
Chris

Re: How to build on KDS (FreeRTOS)

Hi Chrisc
I am interested in the second option you said (compile wolfSSL as a separate library project then link against. it). I have a Maxim 32550 with freeRtos (arm /cortex m3). i use codesourcery toolchain. I use ubuntu 14.04 64 bits
So i did this :

./configure LIBS="-lc -lm -lgcc -lrdimon"  CPPFLAGS="-I/usr/include/"  --disable-examples --enable-aesgcm --enable-camellia --enable-sha512 --enable-keygen --enable-certgen --enable-dsa --enable-ecc --host=arm-none-eabi CC= arm-none-eabi-gcc  AR=arm-none-eabi-ar RANLIB=arm-none-eabi-ranlib  --build= x86-linux-64 march=armv7 mcpu=cortex-m3

- i added CPPFLAGS because i had got these kinds of mistakes about headers like sys/socket.h , arpa/inet.h,..... missing (it seems that i got a warning : /usr/include not suitable for cross compilation)
- i added libs because i had got these errors: undefined reference to `_lseek', undefined reference to `_isatty' (i   think because of standard C library)
- i uncommented #define FreeRtos in the file configuration settings.h
At this point, when i launch make, i get these errors below who belong to freertos but when i comment it in settings.h, i get another mistakes.

#elif defined FREERTOS

    double current_time(int reset)
    {
        portTickType tickCount;

        (void) reset;

        /* tick count == ms, if configTICK_RATE_HZ is set to 1000 */
        tickCount = xTaskGetTickCount();
        return (double)tickCount / 1000;
    }
wolfcrypt/benchmark/benchmark.c: In function 'current_time':
wolfcrypt/benchmark/benchmark.c:1935: error: 'portTickType' undeclared (first use in this function)
wolfcrypt/benchmark/benchmark.c:1935: error: (Each undeclared identifier is reported only once
wolfcrypt/benchmark/benchmark.c:1935: error: for each function it appears in.)
wolfcrypt/benchmark/benchmark.c:1935: error: expected ';' before 'tickCount'
wolfcrypt/benchmark/benchmark.c:1940: error: 'tickCount' undeclared (first use in this function)
wolfcrypt/benchmark/benchmark.c:1940: warning: implicit declaration of function 'xTaskGetTickCount'
wolfcrypt/benchmark/benchmark.c:1940: warning: nested extern declaration of 'xTaskGetTickCount'
make[1]: *** [wolfcrypt/benchmark/benchmark.o] Erreur 1

What did i do wrong? if you could help me...
Thank you!

Share

Re: How to build on KDS (FreeRTOS)

Hi rskkya,

You have:

./configure LIBS="-lc -lm -lgcc -lrdimon"  CPPFLAGS="-I/usr/include/"  --disable-examples --enable-aesgcm --enable-camellia --enable-sha512 --enable-keygen --enable-certgen --enable-dsa --enable-ecc --host=arm-none-eabi CC= arm-none-eabi-gcc  AR=arm-none-eabi-ar RANLIB=arm-none-eabi-ranlib  --build= x86-linux-64 march=armv7 mcpu=cortex-m3

could you try also setting the assembly language compiler:
AS=arm-none-eabi-gcc

could you try also setting the Linker/loader:
LD=arm-none-eabi-ld

could you try adding the following to CFLAGS:
-specs=rdimon.specs
-O0 (that is a capital "OH" and a zero for optimization level 0)
-DFREERTOS

If you intend to do any debugging you can add the "-g" flag for debug symbols to CFLAGS as well.

so you should end up with something like this:

./configure LIBS="-lc -lm -lgcc -lrdimon"  CPPFLAGS="-I/usr/include/"  --disable-examples --enable-aesgcm --enable-camellia --enable-sha512 --enable-keygen --enable-certgen --enable-dsa --enable-ecc --host=arm-none-eabi CC= arm-none-eabi-gcc  AR=arm-none-eabi-ar RANLIB=arm-none-eabi-ranlib AS=arm-none-eabi-gcc LD=arm-none-eabi-ld --build= x86-linux-64 march=armv7 mcpu=cortex-m3 CFLAGS="${CFLAGS} -DFREERTOS -O0 -specs=rdimon.specs"

If you still have issues after trying these changes let us know.

NOTE: If you define FREERTOS wolfSSL will look for various header files including FreeRTOS.h FreeRTOSConfig.h etc. You can add multiple include paths to get these headers for example above you had:

CPPFLAGS="-I/usr/include/"

Just extend that to be:

CPPFLAGS="-I/usr/include/ -I/path/to/FreeRTOS.h -I/path/to/FreeRTOSConfig.h -I/any/other/header/paths/etc"

Regards,

- Kaleb

Re: How to build on KDS (FreeRTOS)

Hi rskkya,

Other CFLAGS you may want to play with include:
-mthumb
-ffunction-sections
-fdata-sections
-MD
-std=c99
-Wall

Alternate library in place of lrdimon:
-lnosys
(and add -specs=nosys.specs to CFLAGS and remove -specs=rdimon.specs)


Regards,

- Kaleb

8 (edited by rskkya 2016-02-25 06:17:29)

Re: How to build on KDS (FreeRTOS)

Thank you for your detailed answer Kaleb,
So i followed what you advised me, i did this:



./configure LIBS="-lc -lm -lgcc -lnosys"  CPPFLAGS="-I/usr/include/ -I/home/kune/Bureau/FreeRTOS/Source/include/ -I/home/kune/Bureau/FreeRTOS/Demo/CORTEX_LM3Sxxxx_Eclipse/RTOSDemo/ -I/home/kune/Bureau/FreeRTOS/Source/portable/GCC/ARM_CM3/"  --disable-examples --enable-aesgcm --enable-camellia --enable-sha512 --enable-keygen --enable-certgen --enable-ecc --host=arm-none-eabi CC= arm-none-eabi-gcc  AR=arm-none-eabi-ar RANLIB=arm-none-eabi-ranlib AS=arm-none-eabi-gcc LD=arm-none-eabi-ld --build= x86-linux-64 march=armv7 mcpu=cortex-m3 CFLAGS="${CFLAGS} -DFREERTOS -g -O0 -specs=nosys.specs"

- I had to find a path for the header file: portmacro.h too
After "make" i get these mistakes :

src/.libs/libwolfssl.a(src_libwolfssl_la-internal.o): In function `DoServerKeyExchange':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/internal.c:10496: undefined reference to `pvPortMalloc'
src/.libs/libwolfssl.a(src_libwolfssl_la-internal.o): In function `SendClientKeyExchange':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/internal.c:11945: undefined reference to `pvPortMalloc'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/internal.c:11957: undefined reference to `vPortFree'
src/.libs/libwolfssl.a(src_libwolfssl_la-internal.o): In function `SendCertificateVerify':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/internal.c:12321: undefined reference to `pvPortMalloc'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/internal.c:12330: undefined reference to `vPortFree'
src/.libs/libwolfssl.a(src_libwolfssl_la-internal.o): In function `SendServerKeyExchange':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/internal.c:12909: undefined reference to `pvPortMalloc'
src/.libs/libwolfssl.a(src_libwolfssl_la-internal.o): In function `DoClientKeyExchange':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/internal.c:15558: undefined reference to `pvPortMalloc'
src/.libs/libwolfssl.a(src_libwolfssl_la-io.o): In function `LastError':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/io.c:255: undefined reference to `__errno_location'
src/.libs/libwolfssl.a(src_libwolfssl_la-io.o): In function `EmbedReceive':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/io.c:289: undefined reference to `recv'
src/.libs/libwolfssl.a(src_libwolfssl_la-io.o): In function `EmbedSend':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/io.c:346: undefined reference to `send'
src/.libs/libwolfssl.a(src_libwolfssl_la-keys.o): In function `SetKeys':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/keys.c:1900: undefined reference to `pvPortMalloc'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/keys.c:1905: undefined reference to `pvPortMalloc'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/keys.c:2041: undefined reference to `pvPortMalloc'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/keys.c:2045: undefined reference to `pvPortMalloc'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/keys.c:2100: undefined reference to `pvPortMalloc'
src/.libs/libwolfssl.a(src_libwolfssl_la-keys.o):/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/keys.c:2104: more undefined references to `pvPortMalloc' follow
collect2: error: ld returned 1 exit status
make[1]: *** [wolfcrypt/benchmark/benchmark] Erreur 1
make[1]: *** Attente des tâches non terminées....
src/.libs/libwolfssl.a(src_libwolfssl_la-random.o): In function `wc_InitRng':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/wolfcrypt/src/random.c:451: undefined reference to `pvPortMalloc'
src/.libs/libwolfssl.a(src_libwolfssl_la-random.o): In function `wc_FreeRng':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/wolfcrypt/src/random.c:561: undefined reference to `vPortFree'
src/.libs/libwolfssl.a(src_libwolfssl_la-rsa.o): In function `wc_RsaPrivateDecrypt':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/wolfcrypt/src/rsa.c:456: undefined reference to `pvPortMalloc'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/wolfcrypt/src/rsa.c:464: undefined reference to `vPortFree'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/wolfcrypt/src/rsa.c:473: undefined reference to `vPortFree'
src/.libs/libwolfssl.a(src_libwolfssl_la-rsa.o): In function `wc_RsaSSL_Verify':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/wolfcrypt/src/rsa.c:514: undefined reference to `pvPortMalloc'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/wolfcrypt/src/rsa.c:522: undefined reference to `vPortFree'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/wolfcrypt/src/rsa.c:532: undefined reference to `vPortFree'
src/.libs/libwolfssl.a(src_libwolfssl_la-asn.o): In function `FreeAltNames':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/wolfcrypt/src/asn.c:1714: undefined reference to `vPortFree'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/wolfcrypt/src/asn.c:1715: undefined reference to `vPortFree'
src/.libs/libwolfssl.a(src_libwolfssl_la-asn.o): In function `FreeNameSubtrees':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/wolfcrypt/src/asn.c:1729: undefined reference to `vPortFree'
src/.libs/libwolfssl.a(src_libwolfssl_la-asn.o):/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/wolfcrypt/src/asn.c:1730: more undefined references to `vPortFree' follow
src/.libs/libwolfssl.a(src_libwolfssl_la-asn.o): In function `GetKey':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/wolfcrypt/src/asn.c:2009: undefined reference to `pvPortMalloc'
src/.libs/libwolfssl.a(src_libwolfssl_la-asn.o): In function `GetName':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/wolfcrypt/src/asn.c:2327: undefined reference to `pvPortMalloc'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/wolfcrypt/src/asn.c:2333: undefined reference to `pvPortMalloc'
src/.libs/libwolfssl.a(src_libwolfssl_la-asn.o): In function `DecodeAltNames':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/wolfcrypt/src/asn.c:3630: undefined reference to `pvPortMalloc'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/wolfcrypt/src/asn.c:3637: undefined reference to `pvPortMalloc'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/wolfcrypt/src/asn.c:3641: undefined reference to `vPortFree'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/wolfcrypt/src/asn.c:3666: undefined reference to `pvPortMalloc'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/wolfcrypt/src/asn.c:3673: undefined reference to `pvPortMalloc'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/wolfcrypt/src/asn.c:3677: undefined reference to `vPortFree'
src/.libs/libwolfssl.a(src_libwolfssl_la-asn.o): In function `DecodeSubtree':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/wolfcrypt/src/asn.c:4155: undefined reference to `pvPortMalloc'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/wolfcrypt/src/asn.c:4163: undefined reference to `pvPortMalloc'
src/.libs/libwolfssl.a(src_libwolfssl_la-asn.o): In function `ParseCert':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/wolfcrypt/src/asn.c:4588: undefined reference to `pvPortMalloc'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/wolfcrypt/src/asn.c:4600: undefined reference to `pvPortMalloc'
src/.libs/libwolfssl.a(src_libwolfssl_la-asn.o): In function `MakeSigner':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/wolfcrypt/src/asn.c:4775: undefined reference to `pvPortMalloc'
src/.libs/libwolfssl.a(src_libwolfssl_la-asn.o): In function `FreeSigner':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/wolfcrypt/src/asn.c:4798: undefined reference to `vPortFree'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/wolfcrypt/src/asn.c:4799: undefined reference to `vPortFree'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/wolfcrypt/src/asn.c:4806: undefined reference to `vPortFree'
src/.libs/libwolfssl.a(src_libwolfssl_la-asn.o): In function `FreeTmpRsas':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/wolfcrypt/src/asn.c:5286: undefined reference to `vPortFree'
src/.libs/libwolfssl.a(src_libwolfssl_la-asn.o): In function `wc_RsaKeyToDer':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/wolfcrypt/src/asn.c:5323: undefined reference to `pvPortMalloc'
src/.libs/libwolfssl.a(src_libwolfssl_la-asn.o): In function `wc_SetIssuer':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/wolfcrypt/src/asn.c:7856: undefined reference to `pvPortMalloc'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/wolfcrypt/src/asn.c:7865: undefined reference to `vPortFree'
src/.libs/libwolfssl.a(src_libwolfssl_la-asn.o): In function `wc_SetSubject':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/wolfcrypt/src/asn.c:7876: undefined reference to `pvPortMalloc'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/wolfcrypt/src/asn.c:7884: undefined reference to `vPortFree'
src/.libs/libwolfssl.a(src_libwolfssl_la-asn.o): In function `wc_EccKeyToDer':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/wolfcrypt/src/asn.c:8255: undefined reference to `pvPortMalloc'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/wolfcrypt/src/asn.c:8264: undefined reference to `vPortFree'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/wolfcrypt/src/asn.c:8272: undefined reference to `vPortFree'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/wolfcrypt/src/asn.c:8276: undefined reference to `pvPortMalloc'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/wolfcrypt/src/asn.c:8279: undefined reference to `vPortFree'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/wolfcrypt/src/asn.c:8293: undefined reference to `vPortFree'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/wolfcrypt/src/asn.c:8294: undefined reference to `vPortFree'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/wolfcrypt/src/asn.c:8305: undefined reference to `vPortFree'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/wolfcrypt/src/asn.c:8306: undefined reference to `vPortFree'
src/.libs/libwolfssl.a(src_libwolfssl_la-asn.o):/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/wolfcrypt/src/asn.c:8322: more undefined references to `vPortFree' follow
src/.libs/libwolfssl.a(src_libwolfssl_la-integer.o): In function `mp_init':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/wolfcrypt/src/integer.c:129: undefined reference to `pvPortMalloc'
src/.libs/libwolfssl.a(src_libwolfssl_la-integer.o): In function `mp_clear':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/wolfcrypt/src/integer.c:167: undefined reference to `vPortFree'
src/.libs/libwolfssl.a(src_libwolfssl_la-integer.o): In function `mp_grow':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/wolfcrypt/src/integer.c:337: undefined reference to `XREALLOC'
src/.libs/libwolfssl.a(src_libwolfssl_la-integer.o): In function `mp_exptmod_fast':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/wolfcrypt/src/integer.c:1762: undefined reference to `pvPortMalloc'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/wolfcrypt/src/integer.c:1796: undefined reference to `vPortFree'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/wolfcrypt/src/integer.c:1811: undefined reference to `vPortFree'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/wolfcrypt/src/integer.c:2051: undefined reference to `vPortFree'
src/.libs/libwolfssl.a(src_libwolfssl_la-integer.o): In function `fast_mp_montgomery_reduce':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/wolfcrypt/src/integer.c:2126: undefined reference to `pvPortMalloc'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/wolfcrypt/src/integer.c:2253: undefined reference to `vPortFree'
src/.libs/libwolfssl.a(src_libwolfssl_la-integer.o): In function `mp_init_size':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/wolfcrypt/src/integer.c:2817: undefined reference to `pvPortMalloc'
src/.libs/libwolfssl.a(src_libwolfssl_la-integer.o): In function `fast_s_mp_sqr':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/wolfcrypt/src/integer.c:2870: undefined reference to `pvPortMalloc'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/wolfcrypt/src/integer.c:2943: undefined reference to `vPortFree'
src/.libs/libwolfssl.a(src_libwolfssl_la-integer.o): In function `fast_s_mp_mul_digs':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/wolfcrypt/src/integer.c:2989: undefined reference to `pvPortMalloc'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/wolfcrypt/src/integer.c:3047: undefined reference to `vPortFree'
src/.libs/libwolfssl.a(src_libwolfssl_la-integer.o): In function `fast_s_mp_mul_high_digs':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/wolfcrypt/src/integer.c:3713: undefined reference to `pvPortMalloc'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/wolfcrypt/src/integer.c:3771: undefined reference to `vPortFree'
src/.libs/libwolfssl.a(src_libwolfssl_la-integer.o): In function `mp_rand_prime':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/wolfcrypt/src/integer.c:4319: undefined reference to `pvPortMalloc'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/wolfcrypt/src/integer.c:4333: undefined reference to `vPortFree'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/wolfcrypt/src/integer.c:4343: undefined reference to `vPortFree'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/wolfcrypt/src/integer.c:4349: undefined reference to `vPortFree'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/wolfcrypt/src/integer.c:4355: undefined reference to `vPortFree'
src/.libs/libwolfssl.a(src_libwolfssl_la-ecc.o): In function `wc_ecc_new_point':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/wolfcrypt/src/ecc.c:1396: undefined reference to `pvPortMalloc'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/wolfcrypt/src/ecc.c:1410: undefined reference to `vPortFree'
src/.libs/libwolfssl.a(src_libwolfssl_la-ecc.o): In function `wc_ecc_del_point':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/wolfcrypt/src/ecc.c:1435: undefined reference to `vPortFree'
src/.libs/libwolfssl.a(src_libwolfssl_la-ecc.o): In function `ecc_mul2add':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/wolfcrypt/src/ecc.c:2036: undefined reference to `pvPortMalloc'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/wolfcrypt/src/ecc.c:2040: undefined reference to `pvPortMalloc'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/wolfcrypt/src/ecc.c:2042: undefined reference to `vPortFree'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/wolfcrypt/src/ecc.c:2218: undefined reference to `vPortFree'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/wolfcrypt/src/ecc.c:2219: undefined reference to `vPortFree'
src/.libs/libwolfssl.a(src_libwolfssl_la-ssl.o): In function `wolfSSL_CTX_new':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/ssl.c:168: undefined reference to `pvPortMalloc'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/ssl.c:178: undefined reference to `vPortFree'
src/.libs/libwolfssl.a(src_libwolfssl_la-ssl.o): In function `wolfSSL_new':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/ssl.c:206: undefined reference to `pvPortMalloc'
src/.libs/libwolfssl.a(src_libwolfssl_la-ssl.o): In function `wolfSSL_write':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/ssl.c:592: undefined reference to `__errno_location'
src/.libs/libwolfssl.a(src_libwolfssl_la-ssl.o): In function `wolfSSL_read_internal':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/ssl.c:616: undefined reference to `__errno_location'
src/.libs/libwolfssl.a(src_libwolfssl_la-ssl.o): In function `wolfSSL_CertManagerNew':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/ssl.c:1574: undefined reference to `pvPortMalloc'
src/.libs/libwolfssl.a(src_libwolfssl_la-ssl.o): In function `wolfSSL_CertManagerFree':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/ssl.c:1605: undefined reference to `vPortFree'
src/.libs/libwolfssl.a(src_libwolfssl_la-ssl.o): In function `wolfSSL_CertPemToDer':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/ssl.c:1688: undefined reference to `vPortFree'
src/.libs/libwolfssl.a(src_libwolfssl_la-ssl.o): In function `wolfSSL_KeyPemToDer':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/ssl.c:1804: undefined reference to `vPortFree'
src/.libs/libwolfssl.a(src_libwolfssl_la-ssl.o): In function `AddCA':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/ssl.c:2220: undefined reference to `vPortFree'
src/.libs/libwolfssl.a(src_libwolfssl_la-ssl.o): In function `PemToDer':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/ssl.c:2657: undefined reference to `pvPortMalloc'
src/.libs/libwolfssl.a(src_libwolfssl_la-ssl.o): In function `ProcessBuffer':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/ssl.c:2789: undefined reference to `vPortFree'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/ssl.c:2813: undefined reference to `pvPortMalloc'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/ssl.c:2818: undefined reference to `vPortFree'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/ssl.c:2849: undefined reference to `vPortFree'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/ssl.c:2859: undefined reference to `vPortFree'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/ssl.c:2863: undefined reference to `vPortFree'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/ssl.c:2871: undefined reference to `pvPortMalloc'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/ssl.c:2876: undefined reference to `vPortFree'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/ssl.c:2884: undefined reference to `vPortFree'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/ssl.c:2892: undefined reference to `vPortFree'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/ssl.c:2898: undefined reference to `vPortFree'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/ssl.c:2904: undefined reference to `pvPortMalloc'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/ssl.c:2966: undefined reference to `vPortFree'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/ssl.c:2976: undefined reference to `vPortFree'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/ssl.c:2982: undefined reference to `vPortFree'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/ssl.c:2989: undefined reference to `vPortFree'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/ssl.c:2995: undefined reference to `vPortFree'
src/.libs/libwolfssl.a(src_libwolfssl_la-ssl.o):/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/ssl.c:3000: more undefined references to `vPortFree' follow
src/.libs/libwolfssl.a(src_libwolfssl_la-ssl.o): In function `ProcessFile':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/ssl.c:3623: undefined reference to `pvPortMalloc'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/ssl.c:3651: undefined reference to `vPortFree'
src/.libs/libwolfssl.a(src_libwolfssl_la-ssl.o): In function `wolfSSL_CTX_load_verify_locations':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/ssl.c:3720: undefined reference to `opendir'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/ssl.c:3740: undefined reference to `readdir'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/ssl.c:3760: undefined reference to `closedir'
src/.libs/libwolfssl.a(src_libwolfssl_la-ssl.o): In function `wolfSSL_CertManagerVerify':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/ssl.c:3798: undefined reference to `pvPortMalloc'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/ssl.c:3813: undefined reference to `vPortFree'
src/.libs/libwolfssl.a(src_libwolfssl_la-ssl.o): In function `wolfSSL_PemCertToDer':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/ssl.c:4076: undefined reference to `pvPortMalloc'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/ssl.c:4114: undefined reference to `vPortFree'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/ssl.c:4119: undefined reference to `vPortFree'
src/.libs/libwolfssl.a(src_libwolfssl_la-ssl.o): In function `wolfSSL_CTX_set_cipher_list':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/ssl.c:5509: undefined reference to `pvPortMalloc'
src/.libs/libwolfssl.a(src_libwolfssl_la-ssl.o): In function `wolfSSL_connect':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/ssl.c:5701: undefined reference to `__errno_location'
src/.libs/libwolfssl.a(src_libwolfssl_la-ssl.o): In function `wolfSSL_accept':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/ssl.c:5997: undefined reference to `__errno_location'
src/.libs/libwolfssl.a(src_libwolfssl_la-ssl.o): In function `wolfSSL_check_domain_name':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/ssl.c:6805: undefined reference to `vPortFree'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/ssl.c:6808: undefined reference to `pvPortMalloc'
src/.libs/libwolfssl.a(src_libwolfssl_la-ssl.o): In function `wolfSSL_UnloadCertsKeys':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/ssl.c:7272: undefined reference to `vPortFree'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/ssl.c:7280: undefined reference to `vPortFree'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/ssl.c:7288: undefined reference to `vPortFree'
src/.libs/libwolfssl.a(src_libwolfssl_la-tls.o): In function `wolfTLSv1_client_method':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/tls.c:3756: undefined reference to `pvPortMalloc'
src/.libs/libwolfssl.a(src_libwolfssl_la-tls.o): In function `wolfTLSv1_1_client_method':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/tls.c:3767: undefined reference to `pvPortMalloc'
src/.libs/libwolfssl.a(src_libwolfssl_la-tls.o): In function `wolfTLSv1_2_client_method':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/tls.c:3781: undefined reference to `pvPortMalloc'
src/.libs/libwolfssl.a(src_libwolfssl_la-tls.o): In function `wolfSSLv23_client_method':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/tls.c:3794: undefined reference to `pvPortMalloc'
src/.libs/libwolfssl.a(src_libwolfssl_la-tls.o): In function `wolfTLSv1_server_method':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/tls.c:3821: undefined reference to `pvPortMalloc'
src/.libs/libwolfssl.a(src_libwolfssl_la-tls.o):/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/tls.c:3834: more undefined references to `pvPortMalloc' follow
src/.libs/libwolfssl.a(src_libwolfssl_la-internal.o): In function `SSL_CtxResourceFree':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/internal.c:529: undefined reference to `vPortFree'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/internal.c:531: undefined reference to `vPortFree'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/internal.c:538: undefined reference to `vPortFree'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/internal.c:539: undefined reference to `vPortFree'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/internal.c:540: undefined reference to `vPortFree'
src/.libs/libwolfssl.a(src_libwolfssl_la-internal.o):/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/internal.c:566: more undefined references to `vPortFree' follow
src/.libs/libwolfssl.a(src_libwolfssl_la-internal.o): In function `InitSSL':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/internal.c:1863: undefined reference to `pvPortMalloc'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/internal.c:1872: undefined reference to `pvPortMalloc'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/internal.c:1887: undefined reference to `pvPortMalloc'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/internal.c:1925: undefined reference to `pvPortMalloc'
src/.libs/libwolfssl.a(src_libwolfssl_la-internal.o): In function `FreeArrays':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/internal.c:1963: undefined reference to `vPortFree'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/internal.c:1966: undefined reference to `vPortFree'
src/.libs/libwolfssl.a(src_libwolfssl_la-internal.o): In function `SSL_ResourceFree':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/internal.c:1983: undefined reference to `vPortFree'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/internal.c:1984: undefined reference to `vPortFree'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/internal.c:1985: undefined reference to `vPortFree'
src/.libs/libwolfssl.a(src_libwolfssl_la-internal.o):/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/internal.c:1986: more undefined references to `vPortFree' follow
src/.libs/libwolfssl.a(src_libwolfssl_la-internal.o): In function `GrowOutputBuffer':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/internal.c:3127: undefined reference to `pvPortMalloc'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/internal.c:3140: undefined reference to `vPortFree'
src/.libs/libwolfssl.a(src_libwolfssl_la-internal.o): In function `GrowInputBuffer':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/internal.c:3170: undefined reference to `pvPortMalloc'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/internal.c:3183: undefined reference to `vPortFree'
src/.libs/libwolfssl.a(src_libwolfssl_la-internal.o): In function `DoCertificate':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/internal.c:4346: undefined reference to `pvPortMalloc'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/internal.c:4572: undefined reference to `pvPortMalloc'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/internal.c:4633: undefined reference to `pvPortMalloc'
src/.libs/libwolfssl.a(src_libwolfssl_la-internal.o): In function `DoHandShakeMsg':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/internal.c:5333: undefined reference to `pvPortMalloc'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/internal.c:5371: undefined reference to `vPortFree'
src/.libs/libwolfssl.a(src_libwolfssl_la-internal.o): In function `SendCertificate':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/internal.c:7876: undefined reference to `pvPortMalloc'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/internal.c:7882: undefined reference to `vPortFree'
src/.libs/libwolfssl.a(src_libwolfssl_la-internal.o): In function `SendClientHello':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/internal.c:9865: undefined reference to `pvPortMalloc'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/internal.c:9871: undefined reference to `vPortFree'
src/.libs/libwolfssl.a(src_libwolfssl_la-internal.o): In function `DoServerKeyExchange':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/internal.c:10496: undefined reference to `pvPortMalloc'
src/.libs/libwolfssl.a(src_libwolfssl_la-internal.o): In function `SendClientKeyExchange':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/internal.c:11945: undefined reference to `pvPortMalloc'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/internal.c:11957: undefined reference to `vPortFree'
src/.libs/libwolfssl.a(src_libwolfssl_la-internal.o): In function `SendCertificateVerify':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/internal.c:12321: undefined reference to `pvPortMalloc'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/internal.c:12330: undefined reference to `vPortFree'
src/.libs/libwolfssl.a(src_libwolfssl_la-internal.o): In function `SendServerKeyExchange':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/internal.c:12909: undefined reference to `pvPortMalloc'
src/.libs/libwolfssl.a(src_libwolfssl_la-internal.o): In function `DoClientKeyExchange':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/internal.c:15558: undefined reference to `pvPortMalloc'
src/.libs/libwolfssl.a(src_libwolfssl_la-io.o): In function `LastError':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/io.c:255: undefined reference to `__errno_location'
src/.libs/libwolfssl.a(src_libwolfssl_la-io.o): In function `EmbedReceive':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/io.c:289: undefined reference to `recv'
src/.libs/libwolfssl.a(src_libwolfssl_la-io.o): In function `EmbedSend':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/io.c:346: undefined reference to `send'
src/.libs/libwolfssl.a(src_libwolfssl_la-keys.o): In function `SetKeys':
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/keys.c:1900: undefined reference to `pvPortMalloc'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/keys.c:1905: undefined reference to `pvPortMalloc'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/keys.c:2041: undefined reference to `pvPortMalloc'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/keys.c:2045: undefined reference to `pvPortMalloc'
/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/keys.c:2100: undefined reference to `pvPortMalloc'
src/.libs/libwolfssl.a(src_libwolfssl_la-keys.o):/home/kune/Bureau/WOLFSSL/wolfssl-3.7.0/src/keys.c:2104: more undefined references to `pvPortMalloc' follow
collect2: error: ld returned 1 exit status

I tried with libnosys and librdimon, i get the same result.
I think, i got the same mistake when i tried to compile the wolfSSL files together with my application code......
Best regards,
Thank you

Share

Re: How to build on KDS (FreeRTOS)

Hi rskkya,

It just sounds like there is a disagreement between the wolfssl libraries and your project. You have defined FREERTOS in the configuration of the wolfssl libraries so all the relevant portions of code were added to the libraries that you are now linking against however it sounds like your project does not have FREERTOS defined.

In your project could you try including <wolfssl/wolfcrypt/settings.h> and then your project will get the define for FREERTOS as well (since as you stated previously you had uncommented that define).

Regards,

-Kaleb

Re: How to build on KDS (FreeRTOS)

Hi rskkya,

Depending on how you did the make and make install steps if you are able to include <wolfssl/options.h> that is guaranteed to give you the exact same settings as wolfssl was configured with. My apologies I should have suggested this first.

If however wolfssl/options.h is unavailable then you should incude wolfssl/wolfcrypt/settings.h as an alternate.


Regards,

- Kaleb

Re: How to build on KDS (FreeRTOS)

Hello,

I have a similar question to what has been asked earlier in this thread. I am working with a STM32F405. FreeRTOS is only used as a scheduler rather than a complete operating system.

I want to build WolfSSL as small as possible for this use. Reading chapter 2.4 of the manual is not giving me enough information as far as i understand it at least. It says to keep the header and source files in the same structure as the WolfSSL download package.

What are the source and header files required to build WolfSSL? What parts are required for what functionality?

I have access to the entirety of the C standard library and i have to make my own custom input/output abstraction layer according to chapter 5.1.2 in the WolfSSL manual, as I will be using either UART to radio or a proprietary protocol to radio.

--StrToLower

Share

Re: How to build on KDS (FreeRTOS)

Hi StrToLower,

The main source and header directories of the wolfSSL package are:

./wolfssl - All wolfSSL and wolfCrypt headers, this directory structure needs to remain intact (ie: ./wolfssl, ./wolfssl/wolfcrypt, etc.).

./wolfcrypt - This directory holds the sources files for the underlying wolfCrypt crypto module.  Normally you can include all source files from this directory.  Features are excluded through the use of preprocessor defines (ex: NO_DES3)

./src - This directory holds the source files for the wolfSSL SSL/TLS layer.  All files in this directory should be compiled as well.

Best Regards,
Chris