mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-31 19:24:42 +02:00
Micrium: benchmark fixes
* Time update for v5.8 to avoid rollover issues * define `XSNPRINTF` * `printf` based on Micrium version
This commit is contained in:
@@ -64,10 +64,12 @@
|
||||
#undef printf
|
||||
#define printf printx
|
||||
#elif defined(MICRIUM)
|
||||
#include <bsp_ser.h>
|
||||
void BSP_Ser_Printf (CPU_CHAR* format, ...);
|
||||
#undef printf
|
||||
#define printf BSP_Ser_Printf
|
||||
#if (OS_VERSION < 50000)
|
||||
#include <bsp_ser.h>
|
||||
void BSP_Ser_Printf (CPU_CHAR* format, ...);
|
||||
#undef printf
|
||||
#define printf BSP_Ser_Printf
|
||||
#endif
|
||||
#elif defined(WOLFSSL_ZEPHYR)
|
||||
#include <stdio.h>
|
||||
#define BENCH_EMBEDDED
|
||||
@@ -6027,10 +6029,23 @@ exit_ed_verify:
|
||||
#elif defined(MICRIUM)
|
||||
double current_time(int reset)
|
||||
{
|
||||
CPU_ERR err;
|
||||
|
||||
#if (OS_VERSION < 50000)
|
||||
CPU_ERR err;
|
||||
(void)reset;
|
||||
return (double) CPU_TS_Get32()/CPU_TS_TmrFreqGet(&err);
|
||||
#else
|
||||
RTOS_ERR err;
|
||||
double ret = 0;
|
||||
OS_TICK tick = OSTimeGet(&err);
|
||||
OS_RATE_HZ rate = OSTimeTickRateHzGet(&err);
|
||||
(void)reset;
|
||||
|
||||
if (RTOS_ERR_CODE_GET(err) == RTOS_ERR_NONE) {
|
||||
ret = ((double)tick)/rate;
|
||||
}
|
||||
return ret;
|
||||
#endif
|
||||
}
|
||||
#elif defined(WOLFSSL_ZEPHYR)
|
||||
|
||||
|
@@ -1399,6 +1399,7 @@ extern void uITRON4_free(void *p) ;
|
||||
#include <lib_mem.h>
|
||||
#include <lib_math.h>
|
||||
#include <lib_str.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#define USE_FAST_MATH
|
||||
@@ -1468,6 +1469,7 @@ extern void uITRON4_free(void *p) ;
|
||||
(void *)(pmem_2), \
|
||||
(CPU_SIZE_T)(size)) == DEF_YES)) \
|
||||
? 0 : 1)
|
||||
#define XSNPRINTF snprintf
|
||||
#endif
|
||||
|
||||
#define XMEMMOVE XMEMCPY
|
||||
|
Reference in New Issue
Block a user