bit more memdump debugging on qemu sim
[openpower-isa.git] / src / test / basic_pypowersim / Makefile
1 TOOLCHAIN=powerpc64-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 --dump testout.bin:0:8 \
13 --dump testout2.bin:0x20000100:8 \
14 -g gpr.list -i kernel.bin
15
16 clean:
17 rm *.o *.elf *.bin
18
19 kernel.elf: test.o
20 $(TOOLCHAIN)-ld $^ -EL -o $@ -T memmap
21
22 kernel.bin: kernel.elf
23 $(TOOLCHAIN)-objcopy $< -I elf64-little -O binary $@
24
25 %.o: %.s
26 $(AS) $(AFLAGS) -c $< -le -o $@