mirror of
https://github.com/Noratrieb/rustv32i.git
synced 2026-01-14 21:35:02 +01:00
meow
This commit is contained in:
parent
7183421b8f
commit
29bb73425b
7 changed files with 423 additions and 23 deletions
|
|
@ -1,5 +1,5 @@
|
|||
CC = clang -target riscv32-unknown-linux-gnu -fuse-ld=lld -march=rv32i
|
||||
CC = clang -Wall -Wpedantic -target riscv32-unknown-linux-gnu -fuse-ld=lld -march=rv32i
|
||||
CC_STATIC = $(CC) -static -nostdlib -nodefaultlibs
|
||||
|
||||
test: test.c
|
||||
$(CC_STATIC) test.c -o test
|
||||
init: init.c
|
||||
$(CC_STATIC) init.c -o init
|
||||
|
|
|
|||
11
test/init.c
Normal file
11
test/init.c
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
void _start(void)
|
||||
{
|
||||
__asm__ volatile (
|
||||
"li a7, 93;" // exit
|
||||
"li a0, 0;" // code 0
|
||||
"ecall"
|
||||
:
|
||||
:
|
||||
: "a7", "a0", "memory"
|
||||
);
|
||||
}
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
void _start()
|
||||
{
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue