trashernet-soc/sw/bootrom/build.sh

9 lines
342 B
Bash
Raw Permalink Normal View History

2024-07-06 19:15:41 +02:00
#!/bin/bash
set -e
riscv64-elf-gcc -mabi=ilp32 -march=rv32i -nostdlib -nostartfiles -ffreestanding -T boot.ld -Os -o bootrom.elf main.c
#riscv64-elf-objdump -D bootrom.elf
riscv64-elf-objcopy -O binary bootrom.elf bootrom.bin
od --endian=little -vtx4 -An -w4 bootrom.bin | tr -d ' ' > bootrom.vhex
r2 -A -c 'pdf @ sym._start' -q bootrom.elf