代码拉取完成,页面将自动刷新
# Initialize variables for nonrecursive make
programs :=
sources :=
libraries :=
objects = $(patsubst %.c,%.o,$(sources))
dependencies = $(patsubst %.c,%.d,$(sources))
# Define header file and library directories
include_dirs := app/inc
include_dirs += app/inc/periphs
include_dirs += lib/CMSIS/Include
include_dirs += lib/CMSIS/Device/ST/STM32F4xx/Include
include_dirs += lib/STM32F4xx_StdPeriph_Driver/inc
include_dirs += lib/CANopen/inc
include_dirs += lib/CANopen/inc/STM32
library_dirs := lib
vpath %.h $(include_dirs)
# Define toolchains and build options
AR := ar
SED := sed
CP := cp
MV := mv
RM := rm -f
CC := arm-none-eabi-gcc
LD := arm-none-eabi-gcc
OBJCOPY := arm-none-eabi-objcopy
CFLAGS := -O0 #-Werror
CFLAGS += -mlittle-endian -mthumb -mcpu=cortex-m4 -fsingle-precision-constant
CFLAGS += -mthumb-interwork -mfloat-abi=hard -mfpu=fpv4-sp-d16
CFLAGS += -DUSE_STDPERIPH_DRIVER -DSTM32F4XX
CFLAGS += -DMANGUSTA_DISCOVERY -DHSE_VALUE=8000000
LDFLAGS := -fno-exceptions -ffunction-sections -fdata-sections
LDFLAGS += -nostartfiles -Wl,--gc-sections -Tstm32_flash.ld
ARFLAGS := rcv
IPATHS = $(addprefix -I,$(include_dirs))
LPATHS = $(addprefix -L,$(library_dirs))
# Include make modules
all:
include lib/CANopen/module.mk
include lib/STM32F4xx_StdPeriph_Driver/module.mk
include app/module.mk
ifneq "$(MAKECMDGOALS)" "clean"
-include $(dependencies)
endif
# Define additional rules
all: $(programs)
#l_ankle l_knee l_hip r_ankle r_knee r_hip teststand: clean
# cd app/inc && \
# rm -f config.h && \
# ln -s ../../target/$@/config.h . && \
# cd ../..
# cd app/src/mechanics && \
# rm -f mechanics.c && \
# ln -s ../../../target/$@/mechanics.c . && \
# cd ../../..
libraries: $(libraries)
clean:
$(RM) $(programs) app/src/*.o app/src/*.d app/src/*~ \
./*~ app/*~
realclean: clean
$(RM) $(libraries) $(objects) $(dependencies)
%.o: %.c
$(CC) -c $(CFLAGS) $(IPATHS) $< -o $@
%.d: %.c
$(CC) $(CFLAGS) $(IPATHS) -M $< | \
$(SED) 's,\($(notdir $*)\.o\) *:,$(dir $@)\1 $@: ,' > $@.tmp
$(MV) $@.tmp $@
.PHONY: all libraries clean realclean
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。