(3 replies, posted in wolfSSL)

Hi David,

Thanks for the quick response!  I'll try with WOLFSSL_LWIP out and see how it goes.


(3 replies, posted in wolfSSL)


I've got an existing project on an STM32H7 chip that uses LwIP (with no OS) to communicate over Ethernet (making a UDP socket connection with a host & exchanging data over it).  I'd like to add WolfSSL to the mix now, so I:

1. downloaded the 4.8.0 package for STM32CubeMX (6.3.0),
2. installed it,
3. selected all three software packs in my .ioc,
4. checked the box to enable "wolfSSL wolfSSL", then made a handful of selections under Parameter Settings, then
5. Generated code and built. 

No errors and no warnings!  But also it looks like all that Cube did was generate a header file (wolfSSL.I-CUBE-wolfSSL_conf.h) and then copy it and a bunch of other source files to the project.

There are 10 examples that come with the Cube pack, but nine of them involve FreeRTOS (which I'm not using) and the other (for the F207) looks a lot like what I've got, where there doesn't appear to be any actual implementation of SSL/crypto in the project.

So I'm trying to figure out how to get started; I apologize in advance if these are basic questions!  [I also apologize for a bunch of mangled URLs but the forum is limiting me to three, and is very clever about recognizing them.]

Looking through the forum here, I see https://www.wolfssl.com/forums/topic179 … lfssl.html where the person mentions that Cube created MX_wolfSSL_Init() and MX_wolfSSL_Process() functions in main.c; I did not get those functions but poking around the Middlewares/Third_Party/wolfSSL_wolfSSL_wolfSSL/wolfssl directory I do see the 'wolfSSL_Init()' and 'wolfSSL_Cleanup()' functions mentioned later in that thread, so that's a starting point.  There's also a wolfssl_example.c file that looks helpful.

I looked at [the wolfssl web site]/docs/stm32/, which is referenced in a few other threads, but don't see much that would help in the absence of FreeRTOS (unless I missed something?)

I also saw https://www.wolfssl.com/forums/topic170 … e-ide.html which ends with some helpful hints on generating callback functions, with a github link ([github]/wolfSSL/wolfssl-examples/blob/master/tls/client-tls-callback.c) that looks possibly helpful.

There's also a link to an apparently out-of-date pull request at [github]/wolfSSL/wolfssl/pull/599 but I haven't gone through it yet to see how it might merge with what I'm already doing. 

I also found https://www.wolfssl.com/forums/topic135 … no-os.html which links to [github]/wolfSSL/wolfssl/tree/master/IDE/MDK-ARM ... I'm not using KEIL but maybe the code will be helpful (still going through it).

So after all of that, my question(s):

1. Is there a complete example, using any IDE, of a Cube-generated STM32 implementation of WolfSSL that doesn't use FreeRTOS?

2. Barring that, is the basic process going to be:
  a. Customize the wolfSSL.I-CUBE-wolfSSL_conf.h file and include it in main.c
  b. set up CA files & other basic init tasks
  c. Call wolfSSL_Init() after the hardware and LwIP initialization is complete (after the UDP socket is connected?)
  d. Somehow get in between lwip and my program, e.g. at the LwIP RX callback and where I call udp_send, and do something akin to the my_IORecv() and my_IOSend() functions at [github]/wolfSSL/wolfssl-examples/blob/master/tls/client-tls-callback.c?

Am I on the right track here?