Topic: How to bulid wolfSSL Lib in keil for C51

Hello:
I am trying to use wolfSSL in 51 MCU(STC15W4K56S4), MCU resources only 4K sram and 56K flash, 8bit MCU。
How to move wolfSSL into a completely new platform?
Can give me some advices, Which macro options can be turned off and which ones have to be turned on?

below is my config:
/* #define SINGLE_THREADED      or define RTOS  option */
#define WOLFSSL_CMSIS_RTOS

/* #define NO_FILESYSTEM         or define Filesystem option */
#define NO_FILESYSTEM
#define WOLFSSL_KEIL_FS
#define NO_WOLFSSL_DIR
#define WOLFSSL_NO_CURRDIR

/* #define WOLFSSL_USER_IO      or use BSD incompatible TCP stack */
#define WOLFSSL_KEIL_TCP_NET  /* KEIL_TCP + wolfssl_MDL_ARM.c for BSD compatibility */

#define NO_DEV_RANDOM
/* define your Rand gen for the operational use */
#define WOLFSSL_GENSEED_FORTEST

#define USE_WOLFSSL_MEMORY
#define WOLFSSL_MALLOC_CHECK

#define XVALIDATEDATE(d, f,t) (0)
#define WOLFSSL_USER_CURRTIME /* for benchmark */

//¼õÉÙÊý×éʹÓôóС
#define USE_FAST_MATH
#define TFM_TIMING_RESISTANT
#define WOLFSSL_SMALL_STACK

#define  BENCH_EMBEDDED

#define NO_WRITEV
#define NO_MAIN_DRIVER
#define WOLFSSL_MDK_SHELL
#define SINGLE_THREADED
#define NO_WOLFSSL_SERVER
#define NO_DES2
#define NO_PSK
#define NO_PWDBASED
#define NO_RC4
#define NO_RABBIT
#define NO_HC128
#define NO_64BIT
#define NO_ASN_TIME

complie lib error in Keil C51
*** ERROR 225: ATTEMPT TO ADD DUPLICATE PUBLIC SYMBOL
    FILE:    ssl.obj
    MODULE:  SSL
    PUBLIC:  _WOLFSSL_FREE
"wolfssl.LIB" - 0 Error(s), 268 Warning(s).

thanks

Share

Re: How to bulid wolfSSL Lib in keil for C51

Hi,

Thanks for contacting wolfSSL. Have you had a chance to review our porting guide here: https://wolfssl.com/wolfSSL/Docs-wolfss … guide.html

The porting guide will cover each problem expected when porting to a new environment. The guide will not touch on the differences for an 8-bit CPU and the default types wolfSSL expects (32 or 64 bit). Please take note of the define and example in our settings used when build for MICRIUM:

 #define WOLFSSL_TYPES

    typedef CPU_INT08U byte;
    typedef CPU_INT16U word16;
    typedef CPU_INT32U word32;

You will need to define what a 8-bit unsigned integer, 16-bit unsigned integer, and 32-bit unsigned integer are for your 8-bit CPU along with the define for NO_64BIT.


Warm Regards,

Kaleb