-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't compile the baremetal example #8
Comments
Alright, figured it out. I replaced And it works now :) |
Hmm... I wrote it to use the system rv64 compiler, so you wouldn't need to build the toolchain to compile the example. That said, that's probably not the best way to do it, now that it's possible to use the buildroot environment in Windows. I am curious what other people's feelings are. (reopening issue, in case anyone else wants to comment) |
What compiler are each of you using? |
|
I use |
Hi. Nice work there, by the way...
But I can't compile the baremetal test. I'm using the buildroot toolchain. Maybe I should use another one ?
I get this:
make testbare make -C baremetal make[1]: Entering directory '/opt/sandbox/mini-rv32ima/baremetal' ../buildroot/output/host/bin/riscv32-buildroot-linux-uclibc-gcc -o baremetal.elf baremetal.c baremetal.S -fno-stack-protector -static-libgcc -fdata-sections -ffunction-sections -g -Os -march=rv32ima -mabi=ilp32 -static -T flatfile.lds -nostdlib -Wl,--gc-sections baremetal.c: Assembler messages: baremetal.c:16: Error: unrecognized opcode
csrrw x0,0x138,s1'baremetal.c:16: Error: unrecognized opcode
csrrw x0,0x138,a5' baremetal.c:16: Error: unrecognized opcode
csrrw x0,0x138,a5'baremetal.c:21: Error: unrecognized opcode
csrrw x0,0x137,a5' baremetal.c:16: Error: unrecognized opcode
csrrw x0,0x138,a5'baremetal.c:16: Error: unrecognized opcode
csrrw x0,0x138,s1' baremetal.c:31: Error: unrecognized opcode
csrr a1,0xC00'baremetal.c:31: Error: unrecognized opcode
csrr a5,0xC00' baremetal.c:16: Error: unrecognized opcode
csrrw x0,0x138,a4'baremetal.c:26: Error: unrecognized opcode
csrrw x0,0x136,a5' baremetal.c:16: Error: unrecognized opcode
csrrw x0,0x138,a5'baremetal.c:16: Error: unrecognized opcode
csrrw x0,0x138,s0' baremetal.S: Assembler messages: baremetal.S:28: Error: unrecognized opcode
csrw 0x138,t0'Makefile:16: recipe for target 'baremetal.elf' failed
make[1]: *** [baremetal.elf] Error 1
make[1]: Leaving directory '/opt/sandbox/mini-rv32ima/baremetal'
Makefile:25: recipe for target 'testbare' failed
make: *** [testbare] Error 2`
The text was updated successfully, but these errors were encountered: