From: Peter Samir <petersamir06423852@gmail.com>
To: qemu-devel@nongnu.org
Subject: QEMU RISC-V
Date: Sun, 25 Jun 2023 01:16:21 +0300 [thread overview]
Message-ID: <CAK-FQ7uOUhAhmgqBOv5fYukFmz-hSp=XEaeyrmiAi2_UBncU0A@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 914 bytes --]
hello,
I built RISC-V toolchain and QEMU as follows:
# Install prerequisites:
https://github.com/riscv-collab/riscv-gnu-toolchain#prerequisites
# Install additional prerequisites:
https://github.com/riscv-collab/riscv-gnu-toolchain/issues/1251
git clone https://github.com/riscv-collab/riscv-gnu-toolchain
cd riscv-gnu-toolchain
./configure --prefix=/home/RISCV-installed-Tools --with-arch=rv32i_zicsr
--with-abi=ilp32
make
make build-qemu
QEMU Version:
qemu-riscv32 version 7.1.0 (v7.1.0)
Copyright (c) 2003-2022 Fabrice Bellard and the QEMU Project developers
i debug as follows:
riscv32-unknown-elf-gcc -g test.S -o test
qemu-riscv32 -g 3333 test
// in another terminal
riscv32-unknown-elf-gdb test -ex "target remote :3333"
but Qemu reports this error when I use CSR instructions:
Program received signal SIGILL, Illegal instruction. main () at main.S:2 2
main: csrw mepc, t0
how to resolve this error ?
[-- Attachment #2: Type: text/html, Size: 1772 bytes --]
next reply other threads:[~2023-06-24 22:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-24 22:16 Peter Samir [this message]
2023-07-03 4:15 ` QEMU RISC-V Alistair Francis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAK-FQ7uOUhAhmgqBOv5fYukFmz-hSp=XEaeyrmiAi2_UBncU0A@mail.gmail.com' \
--to=petersamir06423852@gmail.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).