📄 makefile
字号:
# *********************************************
# NAME: makefile
# DESC: makefile for 2442 8-bit loader
# HISTORY:
# 03.23.2002:purnnamu: first release
# 04.14.2003:DonGo: modifed for 2442.
# *********************************************
########################
# Options for make
# 1. OS_START_ADDR_OFFSET option
# -DOS_START_ADDR_OFFSET="SDRAM address offset to start code that copied from NAND"
# (ex) when PPC2003: -DOS_START_ADDR_OFFSET=0x02040000 ;start address:0x30204000
# (ex) when WINCE: -DOS_START_ADDR_OFFSET=0x00040000 ;start address:0x30040000
# 2. DOWNFILE_SIZE option
# - define nand flash download image size by bytes.
# if this value is not defined, the default value set about 31MB size(33000000).
# Refer 2442loader-8bit.c
# 3. COREVOLT_M100 option
# - define Max1718 regulator output voltage before run OS.
# - Regulator voltage range is 0.8V to 1.3V, but you can set only 1.1V, 1.3V, 1.35V, 1.2V becase of size.
# (ex) -DCOREVOLT_M100=120 ; 1.2V
# (ex) -DCOREVOLT_M100=130 ; 1.3V
##### File Definition ####
PRJ = 2442loader-1208
INIT= 2442init
#AM1 = 2442slib
#AM2 = k9s1208_s
CM1 = nand_mini
CM2 = 2442lib
#### Destination path Definition ####
OBJ=.\obj
ERR=.\err
#### ARM tool Definition ####
ARMLINK= armlink
ARMASM = armasm
ARMCC = armcc
#### Option Definition ####
#LFLAGS = -ro-base 0x30000000 -rw-base 0x33ff0000 -elf -map -xref -info totals -list list.txt -first $(INIT).o(Init)
LFLAGS = -ro-base 0x0 -elf -map -xref -info totals -list list.txt -first $(INIT).o(Init)
#LFLAGS = -scatter 2440.sc -elf -map -xref -info totals -list list.txt
AFLAGS = -li -apcs /noswst -cpu ARM920T
CFLAGS = -c -li -apcs /noswst -cpu ARM920T
#CFLAGS = -c -g- -li -apcs /noswst -cpu ARM920T \
# -DOS_START_ADDR_OFFSET=0x00000000 -DCOREVOLT_M100=120
#CFLAGS = -c -g- -li -apcs /noswst -cpu ARM920T \
# -DOS_START_ADDR_OFFSET=0x00000000 -DDOWNFILE_SIZE=0x200000 -DCOREVOLT_M100=120
#AFLAGS = -bi -apcs /noswst -cpu ARM920T
#CFLAGS = -c -g+ -bi -apcs /noswst -cpu ARM920T -DCPU=2442
#If you doesn't debug,use following CFLAGS for more faster operation.
#CFLAGS = -c -g- -li -apcs /noswst -cpu ARM920T
#### Object combine Definition ####
OBJS = $(OBJ)\$(INIT).o $(OBJ)\$(PRJ).o \
$(OBJ)\$(CM1).o $(OBJ)\$(CM2).o #$(OBJ)\$(AM1).o $(OBJ)\$(AM2).o
all: $(PRJ).axf
clean:
del $(OBJ)\*.o
del $(ERR)\*.err
del $(PRJ).axf
del $(PRJ).bin
$(PRJ).axf: $(OBJS)
$(ARMLINK) $(LFLAGS) -o $(PRJ).axf $(OBJS)
fromelf -nodebug -bin -output $(PRJ).bin $(PRJ).axf
# fromelf $(PRJ).axf -text/s syms.sym
# fromelf $(PRJ).axf -text/c symc.sym
#For SDT2.5 fromelf -nodebug -nozeropad $(PRJ).elf -bin $(PRJ).bin
#For ADS1.0 fromelf -nodebug -bin -output $(PRJ).bin $(PRJ).axf
$(OBJ)\$(PRJ).o : $(PRJ).c 2442addr.h 2442lib.h def.h option.h makefile
$(ARMCC) $(CFLAGS) $(PRJ).c -o $(OBJ)\$(PRJ).o -Errors $(ERR)\$(PRJ).err
$(OBJ)\$(INIT).o: $(INIT).s option.inc memcfg.inc 2442addr.inc makefile
$(ARMASM) $(AFLAGS) $(INIT).s -o $(OBJ)\$(INIT).o -Errors $(ERR)\$(INIT).err
$(OBJ)\$(AM1).o: $(AM1).s option.inc memcfg.inc 2442addr.inc makefile
$(ARMASM) $(AFLAGS) $(AM1).s -o $(OBJ)\$(AM1).o -Errors $(ERR)\$(AM1).err
$(OBJ)\$(AM2).o: $(AM2).s option.inc memcfg.inc 2442addr.inc makefile
$(ARMASM) $(AFLAGS) $(AM2).s -o $(OBJ)\$(AM2).o -Errors $(ERR)\$(AM2).err
$(OBJ)\$(CM1).o: $(CM1).c 2442addr.h 2442lib.h makefile
$(ARMCC) $(CFLAGS) $(CM1).c -o $(OBJ)\$(CM1).o -Errors $(ERR)\$(CM1).err
$(OBJ)\$(CM2).o: $(CM2).c 2442addr.h 2442lib.h makefile
$(ARMCC) $(CFLAGS) $(CM2).c -o $(OBJ)\$(CM2).o -Errors $(ERR)\$(CM2).err
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -