]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - keystone-rtos/mcsdk-tools.git/commitdiff
Added makefile support for writer utilities
authorHao Zhang <hzhang@ti.com>
Wed, 15 Jun 2011 20:29:39 +0000 (16:29 -0400)
committerHao Zhang <hzhang@ti.com>
Wed, 15 Jun 2011 20:29:39 +0000 (16:29 -0400)
writer/eeprom/docs/README.txt
writer/eeprom/evmc6678l/Makefile [new file with mode: 0644]
writer/eeprom/evmc6678l/eepromwriter.cmd [moved from writer/eeprom/evmc6678l/eepormwriter.cmd with 100% similarity]
writer/nand/docs/README.txt
writer/nand/evmc6670l/Makefile [new file with mode: 0644]
writer/nand/evmc6678l/Makefile [new file with mode: 0644]
writer/nor/docs/README.txt
writer/nor/evmc6670l/Makefile [new file with mode: 0644]
writer/nor/evmc6678l/Makefile [new file with mode: 0644]

index ba45959da5de79f8fdb818267ce04217977fac11..bdcc488b56016d9c4ddfd55730421bfbf95b7227 100644 (file)
@@ -35,12 +35,40 @@ Steps to program the EEPROM:
 
 Steps to re-build eepromwriter:
 
 
 Steps to re-build eepromwriter:
 
-1. Import the eepromwriter CCS project from writer\eeprom\evmc66xxl directory (in CCSv5, Project->Import Existing CCS/
+1. Uses CCS to build eepromwriter:
+   * Import the eepromwriter CCS project from writer\eeprom\evmc66xxl directory (in CCSv5, Project->Import Existing CCS/
    CCE Eclipse Projects).
    CCE Eclipse Projects).
-
-2. Clean and build the eepromwriter project.
-
-3. After the project build is completed, eepromwriter_evm66xxl.out and eepromwriter_evm66xxl.map will be generated under 
-   writer\eeprom\evmc66xxl\bin directory.
+   * Clean and build the eepromwriter project.
+   * After the project build is completed, eepromwriter_evm66xxl.out and eepromwriter_evm66xxl.map will be generated under 
+     writer\eeprom\evmc66xxl\bin directory.
+
+2. Uses Makefile to build eepromwriter:
+   NOTE FOR BUILDING ON WINDOWS ENVIRONMENT: For building on windows environment GNU utilities like
+   "make" would be required. The following build procedure should also work on MINGW-MSYS Bourne shell.
+
+    Before starting the build following environment setup has to be done 
+    1) variable C_DIR should be set to the top directory of the Code Generation tools e.g.
+       Linux bash shell: 
+          export C_DIR=/opt/TI/TI_CGT_C6000_7.2.0A10232/
+       MSYS bash shell: 
+          export C_DIR='"C:/Program Files/Texas Instruments/ccsv5/tools/compiler/c6000"'
+    2) Code Generation tool binaries should be in the path e.g.
+       Linux bash shell: 
+          export PATH=/opt/TI/TI_CGT_C6000_7.2.0A10232/bin:$PATH
+       MSYS bash shell: 
+          export PATH=$PATH:/c/Program\ Files/Texas\ Instruments/ccsv5/tools/compiler/c6000/bin/
+    3) variable PFORM_LIB_DIR should be set the directory of the Platform Library root, e.g.
+       Linux bash shell: 
+          export PFORM_LIB_DIR=pdk_C6670_1_0_0_10-rc1/packages/ti/platform
+       MSYS bash shell: 
+          export PFORM_LIB_DIR='"C:/Program Files/Texas Instruments/pdk_C6670_1_0_0_10-rc1/packages/ti/platform"'
+
+    The makefile for building the eepromwriter is in the directory "tools/writer/eeprom/evmc66xxl"
+    Following are the steps to build eepromwriter, e.g.:
+    cd tools/writer/eeprom/evmc66xxl
+    make DEVICE=<device number>
+        supported device numbers are 
+            C6678
+            C6670
 
 Please refer to BIOS MCSDK 2.0 User's Guide (http://processors.wiki.ti.com/index.php/BIOS_MCSDK_2.0_User_Guide) for more details.
\ No newline at end of file
 
 Please refer to BIOS MCSDK 2.0 User's Guide (http://processors.wiki.ti.com/index.php/BIOS_MCSDK_2.0_User_Guide) for more details.
\ No newline at end of file
diff --git a/writer/eeprom/evmc6678l/Makefile b/writer/eeprom/evmc6678l/Makefile
new file mode 100644 (file)
index 0000000..aca05b4
--- /dev/null
@@ -0,0 +1,81 @@
+# Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
+
+CC = cl6x
+CLIB_INC = $(C_DIR)/include
+STRIP = strip6x
+PRELINK = prelink6x
+
+HOST_PRFX = C60
+HOST_EXT = 6x
+
+AS = cl6x
+ifeq ($(DEVICE),C6670)
+DEVICE_NUM = 6670
+C_OPTS = -DDEVICE=6670 ## Turbo Nyquist 
+C_OPTS += -mv6600  
+A_OPTS += -mv6600
+else
+ifeq ($(DEVICE),C6678)
+DEVICE_NUM = 6678
+C_OPTS = -DDEVICE=6678 ## Shannon 
+C_OPTS += -mv6600  
+A_OPTS += -mv6600
+else
+DEFAULT:
+       @echo "Device '$(DEVICE)' not supported"
+       @exit 1
+endif
+endif
+
+TARGET_NAME = bin/eepromwriter_evm$(DEVICE_NUM)l.out
+
+C_OPTS += -g ## Enable debugging  
+C_OPTS += -ss ## interlist C source and optimizer with .asm source
+C_OPTS += -ml3  ## Far memory model
+C_OPTS += -k  ## Keep .asm files
+ifeq ($(ENDIAN),big)
+C_OPTS+= -me ## Big Endian
+endif
+C_OPTS += -pds67
+C_OPTS += --abi=elfabi
+ifeq ($(ENDIAN),big)
+A_OPTS += -me
+endif
+A_OPTS += --abi=elfabi
+OUTPUT_FILE_OPTION = --output_file
+LNK_OPTS += -z eepromwriter.cmd -m bin/eepromwriter_evm$(DEVICE_NUM)l.map --dynamic
+LNK_OPTS += -l $(C_DIR)/lib/rts6600_elf.lib
+LNK_OPTS += -l $(PFORM_LIB_DIR)/evmc$(DEVICE_NUM)l/platform_lib/lib/debug/ti.platform.evm$(DEVICE_NUM)l.ae66
+LNK_OPTS += --reread_libs --rom_model
+
+OBJ_DIR = obj
+PFORM_LIB_INC = $(PFORM_LIB_DIR) 
+SRCDIR = ../src
+
+SRC_FILES = eepromwriter.c 
+
+VPATH = $(SRCDIR)
+INCL = -I $(CLIB_INC) $(patsubst %,-I%,$(VPATH)) -I $(PFORM_LIB_DIR) -I ../include
+
+OBJS = $(patsubst %.c,$(OBJ_DIR)/%.obj,$(filter %.c, $(SRC_FILES)))
+OBJS += $(patsubst %.s,$(OBJ_DIR)/%.obj,$(filter %.s, $(SRC_FILES)))
+
+all: $(TARGET_NAME)
+
+$(TARGET_NAME): $(OBJS) eepromwriter.cmd
+       $(CC) $(C_OPTS) $(OBJS) $(LNK_OPTS) -o $@ 
+
+$(OBJ_DIR)/%.obj: %.c $(HEADERS) $(OBJ_DIR)/.created
+       $(CC) -c $(C_OPTS) $(INCL) $(DEFINE_TARGET) $< $(OUTPUT_FILE_OPTION) $@
+
+$(OBJ_DIR)/%.obj: %.s $(HEADERS) $(OBJ_DIR)/.created
+       $(CC) -c $(A_OPTS) $(DEFINE_TARGET) $< $(OUTPUT_FILE_OPTION) $@
+
+$(OBJ_DIR)/.created:
+       mkdir -p $(OBJ_DIR)
+       touch $(OBJ_DIR)/.created
+
+clean:
+       -rm -rf $(OBJ_DIR)
+       -rm -rf *.asm
+
index 2ec43204a71ec1cba44619624538955f85a91eec..709263e07329dd95f7d29940572fdef2daa54fec 100644 (file)
@@ -33,12 +33,40 @@ Steps to program the NAND:
 
 Steps to re-build nandwriter:
 
 
 Steps to re-build nandwriter:
 
-1. Import the nandwriter CCS project from writer\nand\evmc66xxl directory (in CCSv5, Project->Import Existing CCS/
+1. Uses CCS to build nandwriter:
+   * Import the nandwriter CCS project from writer\nand\evmc66xxl directory (in CCSv5, Project->Import Existing CCS/
    CCE Eclipse Projects).
    CCE Eclipse Projects).
-
-2. Clean and build the nandwriter project.
-
-3. After the project build is completed, nandwriter_evm66xxl.out and nandwriter_evm66xxl.map will be generated under 
-   writer\nand\evmc66xxl\bin directory.
+   * Clean and build the nandwriter project.
+   * After the project build is completed, nandwriter_evm66xxl.out and nandwriter_evm66xxl.map will be generated under 
+     writer\nand\evmc66xxl\bin directory.
+
+2. Uses Makefile to build nandwriter:
+   NOTE FOR BUILDING ON WINDOWS ENVIRONMENT: For building on windows environment GNU utilities like
+   "make" would be required. The following build procedure should also work on MINGW-MSYS Bourne shell.
+
+    Before starting the build following environment setup has to be done 
+    1) variable C_DIR should be set to the top directory of the Code Generation tools e.g.
+       Linux bash shell: 
+          export C_DIR=/opt/TI/TI_CGT_C6000_7.2.0A10232/
+       MSYS bash shell: 
+          export C_DIR='"C:/Program Files/Texas Instruments/ccsv5/tools/compiler/c6000"'
+    2) Code Generation tool binaries should be in the path e.g.
+       Linux bash shell: 
+          export PATH=/opt/TI/TI_CGT_C6000_7.2.0A10232/bin:$PATH
+       MSYS bash shell: 
+          export PATH=$PATH:/c/Program\ Files/Texas\ Instruments/ccsv5/tools/compiler/c6000/bin/
+    3) variable PFORM_LIB_DIR should be set the directory of the Platform Library root, e.g.
+       Linux bash shell: 
+          export PFORM_LIB_DIR=pdk_C6670_1_0_0_10-rc1/packages/ti/platform
+       MSYS bash shell: 
+          export PFORM_LIB_DIR='"C:/Program Files/Texas Instruments/pdk_C667x_1_0_0_10-rc1/packages/ti/platform"'
+
+    The makefile for building the nandwriter is in the directory "tools/writer/nand/evmc66xxl"
+    Following are the steps to build nandwriter, e.g.:
+    cd tools/writer/nand/evmc66xxl
+    make DEVICE=<device number>
+        supported device numbers are 
+            C6678
+            C6670
 
 Please refer to BIOS MCSDK 2.0 User's Guide (http://processors.wiki.ti.com/index.php/BIOS_MCSDK_2.0_User_Guide) for more details.
\ No newline at end of file
 
 Please refer to BIOS MCSDK 2.0 User's Guide (http://processors.wiki.ti.com/index.php/BIOS_MCSDK_2.0_User_Guide) for more details.
\ No newline at end of file
diff --git a/writer/nand/evmc6670l/Makefile b/writer/nand/evmc6670l/Makefile
new file mode 100644 (file)
index 0000000..060788c
--- /dev/null
@@ -0,0 +1,81 @@
+# Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
+
+CC = cl6x
+CLIB_INC = $(C_DIR)/include
+STRIP = strip6x
+PRELINK = prelink6x
+
+HOST_PRFX = C60
+HOST_EXT = 6x
+
+AS = cl6x
+ifeq ($(DEVICE),C6670)
+DEVICE_NUM = 6670
+C_OPTS = -DDEVICE=6670 ## Turbo Nyquist 
+C_OPTS += -mv6600  
+A_OPTS += -mv6600
+else
+ifeq ($(DEVICE),C6678)
+DEVICE_NUM = 6678
+C_OPTS = -DDEVICE=6678 ## Shannon 
+C_OPTS += -mv6600  
+A_OPTS += -mv6600
+else
+DEFAULT:
+       @echo "Device '$(DEVICE)' not supported"
+       @exit 1
+endif
+endif
+
+TARGET_NAME = bin/nandwriter_evm$(DEVICE_NUM)l.out
+
+C_OPTS += -g ## Enable debugging  
+C_OPTS += -ss ## interlist C source and optimizer with .asm source
+C_OPTS += -ml3  ## Far memory model
+C_OPTS += -k  ## Keep .asm files
+ifeq ($(ENDIAN),big)
+C_OPTS+= -me ## Big Endian
+endif
+C_OPTS += -pds67
+C_OPTS += --abi=elfabi
+ifeq ($(ENDIAN),big)
+A_OPTS += -me
+endif
+A_OPTS += --abi=elfabi
+OUTPUT_FILE_OPTION = --output_file
+LNK_OPTS += -z nandwriter.cmd -m bin/nandwriter_evm$(DEVICE_NUM)l.map --dynamic
+LNK_OPTS += -l $(C_DIR)/lib/rts6600_elf.lib
+LNK_OPTS += -l $(PFORM_LIB_DIR)/evmc$(DEVICE_NUM)l/platform_lib/lib/debug/ti.platform.evm$(DEVICE_NUM)l.ae66
+LNK_OPTS += --reread_libs --rom_model
+
+OBJ_DIR = obj
+PFORM_LIB_INC = $(PFORM_LIB_DIR) 
+SRCDIR = ../src
+
+SRC_FILES = nandwriter.c 
+
+VPATH = $(SRCDIR)
+INCL = -I $(CLIB_INC) $(patsubst %,-I%,$(VPATH)) -I $(PFORM_LIB_DIR) -I ../include
+
+OBJS = $(patsubst %.c,$(OBJ_DIR)/%.obj,$(filter %.c, $(SRC_FILES)))
+OBJS += $(patsubst %.s,$(OBJ_DIR)/%.obj,$(filter %.s, $(SRC_FILES)))
+
+all: $(TARGET_NAME)
+
+$(TARGET_NAME): $(OBJS) nandwriter.cmd
+       $(CC) $(C_OPTS) $(OBJS) $(LNK_OPTS) -o $@ 
+
+$(OBJ_DIR)/%.obj: %.c $(HEADERS) $(OBJ_DIR)/.created
+       $(CC) -c $(C_OPTS) $(INCL) $(DEFINE_TARGET) $< $(OUTPUT_FILE_OPTION) $@
+
+$(OBJ_DIR)/%.obj: %.s $(HEADERS) $(OBJ_DIR)/.created
+       $(CC) -c $(A_OPTS) $(DEFINE_TARGET) $< $(OUTPUT_FILE_OPTION) $@
+
+$(OBJ_DIR)/.created:
+       mkdir -p $(OBJ_DIR)
+       touch $(OBJ_DIR)/.created
+
+clean:
+       -rm -rf $(OBJ_DIR)
+       -rm -rf *.asm
+
diff --git a/writer/nand/evmc6678l/Makefile b/writer/nand/evmc6678l/Makefile
new file mode 100644 (file)
index 0000000..060788c
--- /dev/null
@@ -0,0 +1,81 @@
+# Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
+
+CC = cl6x
+CLIB_INC = $(C_DIR)/include
+STRIP = strip6x
+PRELINK = prelink6x
+
+HOST_PRFX = C60
+HOST_EXT = 6x
+
+AS = cl6x
+ifeq ($(DEVICE),C6670)
+DEVICE_NUM = 6670
+C_OPTS = -DDEVICE=6670 ## Turbo Nyquist 
+C_OPTS += -mv6600  
+A_OPTS += -mv6600
+else
+ifeq ($(DEVICE),C6678)
+DEVICE_NUM = 6678
+C_OPTS = -DDEVICE=6678 ## Shannon 
+C_OPTS += -mv6600  
+A_OPTS += -mv6600
+else
+DEFAULT:
+       @echo "Device '$(DEVICE)' not supported"
+       @exit 1
+endif
+endif
+
+TARGET_NAME = bin/nandwriter_evm$(DEVICE_NUM)l.out
+
+C_OPTS += -g ## Enable debugging  
+C_OPTS += -ss ## interlist C source and optimizer with .asm source
+C_OPTS += -ml3  ## Far memory model
+C_OPTS += -k  ## Keep .asm files
+ifeq ($(ENDIAN),big)
+C_OPTS+= -me ## Big Endian
+endif
+C_OPTS += -pds67
+C_OPTS += --abi=elfabi
+ifeq ($(ENDIAN),big)
+A_OPTS += -me
+endif
+A_OPTS += --abi=elfabi
+OUTPUT_FILE_OPTION = --output_file
+LNK_OPTS += -z nandwriter.cmd -m bin/nandwriter_evm$(DEVICE_NUM)l.map --dynamic
+LNK_OPTS += -l $(C_DIR)/lib/rts6600_elf.lib
+LNK_OPTS += -l $(PFORM_LIB_DIR)/evmc$(DEVICE_NUM)l/platform_lib/lib/debug/ti.platform.evm$(DEVICE_NUM)l.ae66
+LNK_OPTS += --reread_libs --rom_model
+
+OBJ_DIR = obj
+PFORM_LIB_INC = $(PFORM_LIB_DIR) 
+SRCDIR = ../src
+
+SRC_FILES = nandwriter.c 
+
+VPATH = $(SRCDIR)
+INCL = -I $(CLIB_INC) $(patsubst %,-I%,$(VPATH)) -I $(PFORM_LIB_DIR) -I ../include
+
+OBJS = $(patsubst %.c,$(OBJ_DIR)/%.obj,$(filter %.c, $(SRC_FILES)))
+OBJS += $(patsubst %.s,$(OBJ_DIR)/%.obj,$(filter %.s, $(SRC_FILES)))
+
+all: $(TARGET_NAME)
+
+$(TARGET_NAME): $(OBJS) nandwriter.cmd
+       $(CC) $(C_OPTS) $(OBJS) $(LNK_OPTS) -o $@ 
+
+$(OBJ_DIR)/%.obj: %.c $(HEADERS) $(OBJ_DIR)/.created
+       $(CC) -c $(C_OPTS) $(INCL) $(DEFINE_TARGET) $< $(OUTPUT_FILE_OPTION) $@
+
+$(OBJ_DIR)/%.obj: %.s $(HEADERS) $(OBJ_DIR)/.created
+       $(CC) -c $(A_OPTS) $(DEFINE_TARGET) $< $(OUTPUT_FILE_OPTION) $@
+
+$(OBJ_DIR)/.created:
+       mkdir -p $(OBJ_DIR)
+       touch $(OBJ_DIR)/.created
+
+clean:
+       -rm -rf $(OBJ_DIR)
+       -rm -rf *.asm
+
index c62d59718320399c1cd5c6c2801f4a105a5c7820..f88787921a33d6594e187c60cf9bb788075d95b9 100644 (file)
@@ -34,12 +34,40 @@ Steps to program the NOR:
 
 Steps to re-build norwriter:
 
 
 Steps to re-build norwriter:
 
-1. Import the norwriter CCS project from writer\nor\evmc66xxl directory (in CCSv5, Project->Import Existing CCS/
+1. Uses CCS to build norwriter:
+   * Import the norwriter CCS project from writer\nor\evmc66xxl directory (in CCSv5, Project->Import Existing CCS/
    CCE Eclipse Projects).
    CCE Eclipse Projects).
-
-2. Clean and build the norwriter project.
-
-3. After the project build is completed, norwriter_evm66xxl.out and norwriter_evm66xxl.map will be generated under 
-   writer\nor\evmc66xxl\bin directory.
+   * Clean and build the norwriter project.
+   * After the project build is completed, norwriter_evm66xxl.out and norwriter_evm66xxl.map will be generated under 
+     writer\nor\evmc66xxl\bin directory.
+
+2. Uses Makefile to build norwriter:
+   NOTE FOR BUILDING ON WINDOWS ENVIRONMENT: For building on windows environment GNU utilities like
+   "make" would be required. The following build procedure should also work on MINGW-MSYS Bourne shell.
+
+    Before starting the build following environment setup has to be done 
+    1) variable C_DIR should be set to the top directory of the Code Generation tools e.g.
+       Linux bash shell: 
+          export C_DIR=/opt/TI/TI_CGT_C6000_7.2.0A10232/
+       MSYS bash shell: 
+          export C_DIR='"C:/Program Files/Texas Instruments/ccsv5/tools/compiler/c6000"'
+    2) Code Generation tool binaries should be in the path e.g.
+       Linux bash shell: 
+          export PATH=/opt/TI/TI_CGT_C6000_7.2.0A10232/bin:$PATH
+       MSYS bash shell: 
+          export PATH=$PATH:/c/Program\ Files/Texas\ Instruments/ccsv5/tools/compiler/c6000/bin/
+    3) variable PFORM_LIB_DIR should be set the directory of the Platform Library root, e.g.
+       Linux bash shell: 
+          export PFORM_LIB_DIR=pdk_C6670_1_0_0_10-rc1/packages/ti/platform
+       MSYS bash shell: 
+          export PFORM_LIB_DIR='"C:/Program Files/Texas Instruments/pdk_C667x_1_0_0_10-rc1/packages/ti/platform"'
+
+    The makefile for building the norwriter is in the directory "tools/writer/nor/evmc66xxl"
+    Following are the steps to build norwriter, e.g.:
+    cd tools/writer/nor/evmc66xxl
+    make DEVICE=<device number>
+        supported device numbers are 
+            C6678
+            C6670
 
 Please refer to BIOS MCSDK 2.0 User's Guide (http://processors.wiki.ti.com/index.php/BIOS_MCSDK_2.0_User_Guide) for more details.
\ No newline at end of file
 
 Please refer to BIOS MCSDK 2.0 User's Guide (http://processors.wiki.ti.com/index.php/BIOS_MCSDK_2.0_User_Guide) for more details.
\ No newline at end of file
diff --git a/writer/nor/evmc6670l/Makefile b/writer/nor/evmc6670l/Makefile
new file mode 100644 (file)
index 0000000..d5aedfc
--- /dev/null
@@ -0,0 +1,81 @@
+# Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
+
+CC = cl6x
+CLIB_INC = $(C_DIR)/include
+STRIP = strip6x
+PRELINK = prelink6x
+
+HOST_PRFX = C60
+HOST_EXT = 6x
+
+AS = cl6x
+ifeq ($(DEVICE),C6670)
+DEVICE_NUM = 6670
+C_OPTS = -DDEVICE=6670 ## Turbo Nyquist 
+C_OPTS += -mv6600  
+A_OPTS += -mv6600
+else
+ifeq ($(DEVICE),C6678)
+DEVICE_NUM = 6678
+C_OPTS = -DDEVICE=6678 ## Shannon 
+C_OPTS += -mv6600  
+A_OPTS += -mv6600
+else
+DEFAULT:
+       @echo "Device '$(DEVICE)' not supported"
+       @exit 1
+endif
+endif
+
+TARGET_NAME = bin/norwriter_evm$(DEVICE_NUM)l.out
+
+C_OPTS += -g ## Enable debugging  
+C_OPTS += -ss ## interlist C source and optimizer with .asm source
+C_OPTS += -ml3  ## Far memory model
+C_OPTS += -k  ## Keep .asm files
+ifeq ($(ENDIAN),big)
+C_OPTS+= -me ## Big Endian
+endif
+C_OPTS += -pds67
+C_OPTS += --abi=elfabi
+ifeq ($(ENDIAN),big)
+A_OPTS += -me
+endif
+A_OPTS += --abi=elfabi
+OUTPUT_FILE_OPTION = --output_file
+LNK_OPTS += -z norwriter.cmd -m bin/norwriter_evm$(DEVICE_NUM)l.map --dynamic
+LNK_OPTS += -l $(C_DIR)/lib/rts6600_elf.lib
+LNK_OPTS += -l $(PFORM_LIB_DIR)/evmc$(DEVICE_NUM)l/platform_lib/lib/debug/ti.platform.evm$(DEVICE_NUM)l.ae66
+LNK_OPTS += --reread_libs --rom_model
+
+OBJ_DIR = obj
+PFORM_LIB_INC = $(PFORM_LIB_DIR) 
+SRCDIR = ../src
+
+SRC_FILES = norwriter.c 
+
+VPATH = $(SRCDIR)
+INCL = -I $(CLIB_INC) $(patsubst %,-I%,$(VPATH)) -I $(PFORM_LIB_DIR) -I ../include
+
+OBJS = $(patsubst %.c,$(OBJ_DIR)/%.obj,$(filter %.c, $(SRC_FILES)))
+OBJS += $(patsubst %.s,$(OBJ_DIR)/%.obj,$(filter %.s, $(SRC_FILES)))
+
+all: $(TARGET_NAME)
+
+$(TARGET_NAME): $(OBJS) norwriter.cmd
+       $(CC) $(C_OPTS) $(OBJS) $(LNK_OPTS) -o $@ 
+
+$(OBJ_DIR)/%.obj: %.c $(HEADERS) $(OBJ_DIR)/.created
+       $(CC) -c $(C_OPTS) $(INCL) $(DEFINE_TARGET) $< $(OUTPUT_FILE_OPTION) $@
+
+$(OBJ_DIR)/%.obj: %.s $(HEADERS) $(OBJ_DIR)/.created
+       $(CC) -c $(A_OPTS) $(DEFINE_TARGET) $< $(OUTPUT_FILE_OPTION) $@
+
+$(OBJ_DIR)/.created:
+       mkdir -p $(OBJ_DIR)
+       touch $(OBJ_DIR)/.created
+
+clean:
+       -rm -rf $(OBJ_DIR)
+       -rm -rf *.asm
+
diff --git a/writer/nor/evmc6678l/Makefile b/writer/nor/evmc6678l/Makefile
new file mode 100644 (file)
index 0000000..d5aedfc
--- /dev/null
@@ -0,0 +1,81 @@
+# Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
+
+CC = cl6x
+CLIB_INC = $(C_DIR)/include
+STRIP = strip6x
+PRELINK = prelink6x
+
+HOST_PRFX = C60
+HOST_EXT = 6x
+
+AS = cl6x
+ifeq ($(DEVICE),C6670)
+DEVICE_NUM = 6670
+C_OPTS = -DDEVICE=6670 ## Turbo Nyquist 
+C_OPTS += -mv6600  
+A_OPTS += -mv6600
+else
+ifeq ($(DEVICE),C6678)
+DEVICE_NUM = 6678
+C_OPTS = -DDEVICE=6678 ## Shannon 
+C_OPTS += -mv6600  
+A_OPTS += -mv6600
+else
+DEFAULT:
+       @echo "Device '$(DEVICE)' not supported"
+       @exit 1
+endif
+endif
+
+TARGET_NAME = bin/norwriter_evm$(DEVICE_NUM)l.out
+
+C_OPTS += -g ## Enable debugging  
+C_OPTS += -ss ## interlist C source and optimizer with .asm source
+C_OPTS += -ml3  ## Far memory model
+C_OPTS += -k  ## Keep .asm files
+ifeq ($(ENDIAN),big)
+C_OPTS+= -me ## Big Endian
+endif
+C_OPTS += -pds67
+C_OPTS += --abi=elfabi
+ifeq ($(ENDIAN),big)
+A_OPTS += -me
+endif
+A_OPTS += --abi=elfabi
+OUTPUT_FILE_OPTION = --output_file
+LNK_OPTS += -z norwriter.cmd -m bin/norwriter_evm$(DEVICE_NUM)l.map --dynamic
+LNK_OPTS += -l $(C_DIR)/lib/rts6600_elf.lib
+LNK_OPTS += -l $(PFORM_LIB_DIR)/evmc$(DEVICE_NUM)l/platform_lib/lib/debug/ti.platform.evm$(DEVICE_NUM)l.ae66
+LNK_OPTS += --reread_libs --rom_model
+
+OBJ_DIR = obj
+PFORM_LIB_INC = $(PFORM_LIB_DIR) 
+SRCDIR = ../src
+
+SRC_FILES = norwriter.c 
+
+VPATH = $(SRCDIR)
+INCL = -I $(CLIB_INC) $(patsubst %,-I%,$(VPATH)) -I $(PFORM_LIB_DIR) -I ../include
+
+OBJS = $(patsubst %.c,$(OBJ_DIR)/%.obj,$(filter %.c, $(SRC_FILES)))
+OBJS += $(patsubst %.s,$(OBJ_DIR)/%.obj,$(filter %.s, $(SRC_FILES)))
+
+all: $(TARGET_NAME)
+
+$(TARGET_NAME): $(OBJS) norwriter.cmd
+       $(CC) $(C_OPTS) $(OBJS) $(LNK_OPTS) -o $@ 
+
+$(OBJ_DIR)/%.obj: %.c $(HEADERS) $(OBJ_DIR)/.created
+       $(CC) -c $(C_OPTS) $(INCL) $(DEFINE_TARGET) $< $(OUTPUT_FILE_OPTION) $@
+
+$(OBJ_DIR)/%.obj: %.s $(HEADERS) $(OBJ_DIR)/.created
+       $(CC) -c $(A_OPTS) $(DEFINE_TARGET) $< $(OUTPUT_FILE_OPTION) $@
+
+$(OBJ_DIR)/.created:
+       mkdir -p $(OBJ_DIR)
+       touch $(OBJ_DIR)/.created
+
+clean:
+       -rm -rf $(OBJ_DIR)
+       -rm -rf *.asm
+