完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
本帖最后由 城东 于 2016-12-6 22:32 编辑
关于脚本的运行以及调用makefile之前的配置请看前文:https://bbs.elecfans.com/forum.ph ... &tid=1098353&extra= 上面说到运行脚本gen_misc.sh最后执行的make语句如下: make BOOT=$boot APP=$app SPI_SPEED=$spi_speed SPI_MODE=$spi_mode SPI_SIZE_MAP=$spi_size_map 其中参数的具体值如下: BOOT=new APP=1 SPI_SPEED=40 SPI_MODE=QIO SPI_SIZE_MAP=3 makefile才是编译最重要的一环,之前的都是起辅助作用,下面我们首先把makefile的内容贴出来,方便之后的分析: ############################################################# # Required variables for each makefile # Discard this section from all parent makefiles # Expected variables (with automatic defaults): # CSRCS (all "C" files in the dir) # SUBDIRS (all subdirs with a Makefile) # GEN_LIBS - list of libs to be generated () # GEN_IMAGES - list of object file images to be generated () # GEN_BINS - list of binaries to be generated () # COMPONENTS_xxx - a list of libs/objs in the form # subdir/lib to be extracted and rolled up into # a generated lib/image xxx.a () # TARGET = eagle #FLAVOR = release FLAVOR = debug #EXTRA_CCFLAGS += -u ifndef PDIR # { GEN_IMAGES= eagle.app.v6.out GEN_BINS= eagle.app.v6.bin SPECIAL_MKTARGETS=$(APP_MKTARGETS) SUBDIRS= user sample_lib driver endif # } PDIR LDDIR = $(SDK_PATH)/ld CCFLAGS += -Os TARGET_LDFLAGS = -nostdlib -Wl,-EL --longcalls --text-section-literals ifeq ($(FLAVOR),debug) TARGET_LDFLAGS += -g -O2 endif ifeq ($(FLAVOR),release) TARGET_LDFLAGS += -g -O0 endif COMPONENTS_eagle.app.v6 = user/libuser.a sample_lib/libsample.a driver/libdriver.a LINKFLAGS_eagle.app.v6 = -L$(SDK_PATH)/lib -Wl,--gc-sections -nostdlib -T$(LD_FILE) -Wl,--no-check-sections -u call_user_start -Wl,-static -Wl,--start-group -lminic -lgcc -lhal -lphy -lpp -ljson -lpwm -lnet80211 -lwpa -lcrypto -lmain -lfreertos -llwip -lespconn -lsmartconfig -letilink -lfac -lairkiss $(DEP_LIBS_eagle.app.v6) -Wl,--end-group DEPENDS_eagle.app.v6 = $(LD_FILE) $(LDDIR)/eagle.rom.addr.v6.ld ############################################################# # Configuration i.e. compile options etc. # Target specific stuff (defines etc.) goes in here! # Generally values applying to a tree are captured in the # makefile at its root level - these are then overridden # for a subtree within the makefile rooted therein # #UNIVERSAL_TARGET_DEFINES = # Other potential configuration flags include: # -DTXRX_TXBUF_DEBUG # -DTXRX_RXBUF_DEBUG # -DWLAN_CONFIG_CCX CONFIGURATION_DEFINES = -DICACHE_FLASH DEFINES += $(UNIVERSAL_TARGET_DEFINES) $(CONFIGURATION_DEFINES) DDEFINES += $(UNIVERSAL_TARGET_DEFINES) $(CONFIGURATION_DEFINES) ############################################################# # Recursion Magic - Don't touch this!! # # Each subtree potentially has an include directory # corresponding to the common APIs applicable to modules # rooted at that subtree. Accordingly, the INCLUDE PATH # of a module can only contain the include directories up # its parent path, and not its siblings # # Required for each makefile to inherit from the parent # INCLUDES := $(INCLUDES) -I $(PDIR)include sinclude $(SDK_PATH)/Makefile .PHONY: FORCE FORCE: |
|
相关推荐
|
|
只有小组成员才能发言,加入小组>>
[小e体验板] 【小体积大智慧】关于体验板的技术问题,看这一篇就够了
2881 浏览 4 评论
【小e1开发板试用体验】分析程序架构四~/Share/SDK/makefile分析
3648 浏览 1 评论
6767 浏览 19 评论
29276 浏览 59 评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-28 11:19 , Processed in 0.639717 second(s), Total 69, Slave 51 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号