- 论坛徽章:
- 0
|
回复 4# 井蛙夏虫
其实我并没有手动链接系统的库,LIBS这些全是我自己写的应用程序的库,它会不会自己链接系统的库啊,我再自己查查,谢谢
LIBS = stm32lib/STM32F10x_StdPeriph_Driver/src/libstm32_StdPeriph.a
LIBS += ucOS/uCOS-III/Source/libuCOSIII.a
LIBS += user/app/src/libapp.a
LIBS += user/drv/src/libdrv.a
LIBS += ucOS/uC-CPU/libuC_CPU.a
LIBS += ucOS/uCOS-III/Ports/libuCOSIII_Ports.a
LIBS += stm32lib/CMSIS/DeviceSupport/libDeviceSupport.a
LIBS += stm32lib/CMSIS/CoreSupport/libCoreSupport.a
LIBS := $(addprefix $(obj),$(LIBS))
CC = arm-none-eabi-gcc
MAIN_OUT = main
MAIN_OUT_ELF = $(MAIN_OUT).elf
LDFLAGS = -Wl,--gc-sections,-Map=$@.map,-cref,-u,Reset_Handler -T stm32f10x_flash_extsram.ld
all: $(obj)$(MAIN_OUT_ELF)
$(obj)$(MAIN_OUT_ELF): $(LIBS)
$(LD) $(LDFLAGS) -Wl,--whole-archive -Wl,--start-group $(LIBS) -Wl,--end-group -Wl,-no-whole-archive --output $@
|
|