sorting out qemu co-simulation to read/write FP regs
[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 --load test.bin:0 -g gpr.list -i kernel.bin
12
13 clean:
14 rm *.o *.elf *.bin
15
16 kernel.elf: test.o
17 $(TOOLCHAIN)-ld $^ -EL -o $@ -T memmap
18
19 kernel.bin: kernel.elf
20 $(TOOLCHAIN)-objcopy $< -I elf64-little -O binary $@
21
22 %.o: %.s
23 $(AS) $(AFLAGS) -c $< -le -o $@