updates coremark build system to use BSP definitions

This commit is contained in:
Eyck Jentzsch 2024-03-20 07:38:40 +01:00
parent fabf7cc588
commit d5c672c288
5 changed files with 14 additions and 21 deletions

@ -1 +1 @@
Subproject commit ab2b7214fec518979cc25b561d6a0ce116b8f92c
Subproject commit e051cf180ec46fbbbdb99d28231f9700f45490d0

View File

@ -16,8 +16,16 @@
#File : core_portme.mak
ISA?=imc
BOARD?=iss
RISCV_ARCH:=rv32$(ISA)_zicsr_zifencei
RISCV_ABI:=ilp32
ifeq ($(ISA),e)
RISCV_ABI:=ilp32e
else
RISCV_ABI:=ilp32
endif
BSP_BASE = ../../../bare-metal-bsp
TRIPLET?=riscv64-unknown-elf
# Flag : OUTFLAG
# Use this flag to define how to to get an executable (e.g -o)
@ -36,7 +44,7 @@ AS = $(TRIPLET)-as
PORT_CFLAGS = -march=$(RISCV_ARCH) -mabi=$(RISCV_ABI) -O3 -DCLOCKS_PER_SEC=10000000 -nostdlib -nostartfiles -nodefaultlibs \
-funroll-loops -fpeel-loops -fgcse-sm -fgcse-las -flto
FLAGS_STR = "$(PORT_CFLAGS) $(XCFLAGS) $(XLFLAGS) $(LFLAGS_END)"
CFLAGS = $(PORT_CFLAGS) -I$(PORT_DIR) -I. -DFLAGS_STR=\"$(FLAGS_STR)\"
CFLAGS = $(PORT_CFLAGS) -I$(PORT_DIR) -I. -DFLAGS_STR=\"$(FLAGS_STR)\" -I$(BSP_BASE)/env/$(BOARD)
#Flag : LFLAGS_END
# Define any libraries needed for linking or other flags that should come at the end of the link line (e.g. linker scripts).
# Note : On certain platforms, the default clock_gettime implementation is supported but requires linking of librt.

View File

@ -16,6 +16,7 @@ limitations under the License.
#include <coremark.h>
#include <stdarg.h>
#include "../../../bare-metal-bsp/libwrap/sys/puts.c"
#define ZEROPAD (1 << 0) /* Pad with zero */
#define SIGN (1 << 1) /* Unsigned/signed long */
@ -675,8 +676,7 @@ ee_vsprintf(char *buf, const char *fmt, va_list args)
void
uart_send_char(char c)
{
while (UART0_REG(UART_REG_TXFIFO) & 0x80000000) ;
UART0_REG(UART_REG_TXFIFO) = (unsigned char)c;
__wrap_puts(c);
}
int

View File

@ -2,7 +2,7 @@ TARGET := dhrystone
ISA?=imc
ASM_SRCS :=
C_SRCS := dhry_stubs.c dhry_printf.c dhry_1.c dhry_2.c
C_SRCS := dhry_stubs.c dhry_1.c dhry_2.c
HEADERS := dhry.h
BOARD=iss

View File

@ -1,15 +0,0 @@
/* The functions in this file are only meant to support Dhrystone on an
* embedded RV32 system and are obviously incorrect in general. */
#include <stdarg.h>
#include <stddef.h>
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <unistd.h>
//#undef putchar
//int putchar(int ch)
//{
// return write(1, &ch, 1) == 1 ? ch : -1;
//}