updates coremark portable part to match BSP
This commit is contained in:
parent
6d33d0b066
commit
2fb5920348
@ -186,6 +186,7 @@ portable_init(core_portable *p, int *argc, char *argv[])
|
||||
ee_printf("ERROR! Please define ee_u32 to a 32b unsigned type!\n");
|
||||
}
|
||||
p->portable_id = 1;
|
||||
ee_printf("portable_init finished.\n");
|
||||
}
|
||||
/* Function : portable_fini
|
||||
Target specific final code
|
||||
|
@ -42,7 +42,7 @@ AS = $(TRIPLET)-as
|
||||
# Flag : CFLAGS
|
||||
# Use this flag to define compiler options. Note, you can add compiler options from the command line using XCFLAGS="other flags"
|
||||
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
|
||||
-funroll-loops -fpeel-loops -fgcse-sm -fgcse-las -flto -g
|
||||
FLAGS_STR = "$(PORT_CFLAGS) $(XCFLAGS) $(XLFLAGS) $(LFLAGS_END)"
|
||||
CFLAGS = $(PORT_CFLAGS) -I$(PORT_DIR) -I. -DFLAGS_STR=\"$(FLAGS_STR)\" -I$(BSP_BASE)/env/$(BOARD)
|
||||
#Flag : LFLAGS_END
|
||||
@ -52,7 +52,7 @@ SEPARATE_COMPILE=1
|
||||
# Flag : SEPARATE_COMPILE
|
||||
# You must also define below how to create an object file, and how to link.
|
||||
OBJOUT = -o
|
||||
LFLAGS = -march=$(RISCV_ARCH) -mabi=$(RISCV_ABI)
|
||||
LFLAGS = -march=$(RISCV_ARCH) -mabi=$(RISCV_ABI) -g
|
||||
#--specs=nano.specs -march=$(RISCV_ARCH) -mabi=$(RISCV_ABI)
|
||||
ASFLAGS =
|
||||
OFLAG = -o
|
||||
|
@ -16,7 +16,6 @@ limitations under the License.
|
||||
|
||||
#include <coremark.h>
|
||||
#include <stdarg.h>
|
||||
#include "../../../bare-metal-bsp/libwrap/sys/write.c"
|
||||
|
||||
#define ZEROPAD (1 << 0) /* Pad with zero */
|
||||
#define SIGN (1 << 1) /* Unsigned/signed long */
|
||||
@ -660,10 +659,30 @@ ee_vsprintf(char *buf, const char *fmt, va_list args)
|
||||
return str - buf;
|
||||
}
|
||||
|
||||
#include <platform.h>
|
||||
|
||||
void
|
||||
uart_send_char(char c)
|
||||
{
|
||||
write(STDOUT_FILENO, &c, 1);
|
||||
#if defined(BOARD_ehrenberg)
|
||||
while (get_uart_rx_tx_reg_tx_free(uart)==0) ;
|
||||
uart_write(uart, c);
|
||||
if (c == '\n') {
|
||||
while (get_uart_rx_tx_reg_tx_free(uart)==0) ;
|
||||
uart_write(uart, '\r');
|
||||
}
|
||||
#elif defined(BOARD_iss)
|
||||
*((uint32_t*) 0xFFFF0000) = c;
|
||||
#elif defined(BOARD_TGCP)
|
||||
//TODO: implement
|
||||
#else
|
||||
while (UART0_REG(UART_REG_TXFIFO) & 0x80000000) ;
|
||||
UART0_REG(UART_REG_TXFIFO) = c;
|
||||
if (c == '\n') {
|
||||
while (UART0_REG(UART_REG_TXFIFO) & 0x80000000) ;
|
||||
UART0_REG(UART_REG_TXFIFO) = '\r';
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
int
|
||||
|
Loading…
Reference in New Issue
Block a user