⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 makefile

📁 介绍ROCK OS操作系统.一般用于汽车电子,类似OCVX.里面是个DEMO文档,内附说明.
💻
字号:
#------------------------------------------------------------
#
#	makefile     : To build the Rock-OS source code tree.
#   Author       : sunxinqiu
#	Date         : 2005-06-30
#
# 	Description  : 
# 	    This makefile is the main makefile for build the whole source code tree. 
#
#------------------------------------------------------------
ifeq ($(ROOT_DIR), )
env_err:
	@echo Error: must define ROOT_DIR environment variable.
endif

ifeq ($(BOARD), )
env_err:
	@echo Error: must define BOARD environment variable to indicate the BSP directory.
endif

ifeq ($(ROM_BASE_ADDR),)
env_err:
	@echo Error: must define ROM_BASE_ADDR environment variable.
endif

ifeq ($(RAM_BASE_ADDR),)
env_err:
	@echo Error: must define RAM_BASE_ADDR environment variable.
endif
RM = remove
LD = armlink
BINARY = fromelf -m32

PRJ_DIR = $(ROOT_DIR)

EXECUTABLE   := rockos
OBJS         := $(ROOT_DIR)/bsp/bsp.elf  \
                $(ROOT_DIR)/core/core.elf

ifeq ($(ROCK_SHELL), YES)
OBJS += $(ROOT_DIR)/shell/shell.elf
endif

OBJS += $(ROOT_DIR)/app/app.elf

LINK_OPT = -RO $(ROM_BASE_ADDR) -RW $(RAM_BASE_ADDR) -First bsp.elf(__ROM_ENTRY)
SELF_LINK_OPT = -info totals -symdefs $(EXECUTABLE).map

.PHONY : exe clean rebuild

exe:
	make -C $(ROOT_DIR)\bsp\$(BOARD)
	make -C $(ROOT_DIR)\core
ifeq ($(ROCK_SHELL), YES)
	make -C $(ROOT_DIR)\shell
endif
	make -C $(ROOT_DIR)\app
	$(LD) -o $(EXECUTABLE).axf $(LINK_OPT) $(SELF_LINK_OPT) $(OBJS)
	$(BINARY) -output $(EXECUTABLE).hex $(EXECUTABLE).axf

clean:
	$(RM) $(EXECUTABLE).axf $(EXECUTABLE).map $(EXECUTABLE).hex
	make -C $(ROOT_DIR)\bsp\$(BOARD) clean
	make -C $(ROOT_DIR)\core clean
ifeq ($(ROCK_SHELL), YES)
	make -C $(ROOT_DIR)\shell clean
endif
	make -C $(ROOT_DIR)\app clean

rebuild: clean exe

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -