From 3bda5c9e639bbd5b6c368e8a140743dc48faee60 Mon Sep 17 00:00:00 2001 From: "colin.liang" Date: Sat, 7 Jan 2023 19:37:25 +0800 Subject: [PATCH] Fix to run environment problem. --- Makefile | 4 ++-- dhrystone/Makefile | 2 +- firmware/start.S | 2 -- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index d7027e3..d28b598 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ RISCV_GNU_TOOLCHAIN_GIT_REVISION = 411d134 -RISCV_GNU_TOOLCHAIN_INSTALL_PREFIX = /opt/riscv32 +RISCV_GNU_TOOLCHAIN_INSTALL_PREFIX = /opt/riscv # Give the user some easy overrides for local configuration quirks. # If you change one of these and it breaks, then you get to keep both pieces. @@ -15,7 +15,7 @@ TEST_OBJS = $(addsuffix .o,$(basename $(wildcard tests/*.S))) FIRMWARE_OBJS = firmware/start.o firmware/irq.o firmware/print.o firmware/hello.o firmware/sieve.o firmware/multest.o firmware/stats.o GCC_WARNS = -Werror -Wall -Wextra -Wshadow -Wundef -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings GCC_WARNS += -Wredundant-decls -Wstrict-prototypes -Wmissing-prototypes -pedantic # -Wconversion -TOOLCHAIN_PREFIX = $(RISCV_GNU_TOOLCHAIN_INSTALL_PREFIX)i/bin/riscv32-unknown-elf- +TOOLCHAIN_PREFIX = $(RISCV_GNU_TOOLCHAIN_INSTALL_PREFIX)/bin/riscv32-unknown-elf- COMPRESSED_ISA = C # Add things like "export http_proxy=... https_proxy=..." here diff --git a/dhrystone/Makefile b/dhrystone/Makefile index 89cb110..fca71a5 100644 --- a/dhrystone/Makefile +++ b/dhrystone/Makefile @@ -1,7 +1,7 @@ USE_MYSTDLIB = 0 OBJS = dhry_1.o dhry_2.o stdlib.o CFLAGS = -MD -O3 -mabi=ilp32 -march=rv32im -DTIME -DRISCV -TOOLCHAIN_PREFIX = /opt/riscv32im/bin/riscv32-unknown-elf- +TOOLCHAIN_PREFIX = /opt/riscv/bin/riscv32-unknown-elf- ifeq ($(USE_MYSTDLIB),1) CFLAGS += -DUSE_MYSTDLIB -ffreestanding -nostdlib diff --git a/firmware/start.S b/firmware/start.S index d95f04c..aa2a36b 100644 --- a/firmware/start.S +++ b/firmware/start.S @@ -327,9 +327,7 @@ irq_vec: picorv32_retirq_insn() -#ifndef ENABLE_QREGS .balign 0x200 -#endif irq_regs: // registers are saved to this memory region during interrupt handling // the program counter is saved as register 0