Topic: PIC32MZ and WolfSSL

I want to build a custom version (with specific features enabled) of the WolfSSL Library to use with PIC32 device and not use the one that comes bundled with Microchip libraries (Harmony). Is there a single configure option that I can use for this ?

Share

Re: PIC32MZ and WolfSSL

Hi wolfGang,

There are many examples of creating new custom defines in the file

<wolfssl-root>/wolfssl/wolfcrypt/settings.h

When creating a new custom define section we place a commented out option at the top of the settings header file and note to uncomment that single define if you wish to use it.

Then we create a subsection for the define that contains all the various global configure options that pertain to operating environment.

To control features it is customary to define "WOLFSSL_USER_SETTINGS" at the project level. Then add a file named "user_settings.h" to your include path and use this header for enabling/disabling specific features. To see examples of this please have a look at the user_settings.h header files used in several of our examples:

<wolfssl-root>/IDE/IAR-EWARM/embOS/custom_port/custom_port_user_settings/user_settings.h
<wolfssl-root>/IDE/IAR-EWARM/embOS/SAMV71_XULT/embOS_SAMV71_XULT_user_settings/user_settings.h
<wolfssl-root>/IDE/IAR-EWARM/Projects/user_settings.h
<wolfssl-root>/IDE/iOS/user_settings.h
<wolfssl-root>/IDE/LPCXPRESSO/lib_wolfssl/user_settings.h
<wolfssl-root>/IDE/MDK5-ARM/Conf/user_settings.h
<wolfssl-root>/IDE/MDK5-ARM/Projects/CryptBenchmark/RTE/wolfSSL/user_settings.h
<wolfssl-root>/IDE/MDK5-ARM/Projects/CryptTest/RTE/wolfSSL/user_settings.h
<wolfssl-root>/IDE/MDK5-ARM/Projects/EchoClient/RTE/wolfSSL/user_settings.h
<wolfssl-root>/IDE/MDK5-ARM/Projects/EchoServer/RTE/wolfSSL/user_settings.h
<wolfssl-root>/IDE/MDK5-ARM/Projects/SimpleClient/RTE/wolfSSL/user_settings.h
<wolfssl-root>/IDE/MDK5-ARM/Projects/SimpleServer/RTE/wolfSSL/user_settings.h
<wolfssl-root>/IDE/MDK5-ARM/Projects/wolfSSL-Full/RTE/wolfSSL/user_settings.h
<wolfssl-root>/IDE/MDK5-ARM/Projects/wolfSSL-Lib/RTE/wolfSSL/user_settings.h
<wolfssl-root>/IDE/ROWLEY-CROSSWORKS-ARM/user_settings.h
<wolfssl-root>/IDE/WIN/user_settings.h


Warm Regards,

Kaleb

Re: PIC32MZ and WolfSSL

Thanks Keleb. That helped.

So, Does MPLAB harmony compile the code each time or does it use a pre-compiled library? Can I add these options as part of my Harmony project and get the project compiled with them?

Share

Re: PIC32MZ and WolfSSL

Hi wolfGang,

MPLAB harmony will re-compile the project every time. It compiles a binary that is then flashed to the device. You can update the <wolfssl-root>/wolfssl/wolfcrypt/settings.h header and re-compile to change functionality.

Warm Regards,

Kaleb