我有一个make文件,如下所示。我需要编译和链接链接文件gcc.ld和扩展名为.S的汇编文件。
有人能用正确的语法帮助我吗?
INCLUDE=-I ../../../_Include -I ../../../Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x -I ../../../Libraries/CMSIS/CM3/CoreSupport -I ../../../Libraries/STM32F10x_StdPeriph_Driver/inc -I ../../../BSP/STM32_EVAL -I../../../Libraries/STM32_USB-FS-Device_Driver/inc -I ../inc -I '../../../DataLink Layer' -I../../../ST7580_Layer
CC_ARGS=-D STM32F10X_MD -D USE_STDPERIPH_DRIVER -D USE_EVAL_ST7580 -DUSE_FULL_ASSERT
CC=arm-none-eabi-gcc
CC_FLAGS=-mcpu=cortex-m3 -mthumb -O1
LIBPATH=-L../../../Libraries/STM32F10x_StdPeriph_Driver/src -L../../../efsl/source/interface -L../../../Libraries/STM32_USB-FS-Device_Driver/src '-L../../../DataLink Layer'
LIBS=-ldatalink_layer -lstm32_usb-fs-device_driver -lstm32f10x_StdPeriph_Driver ../../../BSP/ST7580_EVAL/steval_ST7580.o -lstm32f10x_interface -lstm32f10x_StdPeriph_Driver -lc -lrdimon
OBJS = hw_config.o stm32f10x_it.o system_stm32f10x.o usb_desc.o usb_endp.o usb_istr.o usb_prop.o usb_pwr.o main.o
ALL:
$(CC) $(CC_FLAGS) $(INCLUDE) $(CC_ARGS) -c hw_config.c
$(CC) $(CC_FLAGS) $(INCLUDE) $(CC_ARGS) -c main.c
$(CC) $(CC_FLAGS) $(INCLUDE) $(CC_ARGS) -c stm32f10x_it.c
$(CC) $(CC_FLAGS) $(INCLUDE) $(CC_ARGS) -c system_stm32f10x.c
$(CC) $(CC_FLAGS) $(INCLUDE) $(CC_ARGS) -c usb_desc.c
$(CC) $(CC_FLAGS) $(INCLUDE) $(CC_ARGS) -c usb_endp.c
$(CC) $(CC_FLAGS) $(INCLUDE) $(CC_ARGS) -c usb_istr.c
$(CC) $(CC_FLAGS) $(INCLUDE) $(CC_ARGS) -c usb_prop.c
$(CC) $(CC_FLAGS) $(INCLUDE) $(CC_ARGS) -c usb_pwr.c
$(CC) $(CC_FLAGS) $(INCLUDE) $(CC_ARGS) -S startup_ARMCM3.S
$(CC) $(LIBPATH) $(OBJS) $(LIBS) ../../../ST7580_Layer/ST7580_Serial20.o -Wl,-Map,evalst7580.map -o evalst7580.elf
.PHONY: clean
清洁: rm -rf * .o * .a * .map * .elf