summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHao Zhang2011-06-15 15:29:39 -0500
committerHao Zhang2011-06-15 15:29:39 -0500
commit72cf4bb9e7ae9899bb1e855386c2cf1a2ab9f404 (patch)
tree6a8e421abd261e77c9e5c46244247c05d6dd66d9
parent0c59694aa18287c392260b04544cf7c88dd5c8f6 (diff)
downloadmcsdk-tools-72cf4bb9e7ae9899bb1e855386c2cf1a2ab9f404.tar.gz
mcsdk-tools-72cf4bb9e7ae9899bb1e855386c2cf1a2ab9f404.tar.xz
mcsdk-tools-72cf4bb9e7ae9899bb1e855386c2cf1a2ab9f404.zip
Added makefile support for writer utilities
-rw-r--r--writer/eeprom/docs/README.txt40
-rw-r--r--writer/eeprom/evmc6678l/Makefile81
-rw-r--r--writer/eeprom/evmc6678l/eepromwriter.cmd (renamed from writer/eeprom/evmc6678l/eepormwriter.cmd)0
-rw-r--r--writer/nand/docs/README.txt40
-rw-r--r--writer/nand/evmc6670l/Makefile81
-rw-r--r--writer/nand/evmc6678l/Makefile81
-rw-r--r--writer/nor/docs/README.txt40
-rw-r--r--writer/nor/evmc6670l/Makefile81
-rw-r--r--writer/nor/evmc6678l/Makefile81
9 files changed, 507 insertions, 18 deletions
diff --git a/writer/eeprom/docs/README.txt b/writer/eeprom/docs/README.txt
index ba45959..bdcc488 100644
--- a/writer/eeprom/docs/README.txt
+++ b/writer/eeprom/docs/README.txt
@@ -35,12 +35,40 @@ Steps to program the EEPROM:
35 35
36Steps to re-build eepromwriter: 36Steps to re-build eepromwriter:
37 37
381. Import the eepromwriter CCS project from writer\eeprom\evmc66xxl directory (in CCSv5, Project->Import Existing CCS/ 381. Uses CCS to build eepromwriter:
39 * Import the eepromwriter CCS project from writer\eeprom\evmc66xxl directory (in CCSv5, Project->Import Existing CCS/
39 CCE Eclipse Projects). 40 CCE Eclipse Projects).
40 41 * Clean and build the eepromwriter project.
412. Clean and build the eepromwriter project. 42 * After the project build is completed, eepromwriter_evm66xxl.out and eepromwriter_evm66xxl.map will be generated under
42 43 writer\eeprom\evmc66xxl\bin directory.
433. After the project build is completed, eepromwriter_evm66xxl.out and eepromwriter_evm66xxl.map will be generated under 44
44 writer\eeprom\evmc66xxl\bin directory. 452. Uses Makefile to build eepromwriter:
46 NOTE FOR BUILDING ON WINDOWS ENVIRONMENT: For building on windows environment GNU utilities like
47 "make" would be required. The following build procedure should also work on MINGW-MSYS Bourne shell.
48
49 Before starting the build following environment setup has to be done
50 1) variable C_DIR should be set to the top directory of the Code Generation tools e.g.
51 Linux bash shell:
52 export C_DIR=/opt/TI/TI_CGT_C6000_7.2.0A10232/
53 MSYS bash shell:
54 export C_DIR='"C:/Program Files/Texas Instruments/ccsv5/tools/compiler/c6000"'
55 2) Code Generation tool binaries should be in the path e.g.
56 Linux bash shell:
57 export PATH=/opt/TI/TI_CGT_C6000_7.2.0A10232/bin:$PATH
58 MSYS bash shell:
59 export PATH=$PATH:/c/Program\ Files/Texas\ Instruments/ccsv5/tools/compiler/c6000/bin/
60 3) variable PFORM_LIB_DIR should be set the directory of the Platform Library root, e.g.
61 Linux bash shell:
62 export PFORM_LIB_DIR=pdk_C6670_1_0_0_10-rc1/packages/ti/platform
63 MSYS bash shell:
64 export PFORM_LIB_DIR='"C:/Program Files/Texas Instruments/pdk_C6670_1_0_0_10-rc1/packages/ti/platform"'
65
66 The makefile for building the eepromwriter is in the directory "tools/writer/eeprom/evmc66xxl"
67 Following are the steps to build eepromwriter, e.g.:
68 cd tools/writer/eeprom/evmc66xxl
69 make DEVICE=<device number>
70 supported device numbers are
71 C6678
72 C6670
45 73
46Please 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 74Please 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
index 0000000..aca05b4
--- /dev/null
+++ b/writer/eeprom/evmc6678l/Makefile
@@ -0,0 +1,81 @@
1# Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
2
3CC = cl6x
4CLIB_INC = $(C_DIR)/include
5STRIP = strip6x
6PRELINK = prelink6x
7
8HOST_PRFX = C60
9HOST_EXT = 6x
10
11AS = cl6x
12ifeq ($(DEVICE),C6670)
13DEVICE_NUM = 6670
14C_OPTS = -DDEVICE=6670 ## Turbo Nyquist
15C_OPTS += -mv6600
16A_OPTS += -mv6600
17else
18ifeq ($(DEVICE),C6678)
19DEVICE_NUM = 6678
20C_OPTS = -DDEVICE=6678 ## Shannon
21C_OPTS += -mv6600
22A_OPTS += -mv6600
23else
24DEFAULT:
25 @echo "Device '$(DEVICE)' not supported"
26 @exit 1
27endif
28endif
29
30TARGET_NAME = bin/eepromwriter_evm$(DEVICE_NUM)l.out
31
32C_OPTS += -g ## Enable debugging
33C_OPTS += -ss ## interlist C source and optimizer with .asm source
34C_OPTS += -ml3 ## Far memory model
35C_OPTS += -k ## Keep .asm files
36ifeq ($(ENDIAN),big)
37C_OPTS+= -me ## Big Endian
38endif
39C_OPTS += -pds67
40C_OPTS += --abi=elfabi
41ifeq ($(ENDIAN),big)
42A_OPTS += -me
43endif
44A_OPTS += --abi=elfabi
45OUTPUT_FILE_OPTION = --output_file
46LNK_OPTS += -z eepromwriter.cmd -m bin/eepromwriter_evm$(DEVICE_NUM)l.map --dynamic
47LNK_OPTS += -l $(C_DIR)/lib/rts6600_elf.lib
48LNK_OPTS += -l $(PFORM_LIB_DIR)/evmc$(DEVICE_NUM)l/platform_lib/lib/debug/ti.platform.evm$(DEVICE_NUM)l.ae66
49LNK_OPTS += --reread_libs --rom_model
50
51OBJ_DIR = obj
52PFORM_LIB_INC = $(PFORM_LIB_DIR)
53SRCDIR = ../src
54
55SRC_FILES = eepromwriter.c
56
57VPATH = $(SRCDIR)
58INCL = -I $(CLIB_INC) $(patsubst %,-I%,$(VPATH)) -I $(PFORM_LIB_DIR) -I ../include
59
60OBJS = $(patsubst %.c,$(OBJ_DIR)/%.obj,$(filter %.c, $(SRC_FILES)))
61OBJS += $(patsubst %.s,$(OBJ_DIR)/%.obj,$(filter %.s, $(SRC_FILES)))
62
63all: $(TARGET_NAME)
64
65$(TARGET_NAME): $(OBJS) eepromwriter.cmd
66 $(CC) $(C_OPTS) $(OBJS) $(LNK_OPTS) -o $@
67
68$(OBJ_DIR)/%.obj: %.c $(HEADERS) $(OBJ_DIR)/.created
69 $(CC) -c $(C_OPTS) $(INCL) $(DEFINE_TARGET) $< $(OUTPUT_FILE_OPTION) $@
70
71$(OBJ_DIR)/%.obj: %.s $(HEADERS) $(OBJ_DIR)/.created
72 $(CC) -c $(A_OPTS) $(DEFINE_TARGET) $< $(OUTPUT_FILE_OPTION) $@
73
74$(OBJ_DIR)/.created:
75 mkdir -p $(OBJ_DIR)
76 touch $(OBJ_DIR)/.created
77
78clean:
79 -rm -rf $(OBJ_DIR)
80 -rm -rf *.asm
81
diff --git a/writer/eeprom/evmc6678l/eepormwriter.cmd b/writer/eeprom/evmc6678l/eepromwriter.cmd
index cab1993..cab1993 100644
--- a/writer/eeprom/evmc6678l/eepormwriter.cmd
+++ b/writer/eeprom/evmc6678l/eepromwriter.cmd
diff --git a/writer/nand/docs/README.txt b/writer/nand/docs/README.txt
index 2ec4320..709263e 100644
--- a/writer/nand/docs/README.txt
+++ b/writer/nand/docs/README.txt
@@ -33,12 +33,40 @@ Steps to program the NAND:
33 33
34Steps to re-build nandwriter: 34Steps to re-build nandwriter:
35 35
361. Import the nandwriter CCS project from writer\nand\evmc66xxl directory (in CCSv5, Project->Import Existing CCS/ 361. Uses CCS to build nandwriter:
37 * Import the nandwriter CCS project from writer\nand\evmc66xxl directory (in CCSv5, Project->Import Existing CCS/
37 CCE Eclipse Projects). 38 CCE Eclipse Projects).
38 39 * Clean and build the nandwriter project.
392. Clean and build the nandwriter project. 40 * After the project build is completed, nandwriter_evm66xxl.out and nandwriter_evm66xxl.map will be generated under
40 41 writer\nand\evmc66xxl\bin directory.
413. After the project build is completed, nandwriter_evm66xxl.out and nandwriter_evm66xxl.map will be generated under 42
42 writer\nand\evmc66xxl\bin directory. 432. Uses Makefile to build nandwriter:
44 NOTE FOR BUILDING ON WINDOWS ENVIRONMENT: For building on windows environment GNU utilities like
45 "make" would be required. The following build procedure should also work on MINGW-MSYS Bourne shell.
46
47 Before starting the build following environment setup has to be done
48 1) variable C_DIR should be set to the top directory of the Code Generation tools e.g.
49 Linux bash shell:
50 export C_DIR=/opt/TI/TI_CGT_C6000_7.2.0A10232/
51 MSYS bash shell:
52 export C_DIR='"C:/Program Files/Texas Instruments/ccsv5/tools/compiler/c6000"'
53 2) Code Generation tool binaries should be in the path e.g.
54 Linux bash shell:
55 export PATH=/opt/TI/TI_CGT_C6000_7.2.0A10232/bin:$PATH
56 MSYS bash shell:
57 export PATH=$PATH:/c/Program\ Files/Texas\ Instruments/ccsv5/tools/compiler/c6000/bin/
58 3) variable PFORM_LIB_DIR should be set the directory of the Platform Library root, e.g.
59 Linux bash shell:
60 export PFORM_LIB_DIR=pdk_C6670_1_0_0_10-rc1/packages/ti/platform
61 MSYS bash shell:
62 export PFORM_LIB_DIR='"C:/Program Files/Texas Instruments/pdk_C667x_1_0_0_10-rc1/packages/ti/platform"'
63
64 The makefile for building the nandwriter is in the directory "tools/writer/nand/evmc66xxl"
65 Following are the steps to build nandwriter, e.g.:
66 cd tools/writer/nand/evmc66xxl
67 make DEVICE=<device number>
68 supported device numbers are
69 C6678
70 C6670
43 71
44Please 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 72Please 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
index 0000000..060788c
--- /dev/null
+++ b/writer/nand/evmc6670l/Makefile
@@ -0,0 +1,81 @@
1# Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
2
3CC = cl6x
4CLIB_INC = $(C_DIR)/include
5STRIP = strip6x
6PRELINK = prelink6x
7
8HOST_PRFX = C60
9HOST_EXT = 6x
10
11AS = cl6x
12ifeq ($(DEVICE),C6670)
13DEVICE_NUM = 6670
14C_OPTS = -DDEVICE=6670 ## Turbo Nyquist
15C_OPTS += -mv6600
16A_OPTS += -mv6600
17else
18ifeq ($(DEVICE),C6678)
19DEVICE_NUM = 6678
20C_OPTS = -DDEVICE=6678 ## Shannon
21C_OPTS += -mv6600
22A_OPTS += -mv6600
23else
24DEFAULT:
25 @echo "Device '$(DEVICE)' not supported"
26 @exit 1
27endif
28endif
29
30TARGET_NAME = bin/nandwriter_evm$(DEVICE_NUM)l.out
31
32C_OPTS += -g ## Enable debugging
33C_OPTS += -ss ## interlist C source and optimizer with .asm source
34C_OPTS += -ml3 ## Far memory model
35C_OPTS += -k ## Keep .asm files
36ifeq ($(ENDIAN),big)
37C_OPTS+= -me ## Big Endian
38endif
39C_OPTS += -pds67
40C_OPTS += --abi=elfabi
41ifeq ($(ENDIAN),big)
42A_OPTS += -me
43endif
44A_OPTS += --abi=elfabi
45OUTPUT_FILE_OPTION = --output_file
46LNK_OPTS += -z nandwriter.cmd -m bin/nandwriter_evm$(DEVICE_NUM)l.map --dynamic
47LNK_OPTS += -l $(C_DIR)/lib/rts6600_elf.lib
48LNK_OPTS += -l $(PFORM_LIB_DIR)/evmc$(DEVICE_NUM)l/platform_lib/lib/debug/ti.platform.evm$(DEVICE_NUM)l.ae66
49LNK_OPTS += --reread_libs --rom_model
50
51OBJ_DIR = obj
52PFORM_LIB_INC = $(PFORM_LIB_DIR)
53SRCDIR = ../src
54
55SRC_FILES = nandwriter.c
56
57VPATH = $(SRCDIR)
58INCL = -I $(CLIB_INC) $(patsubst %,-I%,$(VPATH)) -I $(PFORM_LIB_DIR) -I ../include
59
60OBJS = $(patsubst %.c,$(OBJ_DIR)/%.obj,$(filter %.c, $(SRC_FILES)))
61OBJS += $(patsubst %.s,$(OBJ_DIR)/%.obj,$(filter %.s, $(SRC_FILES)))
62
63all: $(TARGET_NAME)
64
65$(TARGET_NAME): $(OBJS) nandwriter.cmd
66 $(CC) $(C_OPTS) $(OBJS) $(LNK_OPTS) -o $@
67
68$(OBJ_DIR)/%.obj: %.c $(HEADERS) $(OBJ_DIR)/.created
69 $(CC) -c $(C_OPTS) $(INCL) $(DEFINE_TARGET) $< $(OUTPUT_FILE_OPTION) $@
70
71$(OBJ_DIR)/%.obj: %.s $(HEADERS) $(OBJ_DIR)/.created
72 $(CC) -c $(A_OPTS) $(DEFINE_TARGET) $< $(OUTPUT_FILE_OPTION) $@
73
74$(OBJ_DIR)/.created:
75 mkdir -p $(OBJ_DIR)
76 touch $(OBJ_DIR)/.created
77
78clean:
79 -rm -rf $(OBJ_DIR)
80 -rm -rf *.asm
81
diff --git a/writer/nand/evmc6678l/Makefile b/writer/nand/evmc6678l/Makefile
new file mode 100644
index 0000000..060788c
--- /dev/null
+++ b/writer/nand/evmc6678l/Makefile
@@ -0,0 +1,81 @@
1# Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
2
3CC = cl6x
4CLIB_INC = $(C_DIR)/include
5STRIP = strip6x
6PRELINK = prelink6x
7
8HOST_PRFX = C60
9HOST_EXT = 6x
10
11AS = cl6x
12ifeq ($(DEVICE),C6670)
13DEVICE_NUM = 6670
14C_OPTS = -DDEVICE=6670 ## Turbo Nyquist
15C_OPTS += -mv6600
16A_OPTS += -mv6600
17else
18ifeq ($(DEVICE),C6678)
19DEVICE_NUM = 6678
20C_OPTS = -DDEVICE=6678 ## Shannon
21C_OPTS += -mv6600
22A_OPTS += -mv6600
23else
24DEFAULT:
25 @echo "Device '$(DEVICE)' not supported"
26 @exit 1
27endif
28endif
29
30TARGET_NAME = bin/nandwriter_evm$(DEVICE_NUM)l.out
31
32C_OPTS += -g ## Enable debugging
33C_OPTS += -ss ## interlist C source and optimizer with .asm source
34C_OPTS += -ml3 ## Far memory model
35C_OPTS += -k ## Keep .asm files
36ifeq ($(ENDIAN),big)
37C_OPTS+= -me ## Big Endian
38endif
39C_OPTS += -pds67
40C_OPTS += --abi=elfabi
41ifeq ($(ENDIAN),big)
42A_OPTS += -me
43endif
44A_OPTS += --abi=elfabi
45OUTPUT_FILE_OPTION = --output_file
46LNK_OPTS += -z nandwriter.cmd -m bin/nandwriter_evm$(DEVICE_NUM)l.map --dynamic
47LNK_OPTS += -l $(C_DIR)/lib/rts6600_elf.lib
48LNK_OPTS += -l $(PFORM_LIB_DIR)/evmc$(DEVICE_NUM)l/platform_lib/lib/debug/ti.platform.evm$(DEVICE_NUM)l.ae66
49LNK_OPTS += --reread_libs --rom_model
50
51OBJ_DIR = obj
52PFORM_LIB_INC = $(PFORM_LIB_DIR)
53SRCDIR = ../src
54
55SRC_FILES = nandwriter.c
56
57VPATH = $(SRCDIR)
58INCL = -I $(CLIB_INC) $(patsubst %,-I%,$(VPATH)) -I $(PFORM_LIB_DIR) -I ../include
59
60OBJS = $(patsubst %.c,$(OBJ_DIR)/%.obj,$(filter %.c, $(SRC_FILES)))
61OBJS += $(patsubst %.s,$(OBJ_DIR)/%.obj,$(filter %.s, $(SRC_FILES)))
62
63all: $(TARGET_NAME)
64
65$(TARGET_NAME): $(OBJS) nandwriter.cmd
66 $(CC) $(C_OPTS) $(OBJS) $(LNK_OPTS) -o $@
67
68$(OBJ_DIR)/%.obj: %.c $(HEADERS) $(OBJ_DIR)/.created
69 $(CC) -c $(C_OPTS) $(INCL) $(DEFINE_TARGET) $< $(OUTPUT_FILE_OPTION) $@
70
71$(OBJ_DIR)/%.obj: %.s $(HEADERS) $(OBJ_DIR)/.created
72 $(CC) -c $(A_OPTS) $(DEFINE_TARGET) $< $(OUTPUT_FILE_OPTION) $@
73
74$(OBJ_DIR)/.created:
75 mkdir -p $(OBJ_DIR)
76 touch $(OBJ_DIR)/.created
77
78clean:
79 -rm -rf $(OBJ_DIR)
80 -rm -rf *.asm
81
diff --git a/writer/nor/docs/README.txt b/writer/nor/docs/README.txt
index c62d597..f887879 100644
--- a/writer/nor/docs/README.txt
+++ b/writer/nor/docs/README.txt
@@ -34,12 +34,40 @@ Steps to program the NOR:
34 34
35Steps to re-build norwriter: 35Steps to re-build norwriter:
36 36
371. Import the norwriter CCS project from writer\nor\evmc66xxl directory (in CCSv5, Project->Import Existing CCS/ 371. Uses CCS to build norwriter:
38 * Import the norwriter CCS project from writer\nor\evmc66xxl directory (in CCSv5, Project->Import Existing CCS/
38 CCE Eclipse Projects). 39 CCE Eclipse Projects).
39 40 * Clean and build the norwriter project.
402. Clean and build the norwriter project. 41 * After the project build is completed, norwriter_evm66xxl.out and norwriter_evm66xxl.map will be generated under
41 42 writer\nor\evmc66xxl\bin directory.
423. After the project build is completed, norwriter_evm66xxl.out and norwriter_evm66xxl.map will be generated under 43
43 writer\nor\evmc66xxl\bin directory. 442. Uses Makefile to build norwriter:
45 NOTE FOR BUILDING ON WINDOWS ENVIRONMENT: For building on windows environment GNU utilities like
46 "make" would be required. The following build procedure should also work on MINGW-MSYS Bourne shell.
47
48 Before starting the build following environment setup has to be done
49 1) variable C_DIR should be set to the top directory of the Code Generation tools e.g.
50 Linux bash shell:
51 export C_DIR=/opt/TI/TI_CGT_C6000_7.2.0A10232/
52 MSYS bash shell:
53 export C_DIR='"C:/Program Files/Texas Instruments/ccsv5/tools/compiler/c6000"'
54 2) Code Generation tool binaries should be in the path e.g.
55 Linux bash shell:
56 export PATH=/opt/TI/TI_CGT_C6000_7.2.0A10232/bin:$PATH
57 MSYS bash shell:
58 export PATH=$PATH:/c/Program\ Files/Texas\ Instruments/ccsv5/tools/compiler/c6000/bin/
59 3) variable PFORM_LIB_DIR should be set the directory of the Platform Library root, e.g.
60 Linux bash shell:
61 export PFORM_LIB_DIR=pdk_C6670_1_0_0_10-rc1/packages/ti/platform
62 MSYS bash shell:
63 export PFORM_LIB_DIR='"C:/Program Files/Texas Instruments/pdk_C667x_1_0_0_10-rc1/packages/ti/platform"'
64
65 The makefile for building the norwriter is in the directory "tools/writer/nor/evmc66xxl"
66 Following are the steps to build norwriter, e.g.:
67 cd tools/writer/nor/evmc66xxl
68 make DEVICE=<device number>
69 supported device numbers are
70 C6678
71 C6670
44 72
45Please 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 73Please 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
index 0000000..d5aedfc
--- /dev/null
+++ b/writer/nor/evmc6670l/Makefile
@@ -0,0 +1,81 @@
1# Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
2
3CC = cl6x
4CLIB_INC = $(C_DIR)/include
5STRIP = strip6x
6PRELINK = prelink6x
7
8HOST_PRFX = C60
9HOST_EXT = 6x
10
11AS = cl6x
12ifeq ($(DEVICE),C6670)
13DEVICE_NUM = 6670
14C_OPTS = -DDEVICE=6670 ## Turbo Nyquist
15C_OPTS += -mv6600
16A_OPTS += -mv6600
17else
18ifeq ($(DEVICE),C6678)
19DEVICE_NUM = 6678
20C_OPTS = -DDEVICE=6678 ## Shannon
21C_OPTS += -mv6600
22A_OPTS += -mv6600
23else
24DEFAULT:
25 @echo "Device '$(DEVICE)' not supported"
26 @exit 1
27endif
28endif
29
30TARGET_NAME = bin/norwriter_evm$(DEVICE_NUM)l.out
31
32C_OPTS += -g ## Enable debugging
33C_OPTS += -ss ## interlist C source and optimizer with .asm source
34C_OPTS += -ml3 ## Far memory model
35C_OPTS += -k ## Keep .asm files
36ifeq ($(ENDIAN),big)
37C_OPTS+= -me ## Big Endian
38endif
39C_OPTS += -pds67
40C_OPTS += --abi=elfabi
41ifeq ($(ENDIAN),big)
42A_OPTS += -me
43endif
44A_OPTS += --abi=elfabi
45OUTPUT_FILE_OPTION = --output_file
46LNK_OPTS += -z norwriter.cmd -m bin/norwriter_evm$(DEVICE_NUM)l.map --dynamic
47LNK_OPTS += -l $(C_DIR)/lib/rts6600_elf.lib
48LNK_OPTS += -l $(PFORM_LIB_DIR)/evmc$(DEVICE_NUM)l/platform_lib/lib/debug/ti.platform.evm$(DEVICE_NUM)l.ae66
49LNK_OPTS += --reread_libs --rom_model
50
51OBJ_DIR = obj
52PFORM_LIB_INC = $(PFORM_LIB_DIR)
53SRCDIR = ../src
54
55SRC_FILES = norwriter.c
56
57VPATH = $(SRCDIR)
58INCL = -I $(CLIB_INC) $(patsubst %,-I%,$(VPATH)) -I $(PFORM_LIB_DIR) -I ../include
59
60OBJS = $(patsubst %.c,$(OBJ_DIR)/%.obj,$(filter %.c, $(SRC_FILES)))
61OBJS += $(patsubst %.s,$(OBJ_DIR)/%.obj,$(filter %.s, $(SRC_FILES)))
62
63all: $(TARGET_NAME)
64
65$(TARGET_NAME): $(OBJS) norwriter.cmd
66 $(CC) $(C_OPTS) $(OBJS) $(LNK_OPTS) -o $@
67
68$(OBJ_DIR)/%.obj: %.c $(HEADERS) $(OBJ_DIR)/.created
69 $(CC) -c $(C_OPTS) $(INCL) $(DEFINE_TARGET) $< $(OUTPUT_FILE_OPTION) $@
70
71$(OBJ_DIR)/%.obj: %.s $(HEADERS) $(OBJ_DIR)/.created
72 $(CC) -c $(A_OPTS) $(DEFINE_TARGET) $< $(OUTPUT_FILE_OPTION) $@
73
74$(OBJ_DIR)/.created:
75 mkdir -p $(OBJ_DIR)
76 touch $(OBJ_DIR)/.created
77
78clean:
79 -rm -rf $(OBJ_DIR)
80 -rm -rf *.asm
81
diff --git a/writer/nor/evmc6678l/Makefile b/writer/nor/evmc6678l/Makefile
new file mode 100644
index 0000000..d5aedfc
--- /dev/null
+++ b/writer/nor/evmc6678l/Makefile
@@ -0,0 +1,81 @@
1# Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
2
3CC = cl6x
4CLIB_INC = $(C_DIR)/include
5STRIP = strip6x
6PRELINK = prelink6x
7
8HOST_PRFX = C60
9HOST_EXT = 6x
10
11AS = cl6x
12ifeq ($(DEVICE),C6670)
13DEVICE_NUM = 6670
14C_OPTS = -DDEVICE=6670 ## Turbo Nyquist
15C_OPTS += -mv6600
16A_OPTS += -mv6600
17else
18ifeq ($(DEVICE),C6678)
19DEVICE_NUM = 6678
20C_OPTS = -DDEVICE=6678 ## Shannon
21C_OPTS += -mv6600
22A_OPTS += -mv6600
23else
24DEFAULT:
25 @echo "Device '$(DEVICE)' not supported"
26 @exit 1
27endif
28endif
29
30TARGET_NAME = bin/norwriter_evm$(DEVICE_NUM)l.out
31
32C_OPTS += -g ## Enable debugging
33C_OPTS += -ss ## interlist C source and optimizer with .asm source
34C_OPTS += -ml3 ## Far memory model
35C_OPTS += -k ## Keep .asm files
36ifeq ($(ENDIAN),big)
37C_OPTS+= -me ## Big Endian
38endif
39C_OPTS += -pds67
40C_OPTS += --abi=elfabi
41ifeq ($(ENDIAN),big)
42A_OPTS += -me
43endif
44A_OPTS += --abi=elfabi
45OUTPUT_FILE_OPTION = --output_file
46LNK_OPTS += -z norwriter.cmd -m bin/norwriter_evm$(DEVICE_NUM)l.map --dynamic
47LNK_OPTS += -l $(C_DIR)/lib/rts6600_elf.lib
48LNK_OPTS += -l $(PFORM_LIB_DIR)/evmc$(DEVICE_NUM)l/platform_lib/lib/debug/ti.platform.evm$(DEVICE_NUM)l.ae66
49LNK_OPTS += --reread_libs --rom_model
50
51OBJ_DIR = obj
52PFORM_LIB_INC = $(PFORM_LIB_DIR)
53SRCDIR = ../src
54
55SRC_FILES = norwriter.c
56
57VPATH = $(SRCDIR)
58INCL = -I $(CLIB_INC) $(patsubst %,-I%,$(VPATH)) -I $(PFORM_LIB_DIR) -I ../include
59
60OBJS = $(patsubst %.c,$(OBJ_DIR)/%.obj,$(filter %.c, $(SRC_FILES)))
61OBJS += $(patsubst %.s,$(OBJ_DIR)/%.obj,$(filter %.s, $(SRC_FILES)))
62
63all: $(TARGET_NAME)
64
65$(TARGET_NAME): $(OBJS) norwriter.cmd
66 $(CC) $(C_OPTS) $(OBJS) $(LNK_OPTS) -o $@
67
68$(OBJ_DIR)/%.obj: %.c $(HEADERS) $(OBJ_DIR)/.created
69 $(CC) -c $(C_OPTS) $(INCL) $(DEFINE_TARGET) $< $(OUTPUT_FILE_OPTION) $@
70
71$(OBJ_DIR)/%.obj: %.s $(HEADERS) $(OBJ_DIR)/.created
72 $(CC) -c $(A_OPTS) $(DEFINE_TARGET) $< $(OUTPUT_FILE_OPTION) $@
73
74$(OBJ_DIR)/.created:
75 mkdir -p $(OBJ_DIR)
76 touch $(OBJ_DIR)/.created
77
78clean:
79 -rm -rf $(OBJ_DIR)
80 -rm -rf *.asm
81