This repository has been archived on 2025-06-25. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
RiscV-Formal/rv_tests/hello_world/build.sh
2025-02-12 23:54:15 -05:00

8 lines
288 B
Bash

# Assemble the code
riscv64-unknown-elf-as -march=rv64imac -mabi=lp64 -o hello.o hello.S
# Link with our linker script to create an ELF file
riscv64-unknown-elf-ld -T linker.ld -o hello.elf hello.o
# Convert ELF to a raw binary
riscv64-unknown-elf-objcopy -O binary hello.elf hello.bin