18 lines
591 B
Makefile
18 lines
591 B
Makefile
|
CROSS_COMPILE = arm-none-eabi-
|
||
|
|
||
|
build: start.S
|
||
|
$(CROSS_COMPILE)gcc -x assembler-with-cpp -c -O0 -g3 -mcpu=cortex-m4 -mthumb -Wall -o start.o start.S
|
||
|
$(CROSS_COMPILE)gcc start.o -mcpu=cortex-m4 -mthumb -Wall --specs=nosys.specs -nostdlib -lgcc -T./ldscript.ld -o start.elf
|
||
|
$(CROSS_COMPILE)objcopy -O binary -F elf32-littlearm start.elf start.bin
|
||
|
|
||
|
qemu: build
|
||
|
qemu-system-gnuarmeclipse --verbose --verbose --board STM32F4-Discovery \
|
||
|
--mcu STM32F407VG -d unimp,guest_errors \
|
||
|
--semihosting-config enable=on,target=native -s -S \
|
||
|
--image start.bin
|
||
|
|
||
|
clean:
|
||
|
rm *.o
|
||
|
rm *.elf
|
||
|
rm *.bin
|