emcyfra/Makefile

24 lines
1020 B
Makefile
Raw Normal View History

2025-02-17 09:09:14 +00:00
all:
arm-none-eabi-gcc -ggdb -mcpu=Cortex-M4 -mthumb -Tlibpqscheme.ld -nostartfiles -o libpqscheme_test.elf libpqscheme_test.c -Iruntime_mps2/out/an386/pack/include -L/home/kris/repos/pqshield/epcc/out/armv7e-m/lib -I/home/kris/repos/pqshield/epcc/out/armv7e-m/inc -lmlkem -lsha3 -lcommon
2025-02-17 23:46:39 +00:00
arm-none-eabi-gcc -ggdb -mcpu=Cortex-M4 -mthumb -Truntime_mps2/out/an386/pack/lib/mps2.ld -nostartfiles -o runner.elf runner.c -Lruntime_mps2/out/an386/pack/lib -lmps2-an386_runtime -Iruntime_mps2/out/an386/pack/include
2025-02-17 09:09:14 +00:00
arm-none-eabi-ar rcs runner runner.elf
arm-none-eabi-objcopy -O binary libpqscheme_test.elf libpqscheme_test.bin
2025-02-17 09:09:14 +00:00
run:
qemu-system-arm \
-M mps2-an386 \
-cpu cortex-m4 \
-nographic \
-kernel runner.elf \
2025-02-17 23:46:39 +00:00
-semihosting \
-device loader,file=libpqscheme_test.bin,addr=0x20000000
2025-02-17 23:46:39 +00:00
# -S -gdb tcp::1234
# -monitor unix:/tmp/qemu-monitor,server,nowait
2025-02-17 09:09:14 +00:00
clean:
2025-02-17 09:11:13 +00:00
rm -rf *.o *.a *.elf *.bin
rm -rf runner
2025-02-17 09:09:14 +00:00
proper: clean
cd runtime_mps2 && cmake --build --preset an386 --target clean