Code Monkey home page Code Monkey logo

Comments (6)

filamoon avatar filamoon commented on August 24, 2024

Same here. No error messages at all.

from picorv32.

ogris avatar ogris commented on August 24, 2024

I got a little bit more information after chainging the picorv32.v file:
`
Built with Verilator 4.038 2020-07-11.

Recommended: Verilator 4.0 or later.

MISALIGNED WORD: 0x00000152

MISALIGNED WORD: 0x00000152

TRAP after 8223 clock cycles

ERROR!

%Error: testbench.v:271: Verilog $stop
`

from picorv32.

TurBoss avatar TurBoss commented on August 24, 2024

hello, i managed to get it build by using this command

make TOOLCHAIN_PREFIX=riscv32-unknown-elf-

:)

Edit: doesn't work after a make clean ..., so not the solution

Edit2: found that need to set path to opt

export PATH=/opt/riscv32im/bin:$PATH

here for im

from picorv32.

rigoorozco avatar rigoorozco commented on August 24, 2024

I'm getting the same thing. I was able to get around it using version 10.2.0 here:
https://github.com/xpack-dev-tools/riscv-none-embed-gcc-xpack/releases/

Not sure what the problem is but it seems to not work with newer versions of gcc

from picorv32.

rigoorozco avatar rigoorozco commented on August 24, 2024

Got around this issue on GCC 13.2.0 doing the following to the Makefile:

diff --git a/Makefile b/Makefile
index d7027e3..feda8a7 100644
--- a/Makefile
+++ b/Makefile
@@ -15,8 +15,8 @@ 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-
-COMPRESSED_ISA = C
+TOOLCHAIN_PREFIX ?= $(RISCV_GNU_TOOLCHAIN_INSTALL_PREFIX)i/bin/riscv32-unknown-elf-
+COMPRESSED_ISA = 
 
 # Add things like "export http_proxy=... https_proxy=..." here
 GIT_ENV = true
@@ -116,7 +116,7 @@ firmware/start.o: firmware/start.S
        $(TOOLCHAIN_PREFIX)gcc -c -mabi=ilp32 -march=rv32im$(subst C,c,$(COMPRESSED_ISA)) -o $@ $<
 
 firmware/%.o: firmware/%.c
-       $(TOOLCHAIN_PREFIX)gcc -c -mabi=ilp32 -march=rv32i$(subst C,c,$(COMPRESSED_ISA)) -Os --std=c99 $(GCC_WARNS) -ffreestanding -nostdlib -o $@ $<
+       $(TOOLCHAIN_PREFIX)gcc -c -mabi=ilp32 -march=rv32im$(subst C,c,$(COMPRESSED_ISA)) -Os --std=c99 $(GCC_WARNS) -ffreestanding -nostdlib -o $@ $<
 
 tests/%.o: tests/%.S tests/riscv_test.h tests/test_macros.h
        $(TOOLCHAIN_PREFIX)gcc -c -mabi=ilp32 -march=rv32im -o $@ -DTEST_FUNC_NAME=$(notdir $(basename $<)) \

from picorv32.

zavs avatar zavs commented on August 24, 2024

It was solved by modifying the start.S to fix the alignment in issue #210 . rethhelo also opened a PR to fix the problem #218 . "This PR forces irq_regs to always be aligned with .balign 0x200, by doing this solves the problem." in start.S

from picorv32.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.