From 7211bd49452e67e0b53ea06ca474f4e54af991ae Mon Sep 17 00:00:00 2001 From: xengineering Date: Sat, 25 Sep 2021 15:47:25 +0200 Subject: Implement Linker Script and Startup File --- Makefile | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..4ef61dd --- /dev/null +++ b/Makefile @@ -0,0 +1,12 @@ + +.PHONY: all clean + +all: + mkdir build + arm-none-eabi-gcc -O0 -c -g -mcpu=cortex-m3 -mthumb -o build/test_program.o src/test_program.c + arm-none-eabi-gcc -O0 -c -g -mcpu=cortex-m3 -mthumb -o build/startup.o src/startup.c + arm-none-eabi-ld -Tld/stm32.ld -o build/test_program.elf build/startup.o build/test_program.o + arm-none-eabi-objcopy -O binary build/test_program.elf build/test_program.bin + +clean: + rm -rf build -- cgit v1.2.3-70-g09d2