2024-12-06 23:50:21 +00:00
|
|
|
example: example.c Makefile boot.s linker.ld
|
|
|
|
riscv32-none-elf-as -march=rv32i -mabi=ilp32 boot.s -o boot.o
|
2024-12-08 23:41:29 +00:00
|
|
|
riscv32-none-elf-gcc -fno-builtin -fvisibility=hidden -nostdlib -nostartfiles -march=rv32im -mabi=ilp32 -c example.c -o example.o -g
|
|
|
|
riscv32-none-elf-ld boot.o example.o -T linker.ld -o example -g
|
|
|
|
#riscv32-none-elf-strip -R .riscv.attributes example
|
|
|
|
#riscv32-none-elf-strip -R .comment example
|
2024-12-07 01:19:22 +00:00
|
|
|
riscv32-none-elf-objcopy -O binary example example.raw
|
|
|
|
#riscv32-none-elf-objcopy -O binary -j .text example example.text
|
|
|
|
#riscv32-none-elf-objcopy -O binary -j .sdata example example.data
|