From 9b1f5de57a90b3bc9dba305c56ebbc8dd66fc041 Mon Sep 17 00:00:00 2001 From: "Yi-Hsiu, Hsu" Date: Wed, 27 Jan 2021 01:33:24 -0800 Subject: [PATCH] Support to build coremark with segger libc --- software/coremark/freedom-metal/core_portme.c | 4 ++++ software/coremark/freedom-metal/core_portme.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/software/coremark/freedom-metal/core_portme.c b/software/coremark/freedom-metal/core_portme.c index 1d342592e..8b0b7db27 100755 --- a/software/coremark/freedom-metal/core_portme.c +++ b/software/coremark/freedom-metal/core_portme.c @@ -15,7 +15,11 @@ limitations under the License. Original Author: Shay Gal-on */ +#ifdef __SEGGER_LIBC__ +#include +#else #include +#endif #include "coremark.h" #include "core_portme.h" diff --git a/software/coremark/freedom-metal/core_portme.h b/software/coremark/freedom-metal/core_portme.h index 4d1d6f9ce..b20199132 100755 --- a/software/coremark/freedom-metal/core_portme.h +++ b/software/coremark/freedom-metal/core_portme.h @@ -93,7 +93,11 @@ typedef ee_u32 ee_ptr_int; typedef ee_u64 ee_ptr_int; #endif typedef signed int ee_size_t; + +#ifndef __SEGGER_LIBC__ #define NULL ((void *)0) +#endif + /* align_mem : This macro is used to align an offset to point to a 32b value. It is used in the Matrix algorithm to initialize the input memory blocks. */