9 lines
342 B
Bash
Executable File
9 lines
342 B
Bash
Executable File
#!/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
|