working code v1
This commit is contained in:
commit
fb5ea9c3ec
|
@ -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
|
|
@ -0,0 +1,7 @@
|
||||||
|
MEMORY
|
||||||
|
{
|
||||||
|
FLASH ( rx ) : ORIGIN = 0x08000000, LENGTH = 1M
|
||||||
|
RAM ( rwx ) : ORIGIN = 0x20000000, LENGTH = 128K
|
||||||
|
}
|
||||||
|
|
||||||
|
__stack_start = ORIGIN(RAM) + LENGTH(RAM);
|
Loading…
Reference in New Issue