#!/bin/bash

export MBDIR=../microblaze_0

mb-gcc -O3 -o test.elf main.c hwdriver.c \
        module0.c module1.c smmu.c \
    -mno-xl-soft-mul -mxl-barrel-shift -mxl-pattern-compare \
    -mno-xl-soft-div -mcpu=v7.10.d  -Wl,-T -Wl,main.ld  -g    \
    -I$MBDIR/include/ -I. -L$MBDIR/lib/ -Wall || exit 1
mb-objcopy -O binary test.elf test.bin || exit 1
python ../boot/prepare.py test.bin || exit 1

exit 0

