Topic: WOLF SSL Support / integration with STM32L452 Project (CUBE IDE)

Hello

we are  working to integrate Wolf ssl based client application on our running STM32 based project ,for this we have taken reference from official doc of Wolf and found it supports STM32L series of controller, we followed instruction based on this doc to use package designed for STM32 controller. and having trouble with following details .

1. In config file (conf.ftl) located under iDe section is using only two controller in STM32L serial #defined(STM32L4A6xx)  and #defined(STM32L475xx).  , no where mentioned STM32L452 , so is there no support for STM32452 for wolf ssl ?
https://www.wolfssl.com/docs/stm32/ 


2. after using package "wolfSSL.I-CUBE-wolfSSL.4.7.0.pack" with STM32CUBE MX we integrated these packages with current project with HALversion 1.14 but there are lots of files for RTOS and linux/scripts are being generated under WOLF middle ware section , so wolf ssl only works with OS based applications?   

we request help and guidance for using wolfssl with STM32L452 project .

-Abhishek Mishra
[India]

Share

Re: WOLF SSL Support / integration with STM32L452 Project (CUBE IDE)

Hi Abhishek,

1) Yes we are compatible, but each part has slight variations, such as if it supports crypto hardware. The goal is for you to add your own section or use this file as a template to implement your own build settings by coping this file and naming it user_settings.h and adding the pre-processor build macro WOLFSSL_USER_SETTINGS. If you add your own section in config.ftl that is generic feel free to submit here and we can include in the next wolfSSL release cube pack.

2) wolfSSL and wolfCrypt can be used without an OS in bare-metal. The example applications for TLS requires threading because it uses two threads to exchange data as an example. The cube pack code can be generated without an RTOS, but you won't be able to use the TLS example. You can still use TLS in your application code.

Thanks,
David Garske, wolfSSL

Share

3 (edited by abhishekmishra 2021-03-18 02:52:27)

Re: WOLF SSL Support / integration with STM32L452 Project (CUBE IDE)

Hello David thanks for response !

we followed your suggestion and modified #define WOLFSSL_STM32L4 in setting.hand also commented "WOLF_CONF_RTOS"
for your refer setting.h and wolfSSL_conf.h is atached . after clearly using single threaded system and not RTOs in config (by cube mx) still having error from files "/linux/delay.h" from module_hooks.c and get_thread_size.c from linuxkm which is linux kernal requirement..

kindly let us know why this is including OS based lib files even we dont want to use them and we have configured project for STM32L452.

-Abhishek Mishra
[India]

Post's attachments

settings.h 69.83 kb, 2 downloads since 2021-03-18 

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

Share

Re: WOLF SSL Support / integration with STM32L452 Project (CUBE IDE)

also find MX configuration..

Post's attachments

mxconfig_!.jpg
mxconfig_!.jpg 196.55 kb, file has never been downloaded. 

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

Share

Re: WOLF SSL Support / integration with STM32L452 Project (CUBE IDE)

Hi Abhishek,

The files in linuxkm should be excluded from your project. That folder exclusion change has already been made to the pack. Please update to the v4.7.0 version of the pack.

https://www.wolfssl.com/files/ide/I-CUBE-wolfSSL.pack

Thanks,
David Garske, wolfSSL

Share

Re: WOLF SSL Support / integration with STM32L452 Project (CUBE IDE)

Hi David

thanks for responding quickly !

we used 4.7.0  and you can see in ref. image also commented  /* #define WOLFSSL_LINUXKM */ in setting.h , but there is no change in error (some new errors for lwip path appeared )

is there any example or ref for using wolfssl with St in bare metal ?

Post's attachments

errorlinuxkm.jpg
errorlinuxkm.jpg 264.29 kb, 1 downloads since 2021-03-18 

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

Share

Re: WOLF SSL Support / integration with STM32L452 Project (CUBE IDE)

Hi Abhishek,

No, the directory in wolfssl/linuxkm must be excluded. Those files are only for building with the Linux Kernel Module.

Right-click this folder in Project Explorer tree and go to "Properties". Under Resource there is an option to exclude the directory. I am running some tests with the wolfSSL Cube pack v4.7.0 again to make sure my fix for this exclusion is working.

Thanks,
David Garske, wolfSSL

Share

Re: WOLF SSL Support / integration with STM32L452 Project (CUBE IDE)

Hi Abhishek,

I can reproduce and have an updated pack posted here:
https://drive.google.com/file/d/1WWGrJb … sp=sharing

You can manually exclude the folder, but as a solution I've removed it from the pack.

It will be on the website shortly at the linked location:
https://www.wolfssl.com/files/ide/I-CUBE-wolfSSL.pack

Thanks for the report.
David Garske, wolfSSL

Share

Re: WOLF SSL Support / integration with STM32L452 Project (CUBE IDE)

Hi David

Happy to share that we have successfully compiled WSSL pack with our existing STM32 project for STM32L452 with Cube IDE.
now we are looking for example to use WSSL in bare metal (with STM32 without RTOS or linux lib).
gone through a post in this forum also "porting Wolfssl t bare metal"  but its all about migration from openssl.
so please suggest some example to integrate WSSL in our STM32 project .

another compatibility check request is here for LWIP, we already have LWIP stake working with our system so can we get some benefit  from that , or in simple words is it possible to use LWIP along with wssl or WSSL willalone can handle all Network task. if there is some thing related to WSSl+lWIP please point it out to proceed further .

Thaks
Abhishek Mishra

Share

Re: WOLF SSL Support / integration with STM32L452 Project (CUBE IDE)

Hi Abhishek,

That is good news regarding the Cube pack.

We fully support both bare-metal and LWIP. For LWIP we support either the Posix or RAW interface. With the LWIP Posix interface requires threading (I believe). We do have an LWIP raw example in an old PR here:
https://github.com/wolfSSL/wolfssl/pull/599

Another option is to define `WOLFSSL_USER_IO` and set read / write callbacks using the following API's:

/* I/O callbacks */
typedef int (*CallbackIORecv)(WOLFSSL *ssl, char *buf, int sz, void *ctx);
typedef int (*CallbackIOSend)(WOLFSSL *ssl, char *buf, int sz, void *ctx);
WOLFSSL_API void wolfSSL_CTX_SetIORecv(WOLFSSL_CTX*, CallbackIORecv);
WOLFSSL_API void wolfSSL_CTX_SetIOSend(WOLFSSL_CTX*, CallbackIOSend);
WOLFSSL_API void wolfSSL_SSLSetIORecv(WOLFSSL*, CallbackIORecv);
WOLFSSL_API void wolfSSL_SSLSetIOSend(WOLFSSL*, CallbackIOSend);

We have some examples for this here:
https://github.com/wolfSSL/wolfssl-exam … callback.c

Thanks,
David Garske, wolfSSL

Share