Renamed files
parent
a1f0b29641
commit
ac07e6b34f
@ -1,15 +0,0 @@
|
||||
OPENCM3_DIR = /home/ledoian/Development/STM32/libopencm3/libopencm3
|
||||
#OPENCM3_DIR = /home/ledoian/libopencm3-examples/libopencm3-examples/libopencm3
|
||||
|
||||
EXAMPLE_DIR = /home/ledoian/Development/STM32/libopencm3-examples/libopencm3-examples/examples/stm32/f1/stm32vl-discovery
|
||||
#EXAMPLE_DIR = /home/ledoian/libopencm3-examples/libopencm3-examples/examples/stm32/f1/stm32vl-discovery
|
||||
|
||||
%.o: %.c
|
||||
arm-none-eabi-gcc -Os -g -Wextra -fno-common -ffunction-sections -fdata-sections -MD -Wall -Wundef -I $(OPENCM3_DIR)/include -D STM32F1 -mthumb -mcpu=cortex-m3 -msoft-float -mfix-cortex-m3-ldrd -c $*.c -o $*.o
|
||||
|
||||
%.elf: %.o
|
||||
arm-none-eabi-gcc --static -nostartfiles -L $(OPENCM3_DIR)/lib -T $(EXAMPLE_DIR)/stm32vl-discovery.ld -Wl,-Map=$*.map -Wl,--gc-sections -mthumb -mcpu=cortex-m3 -msoft-float -mfix-cortex-m3-ldrd $*.o -l opencm3_stm32f1 -Wl,--start-group -lc -lgcc -lnosys -Wl,--end-group -o $*.elf
|
||||
|
||||
%.bin: %.elf
|
||||
arm-none-eabi-objcopy -Obinary $*.elf $*.bin
|
||||
|
@ -0,0 +1,19 @@
|
||||
TARGET = main
|
||||
GCCFLAGS = -L../../libopencm3/libopencm3/include -DSTM32F1
|
||||
LIBS = ../../libopencm3/libopencm3/lib/libopencm3_stm32f1.a
|
||||
|
||||
.DEFAULT: compile link
|
||||
|
||||
.PHONY: compile flash all link
|
||||
|
||||
all: compile link flash
|
||||
|
||||
compile: $(TARGET).o
|
||||
|
||||
%.o: %.c
|
||||
arm-none-eabi-gcc -c $(GCCFLAGS) $*.c -o $*.o
|
||||
|
||||
link: $(TARGET).bin
|
||||
|
||||
%.bin: %.o $(LIBS)
|
||||
arm-none-eabi-gcc $^ -o $*.bin
|
Loading…
Reference in New Issue