?? jnand.mak
字號(hào):
#============================================================================
# Name:
# jnand.mak
#
# Description:
# Makefile to build the JNAND software for all MSM targets
# MSM specfic information is defined in jnand.min
#
# Execution:
# To execute this make file execute the command line "make -f jnand.mak".
#
# Targets:
# Valid targets to build are: clean depend all test jnand.scl
#
#
# Copyright (c) 2001-2003 by QUALCOMM, Incorporated.
# All Rights Reserved.
#----------------------------------------------------------------------------
#============================================================================
#
# EDIT HISTORY FOR MODULE
#
# This section contains comments describing changes made to the module.
# Notice that changes are listed in reverse chronological order.
#
# $Header: //depot/asic/MSMSHARED/tools/jnand/jnand.mak#11 $ $DateTime: 2003/10/30 07:01:24 $ $Author: dionh $
#
# when who what, where, why
# -------- --- --------------------------------------------------------
# 10/29/03 drh Create scatterload file dynamically with CPP from template
# 10/23/03 drh Add DMSS Begin/End address to creation of JNAND_PARAM.CMM
# 08/29/03 drh Add comments about bad block finder test
# 08/27/03 drh Make building SELFTEST easier to configure and add an
# additional object from EFS2 NAND testframe.
# Do not compile in any of the test code in regular JNAND
# 07/25/03 drh Force rebuild of jnand_id.o every build
# 07/24/03 drh Change to get NAND drivers from DMSS services\efs
# Add new object for MSM specific functions
# 03/12/03 drh Added -DBUILD_JNAND to conditionally compile jnand.c
# 03/06/03 drh Removed a define that should not be on in production build
# 02/06/03 pg Moved from ASWP402 server to ASWP401 server.
# 10/03/02 drh Changed comments about how to use this file
# 07/25/02 drh Made default build non-debug and quiet
# 07/12/02 drh Added some lines to rule for creating JNAND_PARAM.CMM
# 07/09/02 drh Removed CPU type from jnand_param.cmm
# 07/06/02 drh Added rule to create jnand_param.cmm
# Added conditionals to make it easier to build test
# and non-test and quiet and noisy variants
# 07/05/02 drh Created. There are still some things left over from
# this file coming from ARMPRG, but we will leave them
# in for the time being until we know how we will take
# care of multiple architectures.
#
#============================================================================
#----------------------------------------------------------------------------
# Include MSM specific Make configuration file
# All MSM specific definitions should be in this hardware dependent file
#----------------------------------------------------------------------------
include jnand.min
# If ARM_CPU_TYPE is not defined, use a type which is supposedly compatible
# with both ARM7 and ARM9 processors. Later on, bitch about it
#
ifndef ARM_CPU_TYPE
ARM_CPU_TYPE=4T
endif
####################################################################
# Nothing below here should need to be changed for a different MSM
####################################################################
CC=tcc
ASM=armasm
LD=armlink
ASM_SCRIPT=asm.pl
#SHELL=bash.exe
MDEPEND_SCRIPT=mdepend.pl
GETDEP_SCRIPT=getdep.pl
REDIRECT_SCRIPT=redirect.pl
TARGET=jnand
JNANDPARAM=jnand_param.cmm
SCATTERFILE=jnand.scl
SCATTERFLAGS=-DJNAND_CODE_ADDR=$(JNAND_CODE_ADDR) \
-DJNAND_PARAM_ADDR=$(JNAND_PARAM_ADDR)
# Target options:
#
#----------------------------------------------------------------------------
EXE=elf
# Target executable format options:
# abs Genelink absolute-positioned binary format (Geneprobe)
# axe Paradigm Locate AXE86 format (Debug)
#
#----------------------------------------------------------------------------
#-- C code inference rules --------------------------------------------------
# Compiler options for code generation
# Do not change the "xs" order in /Oxs, as that removes the "s" option
#
# FLAGS are the compiler flags you want (without /DCUST_H) This needs
# to be separate so DIRCL can construct a special version of
# /DCUST_H
# CFLAGS The compile flags everyone EXCEPT DIRCL want.
#
#--------------------------------------------------------------------
# New CFLAGS for ARM
#--------------------------------------------------------------------
# Compiler flag options:
# -c compile only
# -fK use Kernighan and Ritchie search rules for locating include files
# -fl
# -ffa
# -fz in-line SWI may overwrite contents of link register
# -ez suppress errors resulting from zero-length array
# -za0 LDR may not access word aligned addresses
# -zpi1 Emulate #pragma with -i1, include only once
# -zpe1 Emulate #pragma with -e1, continue after hash error
# -apcs 3/32bit/nofp/$(REENT)/$(FPTYPE)/$(INTERWORK)/$(STACK_CHECK)
# 32-bit APCS
# Do not use frame pointer
# Re-entrant or
# Non-rentrant APCS
# Compile code for ARM/Thumb Interworking
# SW Stack checking enabled/disabled
# -g generate extended debug information for Codeview/Debug
# -$(ENDIAN) Select little or big endian, we use little endian
# -I Additional search path directories set to "."
# -DMSG_LEVEL=MSG_LVL_LOW set MSG_* level to LOW
# =MSG_LVL_MED set MSG_* level to MEDIUM
# =MSG_LVL_HIGH set MSG_* level to HIGH
# =MSG_LVL_ERR set MSG_* level to ERROR
# =MSG_LVL_FATAL set MSG_* level to ERROR_FATAL
# -DT_ARM ARM Target
# -DT_MSM3 MSM3000 ASIC
# -DT_MSM5000 MSM5000 ASIC
# -DT_MSM31 MSM3000 ASIC
# -DDEBUG Enable Debug
# -DERR_DEBUG Enable Error Debug
# -DTIMETEST enable profiling output (test)
# -DSHOW_STAT make LOCAL work as global scope, for debug
# -DDBG override device protection in DIAG
# -DLIFETEST Build with factory lifetest
#
#----------------------------------------------------------------------------
# optimize options
# -O2 = full optimize
# -Ospace = optimize for smallest code space
# -O0 = no optimize
#
#OPT_FLAGS=-O0 # this is NO optimization
OPT_FLAGS=-Ospace -O2 #this is the default
DMSS_CFLAGS=-DT_ARM $(MSM_TYPE_CFLAGS)
# EXTRAINC=-I$(DMSSINC)
#########################################################################
#
# Table of definitions:
#
# UNIX_UNIT_TEST turns off inclusion of real NAND headers
# should only be used on UNIX build
#
# DEBUG_LOGIC Turns on checking for off by one logic problems
#
# NOISY Turns on print statements in main code body
#
# TNOISY Turns on print statements in self test code
# 0 = Announcement and errors only
# 1 = very quiet
# 2 = verbose
# 3 = extremely verbose
# 6 = you don't want to think about it unless you
# are into serious debugging of the code
#
# SELF_TEST Compiles in self test code
#
# RUN_BASIC_TEST Runs merely a simple write and read/verify page
# test. Must have SELF_TEST also defined.
#
# SKIP_BLOCK Simulates a bad block in flash when using
# file based NAND simulator device driver.
# Defines which block to skip
#
# NOTE: It *is* valid to compile with SELF_TEST turned on and
# both NOISY and TNOISY turned off. This will produce
# a JNAND binary that will not only do self test, but will
# also do production downloads as well. Although, there will
# be no debug output to the JTAG debugger terminal window
# while doing self test.
#
# NOTE2: Production code should never be produced with NOISY or
# TNOISY turned on. When this is run, the FLASH.* function
# of the JTAG ICD will collide with the terminal emulation
# output, and the result will be that the execution will
# hang in term_put() forever
#
#########################################################################
#TEST JKMIN
COMMON_DEFINES=
#COMMON_DEFINES= -DNOISY -DTNOISY=3
#-DDEBUG_BOOT
#-DSELF_TEST_BOOT
#----------------------------------------------------------------------------
#
# Set USES_PRINTF to "YES" to build and use printf() as part of binary
# Any value other than exactly "YES" will not build in printf() or use of it
#
# Independent of test code, but if test NOISY is set, this will be
# automatically turned on for you
#----------------------------------------------------------------------------
#TEST JKMIN
USES_PRINTF=NO
#USES_PRINTF=YES
#----------------------------------------------------------------------------
# TEST CODE GENERATION OPTIONS FLAGS
#
# Set BUILD_SELF_TEST to "YES" to build self test code as part of binary
# Set BUILD_NOISY_SELF_TEST to "YES" to build self test code with prints
# Any value other than exactly "YES" will not build in test code or noisy
#
# TEST_CHOICES selects which of three types of tests to run
#
# RUN_BASIC_TEST tests one operation each of NAND driver read, write
# and erase
#
# RUN_NAND_DRIVER_TEST tests all blocks in a device for erase, read,
# and write, and will loop forever
#
# RUN_JNAND_TEST tests the actual functioning of JNAND, not the
# NAND drivers in particular
#
# RUN_BAD_FINDER turns the binary into a bad block finder and
# reporter, nothing else. Must also define
# RUN_NAND_DRIVER_TEST to run this test
#
# These tests should be compiled up and run in the order listed above.
# If BASIC does not work, then DRIVER will fail. If DRIVER is not
# reliable over the whole part, then JNAND will most likely fail
#
# Define only one of these. If you make a mistake, the C code will catch
# it and fail to compile at all.
#
#----------------------------------------------------------------------------
BUILD_SELF_TEST=NO
BUILD_NOISY_SELF_TEST=NO
TEST_CHOICES=-DRUN_BAD_FINDER -DRUN_NAND_DRIVER_TEST
ifeq '$(BUILD_SELF_TEST)' 'YES'
ifeq '$(BUILD_NOISY_SELF_TEST)' 'YES'
NOISYLEVEL=3
SKIP=-DSKIP_BLOCK=3
NOISY=-DNOISY -DTNOISY=$(NOISYLEVEL)
EXTRA_DEFINES=$(COMMON_DEFINES) -DSELF_TEST $(NOISY) $(SKIP) \
$(TEST_CHOICES)
else
SKIP=-DSKIP_BLOCK=3
EXTRA_DEFINES=$(COMMON_DEFINES) -DSELF_TEST $(SKIP) $(TEST_CHOICES)
endif
else
EXTRA_DEFINES=$(COMMON_DEFINES)
endif
ifeq '$(BUILD_NOISY_SELF_TEST)' 'YES'
PRINT_DEFINES=-DCOMPILE_PRINTF
USES_PRINTF=YES
endif
ifeq '$(USES_PRINTF)' 'YES'
PRINT_DEFINES=-DCOMPILE_PRINTF
endif
CFLAGS = -c -I. $(EXTRAINC) -cpu $(ARM_CPU_TYPE) -apcs /noswst/interwork \
-littleend -fa -g -dwarf2 -Wb $(OPT_FLAGS) -zo -DBUILD_JNAND \
$(EXTRA_DEFINES) $(PRINT_DEFINES)
OBJ_CMD=-o
#----------------------------------------------------------------------------
# Assembler flag options:
#
# -arch ARM Architecture type 4
# -apcs 3/32bit$(APCSA)/$(STACK_CHECK)
# 32-bit APCS
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -