generate.sh

This commit is contained in:
bdeng 2023-06-16 11:11:29 +08:00
parent 7754a149a9
commit 85896113cb
1 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1,21 @@
#!/bin/bash
rm -rf .config
if [ "$1" == "m0" ]; then
make BOARD=cortex-m0-emulator distclean
make BOARD=cortex-m0-emulator menuconfig
make BOARD=cortex-m0-emulator
qemu-system-arm -machine microbit -nographic -kernel build/XiZi-cortex-m0-emulator.elf
elif [ "$1" == "m3" ]; then
make BOARD=cortex-m3-emulator distclean
make BOARD=cortex-m3-emulator menuconfig
make BOARD=cortex-m3-emulator
qemu-system-arm -machine lm3s6965evb -nographic -kernel build/XiZi-cortex-m3-emulator.elf
elif [ "$1" == "arm" ]; then
make BOARD=hc32f4a0 distclean
make BOARD=hc32f4a0 menuconfig
make BOARD=hc32f4a0
else
echo "Invalid input. Please provide as an argument."
fi