working code v1

This commit is contained in:
2025-02-05 00:06:56 +02:00
commit fb5ea9c3ec
3 changed files with 40 additions and 0 deletions

17
Makefile Normal file
View File

@@ -0,0 +1,17 @@
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