whoops start basic sim from 0x20000000
[openpower-isa.git] / src / test / basic_pypowersim / Makefile
1 TOOLCHAIN=powerpc64le-linux-gnu
2 CC=$(TOOLCHAIN)-gcc
3 AS=$(TOOLCHAIN)-as
4 AFLAGS=-mpwr9
5
6 all: sim
7
8 sim: kernel.bin
9 echo -n -e \\0060\\0000\\0061\\0000 > test.bin
10 echo -n -e \\0060\\0000\\0061\\0000 >> test.bin
11 pypowersim -q --load test.bin:0 \
12 -p 0x20000000 \
13 --dump testout.bin:0:8 \
14 --dump testout2.bin:0x20000100:8 \
15 -g gpr.list -i kernel.bin
16
17 clean:
18 rm *.o *.elf *.bin
19
20 kernel.elf: test.o
21 $(TOOLCHAIN)-ld $^ -EL -o $@ -T memmap
22
23 kernel.bin: kernel.elf
24 $(TOOLCHAIN)-objcopy $< -I elf64-little -O binary $@
25
26 %.o: %.s
27 $(AS) $(AFLAGS) -c $< -le -o $@