代码拉取完成,页面将自动刷新
#--------------------------------------------------------------------------------------------------#
# TheaBoot #
# Copyright (c) 2018 YiQiChuang(ShanXi) Electronic Technology CO,LTD. #
# Copyright (c) 2012-2014 PX4 Development Team. #
# #
# This file is part of TheaBoot project. #
# #
# File : makeifle #
# Brief : #
# Author : Arthur Zheng #
# Email : 15034186698@163.com #
# Version : 1.1.0.0 #
# Date : 2018/07/15 #
# #
#--------------------------------------------------------------------------------------------------#
# Remark : #
#--------------------------------------------------------------------------------------------------#
# Change History : #
# <Date> | <Version> | <Author> | <Description> #
#--------------------------------------------------------------------------------------------------#
# 2017/01/27 | 1.0.0.0 | Arthur Zheng | Create file #
# 2018/07/15 | 1.1.0.0 | Arthur Zheng | Restyle the structure of project #
#--------------------------------------------------------------------------------------------------#
# Lisense : BSD 3-Clause #
# #
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR #
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND #
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR #
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR #
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR #
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY #
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR #
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE #
# POSSIBILITY OF SUCH DAMAGE. #
#--------------------------------------------------------------------------------------------------#
#---------------------------------------------------------------------------------------------------
# 路径设定
#---------------------------------------------------------------------------------------------------
export BUILD_DIR_ROOT ?= build
export BL_BASE ?= $(wildcard .)
export LIBOPENCM3 ?= $(wildcard libopencm3)
MKFLAGS=--no-print-directory
#---------------------------------------------------------------------------------------------------
# 工具链设定
#---------------------------------------------------------------------------------------------------
export CC = arm-none-eabi-gcc
export OBJCOPY = arm-none-eabi-objcopy
#---------------------------------------------------------------------------------------------------
# 公共配置
#---------------------------------------------------------------------------------------------------
export FLAGS = -std=gnu99 -Os -g -Wundef -Wall -fno-builtin -fgnu89-inline\
-I$(LIBOPENCM3)/include -ffunction-sections -nostartfiles\
-lnosys -Wl,-gc-sections -Wl,-g \
-Werror
export COMMON_SRCS = bl.c
export ARCH_SRCS = cdcacm.c usart.c
#---------------------------------------------------------------------------------------------------
# 构建对象
#---------------------------------------------------------------------------------------------------
TARGETS = \
STM32F103_WARSHIP_V2_0 \
STM32F429_DISCO
all: $(TARGETS) sizes
clean:
cd libopencm3 && make --no-print-directory clean && cd ..
rm -f *.elf *.bin *.hex
rm -rf build
#---------------------------------------------------------------------------------------------------
# 对象构建指令
#---------------------------------------------------------------------------------------------------
STM32F103_WARSHIP_V2_0: $(MAKEFILE_LIST) $(LIBOPENCM3)
make ${MKFLAGS} -f Makefile.f1 TARGET_HW=STM32F103_WARSHIP_V2_0 LINKER_FILE=stm32f1.ld TARGET_FILE_NAME=$@
STM32F429_DISCO: $(MAKEFILE_LIST) $(LIBOPENCM3)
make ${MKFLAGS} -f Makefile.f4 TARGET_HW=STM32F429_DISCO LINKER_FILE=stm32f4.ld TARGET_FILE_NAME=$@
#---------------------------------------------------------------------------------------------------
# libopencm3构建
#---------------------------------------------------------------------------------------------------
.PHONY: $(LIBOPENCM3)
$(LIBOPENCM3):
make -C $(LIBOPENCM3) lib
#---------------------------------------------------------------------------------------------------
# 显示文件大小
#---------------------------------------------------------------------------------------------------
.PHONY: sizes
sizes:
@-find build/*/ -name '*.elf' -type f | xargs size 2> /dev/null || :
#********* Copyright (C) 2018 YiQiChuang(ShanXi) Electronic Technology CO,LTD *****END OF FILE****#
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。