From 33898756434cc490557540dadbfc9bf1f0626d4d Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Thu, 21 Mar 2024 07:23:21 +0100 Subject: [PATCH] fixes rve settings --- env/common-gcc.mk | 2 +- env/entry.S | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/env/common-gcc.mk b/env/common-gcc.mk index 8cdb0f2..b3a6df3 100644 --- a/env/common-gcc.mk +++ b/env/common-gcc.mk @@ -2,6 +2,7 @@ ifndef _MK_COMMON _MK_COMMON := # defined TL_TARGET?=all +BOARD?=iss .PHONY: $(TL_TARGET) $(TL_TARGET): $(TARGET) @@ -12,7 +13,6 @@ PLATFORM_DIR = $(ENV_DIR)/$(BOARD) include $(BSP_BASE)/libwrap/libwrap.mk -BOARD?=iss ASM_SRCS += $(ENV_DIR)/start.S $(ENV_DIR)/entry.S C_SRCS += $(PLATFORM_DIR)/init.c diff --git a/env/entry.S b/env/entry.S index fef8b9e..f6a6313 100644 --- a/env/entry.S +++ b/env/entry.S @@ -10,7 +10,7 @@ .align 2 .global trap_entry trap_entry: -#ifndef __riscv_abi_rve +#ifdef __riscv_abi_rve addi sp, sp, -8*REGBYTES STORE x1, 1*REGBYTES(sp) // ra STORE x5, 2*REGBYTES(sp) // t0 @@ -43,7 +43,7 @@ trap_entry: mv a2, sp call handle_trap csrw mepc, a0 -#ifndef __riscv_abi_rve +#ifdef __riscv_abi_rve addi sp, sp, -8*REGBYTES LOAD x1, 1*REGBYTES(sp) // ra LOAD x5, 2*REGBYTES(sp) // t0