#!/bin/bash

arm-none-eabi-gcc -g -c -mcpu=arm926ej-s hw2-entry.c -o hw2-entry.o

arm-none-eabi-as -g -mcpu=arm926ej-s hw2-startup.s -o hw2-startup.o

arm-none-eabi-ld -T qemuboot.ld hw2-entry.o hw2-startup.o -o qemuboot.elf

arm-none-eabi-objcopy -O binary qemuboot.elf qemuboot.bin

#arm-none-eabi-objdump -d qemuboot.elf

qemu-system-arm -M versatilepb -nographic -kernel qemuboot.bin #-S -s


