summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bin2ccs/README.txt13
-rw-r--r--bin2ccs/bin2ccs.bat1
-rw-r--r--bin2ccs/bin2ccs.c147
-rw-r--r--bin2ccs/bin2ccs.exebin32768 -> 0 bytes
-rw-r--r--boot_loader/IBL_buildibl15
-rw-r--r--boot_loader/examples/emac/Ethernet_boot/README18
-rw-r--r--boot_loader/examples/emac/Utilities/b2ccs.c164
-rw-r--r--boot_loader/examples/emac/Utilities/b2ccs.exebin32768 -> 0 bytes
-rw-r--r--boot_loader/examples/emac/Utilities/b2i2c.c226
-rw-r--r--boot_loader/examples/emac/Utilities/b2i2c.exebin32768 -> 0 bytes
-rw-r--r--boot_loader/examples/emac/Utilities/bootpacket.h77
-rw-r--r--boot_loader/examples/emac/Utilities/build-msvc.bat12
-rw-r--r--boot_loader/examples/emac/Utilities/mergebtbl.c127
-rw-r--r--boot_loader/examples/emac/Utilities/mergebtbl.exebin32768 -> 0 bytes
-rw-r--r--boot_loader/examples/emac/Utilities/myparser.c157
-rw-r--r--boot_loader/examples/emac/Utilities/myparser.exebin36864 -> 0 bytes
-rw-r--r--boot_loader/examples/emac/simple/simple.btbl10
-rw-r--r--boot_loader/examples/emac/simple/simple.le.btbl8
-rw-r--r--boot_loader/examples/emac/simple/simple.map95
-rw-r--r--boot_loader/examples/emac/simple/simple.objbin1460 -> 0 bytes
-rw-r--r--boot_loader/examples/emac/simple/simple.outbin1820 -> 0 bytes
-rw-r--r--boot_loader/examples/emac/simple/simple.s64
-rw-r--r--boot_loader/examples/ethernet/Ethernet_boot/pcsendpkt.c (renamed from boot_loader/examples/emac/Ethernet_boot/pcsendpkt.c)36
-rw-r--r--boot_loader/examples/ethernet/Ethernet_boot/pcsendpkt.exe (renamed from boot_loader/examples/emac/Ethernet_boot/pcsendpkt.exe)bin111616 -> 111616 bytes
-rw-r--r--boot_loader/examples/ethernet/Ethernet_boot/simple.eth (renamed from boot_loader/examples/emac/Ethernet_boot/simple.eth)0
-rw-r--r--boot_loader/examples/ethernet/Utilities/bconvert64x.c (renamed from boot_loader/examples/emac/Utilities/bconvert64x.c)67
-rw-r--r--boot_loader/examples/ethernet/Utilities/bconvert64x.exe (renamed from boot_loader/examples/emac/Utilities/bconvert64x.exe)bin36864 -> 36864 bytes
-rw-r--r--boot_loader/examples/ethernet/Utilities/bootpacket.c (renamed from boot_loader/examples/emac/Utilities/bootpacket.c)67
-rw-r--r--boot_loader/examples/ethernet/Utilities/bootpacket.exe (renamed from boot_loader/examples/emac/Utilities/bootpacket.exe)bin40960 -> 40960 bytes
-rw-r--r--boot_loader/examples/ethernet/Utilities/bootpacket.h110
-rw-r--r--boot_loader/examples/ethernet/docs/README.txt62
-rw-r--r--boot_loader/examples/ethernet/simple/makefile (renamed from boot_loader/examples/emac/simple/makefile)2
-rw-r--r--boot_loader/examples/ethernet/simple/simple.bat4
-rw-r--r--boot_loader/examples/ethernet/simple/simple.cmd (renamed from boot_loader/examples/emac/simple/simple.cmd)4
-rw-r--r--boot_loader/examples/ethernet/simple/simple.rmd (renamed from boot_loader/examples/emac/simple/simple.rmd)0
-rw-r--r--boot_loader/examples/ethernet/simple/simple.s96
-rw-r--r--boot_loader/examples/i2c/nand/docs/README.txt13
-rw-r--r--boot_loader/examples/i2c/nor/docs/README.txt13
-rw-r--r--boot_loader/examples/i2c/tftp/docs/README.txt (renamed from boot_loader/examples/i2c/emac/docs/README.txt)37
-rw-r--r--boot_loader/examples/i2c/tftp/evmc6670l/.ccsproject (renamed from boot_loader/examples/i2c/emac/evmc6670l/.ccsproject)0
-rw-r--r--boot_loader/examples/i2c/tftp/evmc6670l/.cproject (renamed from boot_loader/examples/i2c/emac/evmc6670l/.cproject)15
-rw-r--r--boot_loader/examples/i2c/tftp/evmc6670l/.project (renamed from boot_loader/examples/i2c/emac/evmc6670l/.project)8
-rw-r--r--boot_loader/examples/i2c/tftp/evmc6670l/i2c_boot_tftp_example.cmd (renamed from boot_loader/examples/i2c/emac/evmc6670l/i2c_boot_emac_example.cmd)0
-rw-r--r--boot_loader/examples/i2c/tftp/evmc6670l/macros.ini (renamed from boot_loader/examples/i2c/emac/evmc6670l/macros.ini)0
-rw-r--r--boot_loader/examples/i2c/tftp/evmc6678l/.ccsproject (renamed from boot_loader/examples/i2c/emac/evmc6678l/.ccsproject)0
-rw-r--r--boot_loader/examples/i2c/tftp/evmc6678l/.cproject (renamed from boot_loader/examples/i2c/emac/evmc6678l/.cproject)13
-rw-r--r--boot_loader/examples/i2c/tftp/evmc6678l/.project (renamed from boot_loader/examples/i2c/emac/evmc6678l/.project)8
-rw-r--r--boot_loader/examples/i2c/tftp/evmc6678l/i2c_boot_tftp_example.cmd (renamed from boot_loader/examples/i2c/emac/evmc6678l/i2c_boot_emac_example.cmd)0
-rw-r--r--boot_loader/examples/i2c/tftp/evmc6678l/macros.ini (renamed from boot_loader/examples/i2c/emac/evmc6678l/macros.ini)0
-rw-r--r--boot_loader/examples/i2c/tftp/src/i2c_boot_tftp_example.c (renamed from boot_loader/examples/i2c/emac/src/i2c_boot_emac_example.c)0
-rw-r--r--boot_loader/tools_install.bat3
-rw-r--r--post/docs/README.txt11
-rw-r--r--post/evmc6670l/.cproject4
-rw-r--r--post/evmc6670l/bin/post_romparse.bat2
-rw-r--r--post/evmc6678l/.cproject4
-rw-r--r--post/evmc6678l/bin/post_romparse.bat2
-rw-r--r--writer/eeprom/evmc6670l/.cproject4
-rw-r--r--writer/eeprom/evmc6670l/bin/eepromwriter_input.txt2
-rw-r--r--writer/eeprom/evmc6678l/.cproject4
-rw-r--r--writer/eeprom/evmc6678l/bin/eepromwriter_input.txt2
-rw-r--r--writer/eeprom/src/eepromwriter.c71
-rw-r--r--writer/nand/evmc6670l/.cproject4
-rw-r--r--writer/nand/evmc6678l/.cproject4
-rw-r--r--writer/nand/src/nandwriter.c64
-rw-r--r--writer/nor/evmc6670l/.cproject4
-rw-r--r--writer/nor/evmc6678l/.cproject4
-rw-r--r--writer/nor/src/norwriter.c69
67 files changed, 669 insertions, 1278 deletions
diff --git a/bin2ccs/README.txt b/bin2ccs/README.txt
deleted file mode 100644
index 89d7853..0000000
--- a/bin2ccs/README.txt
+++ /dev/null
@@ -1,13 +0,0 @@
1Utility to convert binary file to TI CCS Format file
2
3Usage:
4
5Under Windows Command Prompt, run bin2ccs.bat or the following command:
6bin2ccs <infile> <outfile>
7
8Note: The infile is the input binary image or data file, the outfile is the generated output file
9 in CCS data format that can be loaded into DSP memory using the CCS Memory Browser.
10
11Example: bin2ccs app.out app.dat
12
13
diff --git a/bin2ccs/bin2ccs.bat b/bin2ccs/bin2ccs.bat
deleted file mode 100644
index f42a67c..0000000
--- a/bin2ccs/bin2ccs.bat
+++ /dev/null
@@ -1 +0,0 @@
1bin2ccs app.out app.dat
diff --git a/bin2ccs/bin2ccs.c b/bin2ccs/bin2ccs.c
deleted file mode 100644
index 3b3a7c0..0000000
--- a/bin2ccs/bin2ccs.c
+++ /dev/null
@@ -1,147 +0,0 @@
1/*
2 *
3 * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
4 *
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 *
10 * Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 *
13 * Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the
16 * distribution.
17 *
18 * Neither the name of Texas Instruments Incorporated nor the names of
19 * its contributors may be used to endorse or promote products derived
20 * from this software without specific prior written permission.
21 *
22 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
25 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
26 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
27 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
28 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
29 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
30 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
32 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 *
34*/
35
36/**********************************************************************************************
37 * FILE PURPOSE: Convert a binary file to CCS format
38 **********************************************************************************************
39 * FILE NAME: bin2ccs.c
40 *
41 * DESCRIPTION: The binary file is converted to an ascii file in CCS data format
42 *
43 **********************************************************************************************/
44
45#include <stdio.h>
46#include <malloc.h>
47
48char version[] = "1.0.0.0";
49
50/**********************************************************************************************
51 * FUNCTION PURPOSE: Form a 32 bit value from an unsigned byte array
52 **********************************************************************************************
53 * DESCRIPTION: The value is formed and padded if required
54 **********************************************************************************************/
55unsigned int formInt (unsigned char *c, unsigned int i, unsigned int len)
56{
57 unsigned int x = 0;
58
59 if (i < len)
60 x = x | (c[i] << 24);
61
62 if ((i+1) < len)
63 x = x | (c[i+1] << 16);
64
65 if ((i+2) < len)
66 x = x | (c[i+2] << 8);
67
68 if ((i+3) < len)
69 x = x | c[i+3];
70
71 return (x);
72
73}
74
75int main (int argc, char *argv[])
76{
77 FILE *fil;
78 unsigned char *cdat;
79 unsigned int len;
80 unsigned int i;
81
82 printf("Binary to CCS Format Converter Version %s\n", version);
83
84 if (argc != 3) {
85 fprintf (stderr, "usage: %s infile outfile\n", argv[0]);
86 return (-1);
87 }
88
89 fil = fopen (argv[1], "rb");
90 if (fil == NULL) {
91 fprintf (stderr, "%s: Failed to open input file %s\n", argv[0], argv[1]);
92 return (-1);
93 }
94
95 fseek (fil, 0, SEEK_END);
96 len = ftell (fil);
97 fclose (fil);
98
99 cdat = malloc (len * sizeof (unsigned char));
100 if (cdat == NULL) {
101 fprintf (stderr, "%s: Failed to malloc %d bytes\n", argv[0], len);
102 return (-1);
103 }
104
105 fil = fopen (argv[1], "rb");
106 if (fil == NULL) {
107 fprintf (stderr, "%s: Failed to open input file %s\n", argv[0], argv[1]);
108 return (-1);
109 }
110
111 fread (cdat, sizeof(unsigned char), len, fil);
112
113 fclose (fil);
114
115
116 fil = fopen (argv[2], "w");
117 if (fil == NULL) {
118 fprintf (stderr, "%s: Error opening output file %s\n", argv[0], argv[1]);
119 free (cdat);
120 return (-1);
121 }
122
123 /* The ccs header */
124 fprintf (fil, "1651 1 80000000 1 %x\n", (len + 3) / 4);
125
126
127 /* The data */
128 for (i = 0; i < len; i += 4)
129 fprintf (fil, "0x%08x\n", formInt(cdat, i, len));
130
131
132 fclose (fil);
133 free (cdat);
134
135 return (0);
136
137}
138
139
140
141
142
143
144
145
146
147
diff --git a/bin2ccs/bin2ccs.exe b/bin2ccs/bin2ccs.exe
deleted file mode 100644
index 493588b..0000000
--- a/bin2ccs/bin2ccs.exe
+++ /dev/null
Binary files differ
diff --git a/boot_loader/IBL_buildibl b/boot_loader/IBL_buildibl
index 4d06619..c6cfa13 100644
--- a/boot_loader/IBL_buildibl
+++ b/boot_loader/IBL_buildibl
@@ -1,7 +1,20 @@
1cd ibl/src/make 1cd ibl/src/make
2 2
3source setupenvMsys.sh 3source setupenvMsys.sh
4make evm_c667x_i2c ENDIAN=little I2C_BUS_ADDR=0x51 4make evm_c6678_i2c ENDIAN=little I2C_BUS_ADDR=0x51
5cp -f ibl_c66x/i2crom.dat ../../../i2crom_0x51_c6678_le.dat
6cp -f ../util/i2cConfig/i2cparam_c66x_le.out ../../../i2cparam_0x51_c6678_le_0x500.out
7make clean
8
9make evm_c6670_i2c ENDIAN=little I2C_BUS_ADDR=0x51
10cp -f ibl_c66x/i2crom.dat ../../../i2crom_0x51_c6670_le.dat
11cp -f ../util/i2cConfig/i2cparam_c66x_le.out ../../../i2cparam_0x51_c6670_le_0x500.out
12make clean
13
14mv -f ../../../i2crom_0x51_c6678_le.dat bin/i2crom_0x51_c6678_le.dat
15mv -f ../../../i2crom_0x51_c6670_le.dat bin/i2crom_0x51_c6670_le.dat
16mv -f ../../../i2cparam_0x51_c6678_le_0x500.out bin/i2cparam_0x51_c6678_le_0x500.out
17mv -f ../../../i2cparam_0x51_c6670_le_0x500.out bin/i2cparam_0x51_c6670_le_0x500.out
5 18
6cd ../../../ 19cd ../../../
7 20
diff --git a/boot_loader/examples/emac/Ethernet_boot/README b/boot_loader/examples/emac/Ethernet_boot/README
deleted file mode 100644
index acd5b86..0000000
--- a/boot_loader/examples/emac/Ethernet_boot/README
+++ /dev/null
@@ -1,18 +0,0 @@
1/****** Steps to send the image from the Host to the target DSP. ***********/
2
31. Boot the target the DSP in Ethernet boot mode.
4
52. Once the DSP boots up, it transmits BOOTP packet at regular interval which will have the MAC id of the DSP.
6
73. Create a image of the simple code in the simple folder using the "make simple.eth".
8
94. The resulting simple.eth file is the desired image.
10
115. Add an ARP entry for the DSP mac address associating with an IP local to the host. For example if the host PC's
12IP is 192.168.1.1, then add an ARP entry with the DSP's MAC address associated with IP address 192.168.1.2.
13
145. Use the pcsendpkt.exe to send the image to the DSP using the associated IP address. For example
15pcsendpkt.exe simple.eth 192.168.1.2
16
176. In order to compile the pcsendpkt.c file please compile with -lwsock32 option for using windows socket.
18
diff --git a/boot_loader/examples/emac/Utilities/b2ccs.c b/boot_loader/examples/emac/Utilities/b2ccs.c
deleted file mode 100644
index 61018be..0000000
--- a/boot_loader/examples/emac/Utilities/b2ccs.c
+++ /dev/null
@@ -1,164 +0,0 @@
1/* Convert a hex b file into a ccs data file */
2
3#include <stdio.h>
4#include <malloc.h>
5
6
7int asciiByte (unsigned char c)
8{
9 if ((c >= '0') && (c <= '9'))
10 return (1);
11
12 if ((c >= 'A') && (c <= 'F'))
13 return (1);
14
15 return (0);
16}
17
18int toNum (unsigned char c)
19{
20 if ((c >= '0') && (c <= '9'))
21 return (c - '0');
22
23 return (c - 'A' + 10);
24
25}
26
27
28void stripLine (FILE *s)
29{
30 char iline[132];
31
32 fgets (iline, 131, s);
33
34}
35
36/* Read a .b file. */
37unsigned long readBFile (FILE *s, unsigned char *data, unsigned long maxSize)
38{
39 unsigned char x, y;
40 unsigned long byteCount = 0;
41
42 /* Strip the 1st two lines */
43 stripLine (s);
44 stripLine (s);
45
46 for (;;) {
47
48 /* read the 1st ascii char */
49 do {
50 x = fgetc (s);
51 if (x == (unsigned char)EOF)
52 return (byteCount);
53
54 } while (!asciiByte(x));
55
56 /* Read the next ascii char */
57 y = fgetc (s);
58 if (y == (unsigned char)EOF)
59 return (byteCount);
60 if (asciiByte(y))
61 data[byteCount++] = (toNum(x) << 4) | toNum (y);
62
63 if (byteCount >= maxSize) {
64 fprintf (stderr, "Max input array size exceeded\n");
65 return (-1);
66 }
67 }
68}
69
70
71unsigned dwordConvert (unsigned char *data, unsigned long idx, unsigned long iMax)
72{
73 unsigned value;
74 unsigned char c[4];
75 int i;
76
77 c[0] = c[1] = c[2] = c[3] = 0;
78
79 for (i = 0; i < 4; i++) {
80 if (idx >= iMax)
81 break;
82 c[i] = data[idx++];
83 }
84
85 value = c[3] | (c[2] << 8) | (c[1] << 16) | (c[0] << 24);
86
87 return (value);
88
89}
90
91
92
93#define SIZE (1024 * 1024 * 2) /* max array size 2MB */
94
95int main (int argc, char *argv[])
96{
97 FILE *strin;
98 FILE *strout;
99
100 unsigned char *dataSet1;
101
102 unsigned char block[128];
103 unsigned blockSize;
104
105 unsigned long pIn;
106 unsigned long pOut;
107
108 unsigned long inSize;
109 unsigned long i;
110
111 /* Arg check */
112 if (argc != 3) {
113 fprintf (stderr, "usage: %s infile outfile\n", argv[0]);
114 return (-1);
115 }
116
117 /* Open the input file */
118 strin = fopen (argv[1], "r");
119 if (strin == NULL) {
120 fprintf (stderr, "%s: Could not open file %s for reading\n", argv[0], argv[1]);
121 return (-1);
122 }
123
124 /* Allocate the two data set memories */
125 dataSet1 = malloc (SIZE * sizeof (unsigned char));
126 if (dataSet1 == NULL) {
127 fprintf (stderr, "%s: Malloc failure\n", argv[0]);
128 return (-1);
129 }
130
131 /* Read the data into the byte stream */
132 if ((inSize = readBFile (strin, dataSet1, SIZE)) < 0)
133 return (inSize);
134 fclose (strin);
135
136 strout = fopen (argv[2], "w");
137 if (strout == NULL) {
138 fprintf (stderr, "%s error: Could not open output file %s\n", argv[0], argv[2]);
139 free (dataSet1);
140 return (-1);
141 }
142
143 /* Write the CCS header */
144 fprintf (strout, "1651 1 10000 1 %x\n", (inSize + 3) / 4);
145
146 /* Write out each 32 bit line. */
147 for (i = 0; i < inSize; i += 4)
148 fprintf (strout, "0x%08x\n", dwordConvert (dataSet1, i, inSize));
149
150 free (dataSet1);
151 fclose (strout);
152
153
154 return (0);
155
156}
157
158
159
160
161
162
163
164
diff --git a/boot_loader/examples/emac/Utilities/b2ccs.exe b/boot_loader/examples/emac/Utilities/b2ccs.exe
deleted file mode 100644
index b11083e..0000000
--- a/boot_loader/examples/emac/Utilities/b2ccs.exe
+++ /dev/null
Binary files differ
diff --git a/boot_loader/examples/emac/Utilities/b2i2c.c b/boot_loader/examples/emac/Utilities/b2i2c.c
deleted file mode 100644
index 54e2a95..0000000
--- a/boot_loader/examples/emac/Utilities/b2i2c.c
+++ /dev/null
@@ -1,226 +0,0 @@
1/* Create an ascii hex i2c data file */
2
3#include <stdio.h>
4#include <malloc.h>
5
6unsigned onesComplementAdd (unsigned value1, unsigned value2)
7{
8 unsigned result;
9
10 result = (unsigned)value1 + (unsigned)value2;
11
12 result = (result >> 16) + (result & 0xFFFF); /* add in carry */
13 result += (result >> 16); /* maybe one more */
14 result = (result & 0xffff);
15 return (unsigned)result;
16
17} /* end of beth_ones_complement_add() */
18
19
20int asciiByte (unsigned char c)
21{
22 if ((c >= '0') && (c <= '9'))
23 return (1);
24
25 if ((c >= 'A') && (c <= 'F'))
26 return (1);
27
28 return (0);
29}
30
31int toNum (unsigned char c)
32{
33 if ((c >= '0') && (c <= '9'))
34 return (c - '0');
35
36 return (c - 'A' + 10);
37
38}
39
40
41void stripLine (FILE *s)
42{
43 char iline[132];
44
45 fgets (iline, 131, s);
46
47}
48
49/* Read a .b file. */
50unsigned long readBFile (FILE *s, unsigned char *data, unsigned long maxSize)
51{
52 unsigned char x, y;
53 unsigned long byteCount = 0;
54
55 /* Strip the 1st two lines */
56 stripLine (s);
57 stripLine (s);
58
59 for (;;) {
60
61 /* read the 1st ascii char */
62 do {
63 x = fgetc (s);
64 if (x == (unsigned char)EOF)
65 return (byteCount);
66
67 } while (!asciiByte(x));
68
69 /* Read the next ascii char */
70 y = fgetc (s);
71 if (y == (unsigned char)EOF)
72 return (byteCount);
73 if (asciiByte(y))
74 data[byteCount++] = (toNum(x) << 4) | toNum (y);
75
76 if (byteCount >= maxSize) {
77 fprintf (stderr, "Max input array size exceeded\n");
78 return (-1);
79 }
80 }
81}
82
83
84int copyBlock (unsigned char *source, unsigned long idx, unsigned long maxSize,
85 unsigned char *dest, unsigned long count)
86{
87 unsigned long i;
88
89 for (i = 0; i < count; i++) {
90 if (idx >= maxSize)
91 break;
92
93 dest[i] = source[idx++];
94 }
95
96 return (i);
97
98}
99
100void blockCheckSum (unsigned char *block, unsigned long blockSize)
101{
102 unsigned checksum = 0;
103 unsigned value;
104 unsigned long i;
105
106 if (blockSize & 0x0001) {
107 fprintf (stderr, "program requires an even blocksize\n");
108 exit (-1);
109 }
110
111 for (i = 0; i < blockSize; i += 2) {
112 value = (block[i] << 8) | block[i+1];
113 checksum = onesComplementAdd (checksum, value);
114 }
115
116 /* Put the checksum into the block starting at byte 2. Use big endian */
117 checksum = ~checksum;
118 block[3] = checksum & 0xff;
119 block[2] = (checksum >> 8) & 0xff;
120
121}
122
123#define SIZE (1024 * 1024 * 2) /* max array size 2MB */
124
125int main (int argc, char *argv[])
126{
127 FILE *strin;
128 FILE *strout;
129
130 unsigned char *dataSet1;
131 unsigned char *dataSet2;
132
133 unsigned char block[128];
134 unsigned blockSize;
135
136 unsigned long pIn;
137 unsigned long pOut;
138
139 unsigned long inSize;
140 unsigned long i;
141
142 /* Arg check */
143 if (argc != 3) {
144 fprintf (stderr, "usage: %s infile outfile\n", argv[0]);
145 return (-1);
146 }
147
148 /* Open the input file */
149 strin = fopen (argv[1], "r");
150 if (strin == NULL) {
151 fprintf (stderr, "%s: Could not open file %s for reading\n", argv[0], argv[1]);
152 return (-1);
153 }
154
155 /* Allocate the two data set memories */
156 dataSet1 = malloc (SIZE * sizeof (unsigned char));
157 dataSet2 = malloc (SIZE * sizeof (unsigned char));
158 if ((dataSet1 == NULL) || (dataSet2 == NULL)) {
159 fprintf (stderr, "%s: Malloc failure\n", argv[0]);
160 return (-1);
161 }
162
163 /* Read the data into the byte stream */
164 if ((inSize = readBFile (strin, dataSet1, SIZE)) < 0)
165 return (inSize);
166 fclose (strin);
167
168 /* Perform the i2c block formatting. The block size will be fixed at 128 bytes,
169 * 2 bytes of length, 2 bytes checksum, 124 bytes of data. */
170 pIn = 0;
171 pOut = 0;
172
173 do {
174
175 /* Copy the block, leave 4 bytes at the top */
176 blockSize = copyBlock (dataSet1, pIn, inSize, &block[4], 124);
177 pIn += blockSize; /* advance to next data in source */
178
179 if (blockSize) {
180 blockSize += 4; /* Add room for the header - big endian */
181 block[1] = blockSize & 0xff;
182 block[0] = (blockSize >> 8) & 0xff;
183 block[2] = block[3] = 0;
184
185 /* Checksum the block */
186 blockCheckSum (block, blockSize);
187
188 /* Copy the results to the destination block */
189 if ((pOut + blockSize) >= SIZE) {
190 fprintf (stderr, "%s: destination array size exceeded\n", argv[0]);
191 return (-1);
192 }
193 for (i = 0; i < blockSize; i++)
194 dataSet2[pOut++] = block[i];
195 }
196
197 } while (blockSize == 128);
198
199
200 /* Copy the resulting data set into the output file in ccs format */
201 strout = fopen (argv[2], "w");
202 if (strout == NULL) {
203 fprintf (stderr, "%s: Could not open %s for writing\n", argv[0], argv[2]);
204 return (-1);
205 }
206
207
208 /* Write the two line header */
209 fprintf (strout, "%c\n$A000000\n", (unsigned char)2);
210
211 /* Write out the data */
212 for (i = 0; i < pOut; i++) {
213 if ( ((i+1)%24) )
214 fprintf (strout, "%02X ", dataSet2[i]);
215 else
216 fprintf (strout, "%02X\n", dataSet2[i]);
217 }
218
219 /* Write the close character */
220 fprintf (strout, "\n%c", (unsigned char)3);
221
222 fclose (strout);
223
224 return (0);
225
226}
diff --git a/boot_loader/examples/emac/Utilities/b2i2c.exe b/boot_loader/examples/emac/Utilities/b2i2c.exe
deleted file mode 100644
index a1d1822..0000000
--- a/boot_loader/examples/emac/Utilities/b2i2c.exe
+++ /dev/null
Binary files differ
diff --git a/boot_loader/examples/emac/Utilities/bootpacket.h b/boot_loader/examples/emac/Utilities/bootpacket.h
deleted file mode 100644
index 9d298de..0000000
--- a/boot_loader/examples/emac/Utilities/bootpacket.h
+++ /dev/null
@@ -1,77 +0,0 @@
1#ifndef bootpacket
2#define bootpacket
3
4typedef short int INT16;
5typedef int INT32;
6typedef unsigned short int UINT16;
7typedef unsigned int UINT32;
8
9#define DST_MAC_H 0x0008
10#define DST_MAC_M 0x7433
11#define DST_MAC_L 0x2630
12
13#define SRC_MAC_H 0x000D
14#define SRC_MAC_M 0x5676
15#define SRC_MAC_L 0x2F1A
16
17#define SRC_IP_ADDR_H 0x9EDA
18#define SRC_IP_ADDR_L 0x674E
19#define DST_IP_ADDR_H 0x9EDA
20#define DST_IP_ADDR_L 0x6723
21
22#define UDP_SRC_PORT 0x0
23#define UDP_SRC_PORT_BTPKT 0xBEEF /* Bill's bt-pkt.exe use this value */
24#define UDP_DST_PORT 0x9
25
26#define ETHER_TYPE_IP 0x800
27#define IP_TYPE_UDP 0x11
28
29#define MAGICNO 0x544B
30
31/* Actual packets has 14 +20 + 8 + 244 = 42 + 244 = 286 bytes */
32
33#define MAC_HEADER_LEN 14
34#define IP_HEADER_LEN 20
35#define UDP_HEADER_LEN 8
36#define BOOTTBL_HEADER_LEN 4
37#define TOTAL_HEADER_LEN 46 /* 14 + 20 + 8 + 4 = 46 bytes */
38
39#define MAX_PAYLOAD_LEN 244
40//#define MAX_PAYLOAD_LEN 1176
41#define MAX_BOOTTBL_LEN (MAX_PAYLOAD_LEN - BOOTTBL_HEADER_LEN) /* 240 bytes */
42
43#define SYMBOL 0xEA00
44#define BGN_BYTE_LEN 0x04 /* ex: 0x0000, 0x00A2 */
45#define END_BYTE_LEN 0x06 /* ex: EA00, 0000, 0000 */
46
47
48struct BootPacket {
49 INT16 dstMAC_H; /* MAC */
50 INT16 dstMAC_M;
51 INT16 dstMAC_L;
52 INT16 srcMAC_H;
53 INT16 srcMAC_M;
54 INT16 srcMAC_L;
55 INT16 EtherType;
56 INT16 VerTOS; /* IP */
57 UINT16 IPlength;
58 INT16 ID;
59 INT16 FlagsFrag;
60 INT16 TTLProtocol;
61 UINT16 IPchecksum;
62 INT16 srcIPAddr_H;
63 INT16 srcIPAddr_L;
64 INT16 dstIPAddr_H;
65 INT16 dstIPAddr_L;
66 INT16 srcPort; /* UDP */
67 INT16 dstPort;
68 UINT16 UDPlength;
69 UINT16 UDPchecksum;
70 INT16 MagicNo; /* Payload */
71 INT16 SeqNo;
72 INT16 BootTable[MAX_BOOTTBL_LEN/2];
73};
74
75
76
77#endif \ No newline at end of file
diff --git a/boot_loader/examples/emac/Utilities/build-msvc.bat b/boot_loader/examples/emac/Utilities/build-msvc.bat
deleted file mode 100644
index 99e3c83..0000000
--- a/boot_loader/examples/emac/Utilities/build-msvc.bat
+++ /dev/null
@@ -1,12 +0,0 @@
1;local
2set MSVCROOT=c:\progtool\msvc60\
3set PATH=%MSVCROOT%\vc98\bin;%MSVCROOT%\common\msdev98\bin;%PATH%
4set INCLUDE=%MSVCROOT%\vc98\include
5set LIB=%MSVCROOT%\vc98\lib
6
7cl b2ccs.c
8cl b2i2c.c
9cl bconvert64x.c
10cl bootpacket.c
11cl mergebtbl.c
12cl myparser.c
diff --git a/boot_loader/examples/emac/Utilities/mergebtbl.c b/boot_loader/examples/emac/Utilities/mergebtbl.c
deleted file mode 100644
index c237f23..0000000
--- a/boot_loader/examples/emac/Utilities/mergebtbl.c
+++ /dev/null
@@ -1,127 +0,0 @@
1/**************************************************************************************
2 * FILE PURPOSE: Merge multiple boot tables into one boot table
3 **************************************************************************************
4 * FILE NAME: mergebtbl.c
5 *
6 * Usage: mergebtbl inputfile1 inputfile2 ... outputfile
7 * Note: may not support single line boot table(hardly possible)
8 *
9 **************************************************************************************/
10#include <stdio.h>
11#include <string.h>
12
13
14int asciiByte (unsigned char c)
15{
16 if ((c >= '0') && (c <= '9'))
17 return (1);
18
19 if ((c >= 'A') && (c <= 'F'))
20 return (1);
21
22 return (0);
23}
24
25
26int main (int argc, char *argv[])
27{
28 FILE *strin;
29 FILE *strout;
30 int i,j,k;
31 int line;
32 int start;
33
34 char iline[132];
35 char iline2nd[132];
36
37 /* Verify the number of args */
38 if (argc < 3) {
39 printf ("usage: %s inpfile[1] ... infile[n] outfile\n", argv[0]);
40 return (-1);
41 }
42
43 strout = fopen (argv[argc-1], "w");
44 if (strout == NULL) {
45 printf ("could not open file %s to write\n",argv[argc-1]);
46 return (-1);
47 }
48
49 fputs("first line\n",strout);
50 fputs("second line\n",strout);
51
52 for(i=1; i<argc-1;i++) {
53
54 strin = fopen (argv[i], "r");
55 if (strin == NULL) {
56 printf ("could not open input file %s\n", argv[i]);
57 return (-1);
58 }
59
60 line = 0;
61
62 /* skip the next two lines */
63 fgets (iline, 132, strin);
64 fgets (iline, 132, strin);
65
66 if(fgets(iline2nd, 132, strin)==NULL) {
67 printf("error in boot table\n");
68 }
69
70 while(1) {
71 fgets(iline, 132, strin);
72 if(!asciiByte(iline[0])) break;
73 line++;
74
75 if(i!=1 && line==1) { /* if not the first file, get rid of entry point */
76 for(j=12; j<132; j++) {
77 if(iline2nd[j]=='\0') break;
78 fputc(iline2nd[j],strout);
79 }
80 } else {
81 fputs(iline2nd,strout);
82 }
83 strcpy(iline2nd,iline);
84 } /* while */
85
86 if(i!=argc-2) { /* If not the last file, get rid of ending 00 00 00 00 */
87 for(j=0,start=0;j<132;j+=2){
88 if((iline2nd[j]=='0')&&(iline2nd[j+1]=='0')) {
89 if(start) k++;
90 else if((j-j/4*4)==0) {
91 start = 1; /* not count from any 00 */
92 k=1;
93 }
94 }
95 else {
96 start = 0;
97 k=0;
98 }
99
100 if(k==4) { // when 00 00 00 00 reached
101 if(asciiByte(iline2nd[j+3])) { //if the next char is still ASCII
102 start = 0;
103 } else break; /* Ending 00 00 00 00 reach */
104 }
105 j++; /* skip the space */
106 }
107
108 if((k==4) && (j>10)) {
109 for(k=0;k<j-10;k++){
110 fputc(iline2nd[k],strout);
111 }
112 fputc('\n',strout);
113 }
114 } else {
115 fputs(iline2nd,strout);
116 }
117
118 fclose(strin);
119 } /* for */
120
121 fputc(0x04,strout); /* any non-ASCII character */
122
123 fclose(strout);
124
125 return (0);
126}
127
diff --git a/boot_loader/examples/emac/Utilities/mergebtbl.exe b/boot_loader/examples/emac/Utilities/mergebtbl.exe
deleted file mode 100644
index 8fbc185..0000000
--- a/boot_loader/examples/emac/Utilities/mergebtbl.exe
+++ /dev/null
Binary files differ
diff --git a/boot_loader/examples/emac/Utilities/myparser.c b/boot_loader/examples/emac/Utilities/myparser.c
deleted file mode 100644
index fe986f7..0000000
--- a/boot_loader/examples/emac/Utilities/myparser.c
+++ /dev/null
@@ -1,157 +0,0 @@
1/**************************************************************************************
2 * FILE PURPOSE: Merge I2C boot parameter and boot table into one final .ccs file
3 **************************************************************************************
4 * FILE NAME: myparser.c
5 *
6 * Usage: myparser input.ccs input.txt output.ccs
7 *
8 * Note: this code can be improved to support read boot table not from offset 0x20 but anywhere
9 *
10 **************************************************************************************/
11#include <stdio.h>
12#include <string.h>
13
14
15/***************************************************************************************
16 * FUNCTION PURPOSE: The main program
17 ***************************************************************************************
18 * DESCRIPTION: Performs the conversion from ccs format to qt format
19 ***************************************************************************************/
20int main (int argc, char *argv[])
21{
22 FILE *strin1;
23 FILE *strin2;
24 FILE *strout;
25
26 int a,b,c,d,n1,n;
27 int i, table;
28 int num_tables;
29 int table_size;
30 int rem_lines;
31 long int temp;
32
33 char iline[132];
34 char iline2[132];
35
36 /* Verify the number of args */
37 if (argc != 4) {
38 printf ("usage: %s input.ccs input.txt output.ccs\n", argv[0]);
39 return (-1);
40 }
41
42 /* Open all the files */
43 strin1 = fopen (argv[1], "r");
44 if (strin1 == NULL) {
45 printf ("could not open input file %s\n", argv[1]);
46 return (-1);
47 }
48
49 strin2 = fopen (argv[2], "r");
50 if (strin2 == NULL) {
51 printf ("could not open input file %s\n", argv[2]);
52 return (-1);
53 }
54
55 strout = fopen (argv[3], "w");
56 if (strout == NULL) {
57 printf ("could not open file %s to write\n",argv[3]);
58 return (-1);
59 }
60
61 /* Read the header */
62 fgets (iline, 132, strin1);
63 sscanf (iline, "%x %x %x %x %x", &a, &b, &c, &d, &n1);
64
65 /* read the first config line - get number of tables in the file */
66 fgets(iline,132,strin2);
67 sscanf (iline, "%x", &num_tables);
68
69 if (num_tables == 0)
70 {
71 printf("Error in I2C configure file, num tables = 0.\n");
72 return(-1);
73 }
74 printf("Reading %d tables from I2C configure file\n", num_tables);
75
76 n = n1 + (32 * num_tables) + 2;
77
78 /* Write the CCS header */
79 fprintf (strout, "1651 1 10890000 1 %x\n", n);
80 fprintf (strout, "0x%08x\n",n*4-8);
81 fprintf (strout, "0x%08x\n",0);
82
83
84 /* Prime the loop: read the table size from the first line */
85 if (fgets(iline,132,strin2)==NULL)
86 {
87 fclose(strin1);
88 fclose(strin2);
89 fclose(strout);
90 printf("Error in I2C configure file\n");
91 return(-1);
92 }
93
94 for (table = 0; table < num_tables; table++)
95 {
96 strncpy(iline2, iline, 6); //get the first 16 bits (0xffff)
97 iline2[6] = 0; //make sure it's null terminated
98 sscanf (iline2, "%x", &table_size);
99 fprintf(strout, "%s", iline);
100
101 printf(" Table %d size %d\n", table+1, table_size);
102
103 /* There must be table_size / 4 lines in the file. */
104 for (i = 1; i < (table_size / 4); i++)
105 {
106 if (fgets(iline,132,strin2)==NULL)
107 {
108 fclose(strin1);
109 fclose(strin2);
110 fclose(strout);
111 printf("Error in I2C configure file\n");
112 return(-1);
113 }
114
115 fprintf (strout, "%s",iline);
116 }
117
118 rem_lines = (128 - table_size) / 4;
119
120 /* Read remaining lines, or encounter the next header early. */
121 for (i = 0; i < rem_lines; i++)
122 {
123 if (fgets(iline,132,strin2)==NULL) break;
124
125 strncpy(iline2, iline, 10); //get just the hex number
126 iline2[10] = 0; //make sure it's null terminated
127 sscanf (iline2, "%x", &temp);
128 if (temp != 0) break;
129 fprintf (strout, "%s",iline);
130 }
131
132 if (i < rem_lines) //encountered next header early, add remaining lines
133 {
134 rem_lines -= i;
135
136 for (i = 0; i < rem_lines; i++)
137 fprintf (strout, "0x%08x\n",0);
138 }
139 else if (table < (num_tables - 1))
140 {
141 fgets(iline,132,strin2); //read the next header
142 }
143 }
144
145 fclose(strin2);
146
147 for (i=0; i < n1; i++)
148 {
149 fgets(iline,132,strin1);
150 fprintf (strout, "%s",iline);
151 }
152
153 fclose(strin1);
154 fclose(strout);
155
156 return (0);
157}
diff --git a/boot_loader/examples/emac/Utilities/myparser.exe b/boot_loader/examples/emac/Utilities/myparser.exe
deleted file mode 100644
index 3c1839c..0000000
--- a/boot_loader/examples/emac/Utilities/myparser.exe
+++ /dev/null
Binary files differ
diff --git a/boot_loader/examples/emac/simple/simple.btbl b/boot_loader/examples/emac/simple/simple.btbl
deleted file mode 100644
index eb67ebb..0000000
--- a/boot_loader/examples/emac/simple/simple.btbl
+++ /dev/null
@@ -1,10 +0,0 @@
1
2$A0400,
300 81 00 00 00 00 00 40 00 81 00 00 00 99 A2 28 00 88 91 68 01 01 00 A8
401 00 40 E8 01 08 02 26 01 81 08 28 01 80 40 E8 01 8C 36 26 02 0C 02 26
500 01 A1 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
600 00 00 00
700 00 00 04 00 81 01 00 12 34 AB CD
800 00 00 01 00 81 02 01 00 00 00 12
900 00 00 02 00 81 02 10 00 00 34 12 00 00 00 00
10 \ No newline at end of file
diff --git a/boot_loader/examples/emac/simple/simple.le.btbl b/boot_loader/examples/emac/simple/simple.le.btbl
deleted file mode 100644
index c528049..0000000
--- a/boot_loader/examples/emac/simple/simple.le.btbl
+++ /dev/null
@@ -1,8 +0,0 @@
1
2$A000000
300 81 00 00 00 00 00 40 00 81 00 00 00 99 A2 28 00 88 91 68 01 01 00 A8
401 00 40 E8 01 08 02 26 01 81 08 28 01 80 40 E8 01 8C 36 26 02 0C 02 26
500 01 A1 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
600 00 00 00 00 00 00 04 00 81 01 00 12 34 AB CD 00 00 00 01 00 81 02 01
712 00 00 00 00 00 00 02 00 81 02 10 12 34 00 00 00 00 00 00
8 \ No newline at end of file
diff --git a/boot_loader/examples/emac/simple/simple.map b/boot_loader/examples/emac/simple/simple.map
deleted file mode 100644
index fbfc4f9..0000000
--- a/boot_loader/examples/emac/simple/simple.map
+++ /dev/null
@@ -1,95 +0,0 @@
1******************************************************************************
2 TMS320C6x Linker PC v7.2.0
3******************************************************************************
4>> Linked Mon May 02 11:08:25 2011
5
6OUTPUT FILE NAME: <simple.out>
7ENTRY POINT SYMBOL: "_c_int00" address: 00810000
8
9
10MEMORY CONFIGURATION
11
12 name origin length used unused attr fill
13---------------------- -------- --------- -------- -------- ---- --------
14 TEXT 00810000 00000040 00000040 00000000 RWIX
15 DATA 00810100 00000004 00000004 00000000 RWIX
16 BYTE1 00810201 00000001 00000001 00000000 RWIX
17 BYTE2 00810210 00000002 00000002 00000000 RWIX
18
19
20SECTION ALLOCATION MAP
21
22 output attributes/
23section page origin length input sections
24-------- ---- ---------- ---------- ----------------
25.text 0 00810000 00000040
26 00810000 00000040 simple.obj (.text)
27
28.data 0 00810100 00000004
29 00810100 00000004 simple.obj (.data)
30
31.byte1 0 00810201 00000001
32 00810201 00000001 simple.obj (.byte1)
33
34.byte2 0 00810210 00000002
35 00810210 00000002 simple.obj (.byte2)
36
37
38GLOBAL SYMBOLS: SORTED ALPHABETICALLY BY Name
39
40address name
41-------- ----
4200000000 $bss
4300810100 .data
4400810000 .text
45ffffffff ___TI_pprof_out_hndl
46ffffffff ___TI_prof_data_size
47ffffffff ___TI_prof_data_start
48ffffffff ___binit__
49ffffffff ___c_args__
50ffffffff ___cinit__
5100810100 ___data__
5200810104 ___edata__
5300810040 ___etext__
54ffffffff ___pinit__
5500810000 ___text__
5600810000 _c_int00
57ffffffff binit
5800810201 byte1
5900810210 byte2
60ffffffff cinit
6100810104 edata
6200810040 etext
63ffffffff pinit
6400810100 someData
65
66
67GLOBAL SYMBOLS: SORTED BY Symbol Address
68
69address name
70-------- ----
7100000000 $bss
7200810000 .text
7300810000 ___text__
7400810000 _c_int00
7500810040 ___etext__
7600810040 etext
7700810100 .data
7800810100 ___data__
7900810100 someData
8000810104 ___edata__
8100810104 edata
8200810201 byte1
8300810210 byte2
84ffffffff ___TI_pprof_out_hndl
85ffffffff ___TI_prof_data_size
86ffffffff ___TI_prof_data_start
87ffffffff ___binit__
88ffffffff ___c_args__
89ffffffff ___cinit__
90ffffffff ___pinit__
91ffffffff binit
92ffffffff cinit
93ffffffff pinit
94
95[23 symbols]
diff --git a/boot_loader/examples/emac/simple/simple.obj b/boot_loader/examples/emac/simple/simple.obj
deleted file mode 100644
index 59de594..0000000
--- a/boot_loader/examples/emac/simple/simple.obj
+++ /dev/null
Binary files differ
diff --git a/boot_loader/examples/emac/simple/simple.out b/boot_loader/examples/emac/simple/simple.out
deleted file mode 100644
index 54460bc..0000000
--- a/boot_loader/examples/emac/simple/simple.out
+++ /dev/null
Binary files differ
diff --git a/boot_loader/examples/emac/simple/simple.s b/boot_loader/examples/emac/simple/simple.s
deleted file mode 100644
index 1e233a1..0000000
--- a/boot_loader/examples/emac/simple/simple.s
+++ /dev/null
@@ -1,64 +0,0 @@
1;****************************************************************************
2;* FILE PURPOSE: Code a simple endian independent example
3;****************************************************************************
4;* FILE NAME: Simple.s
5;*
6;* DESCRIPTION: This program is part of the Himalaya I2C boot test plan.
7;* It is a simple program that defines two initialized
8;* sections, text and data, and performs a simple
9;* execution with a self check on the results in register a0.
10;*
11;* The code is also designed to be relocatable, so it will
12;* function in the himsim program running on the DM642.
13;*
14;*****************************************************************************
15
16;*****************************************************************************
17;* Initialized data
18;*****************************************************************************
19 .data
20 .def someData
21someData .word 01234ABCDh
22
23 .def byte1
24 .sect ".byte1"
25byte1: .byte 0x12
26
27 .def byte2
28 .sect ".byte2"
29byte2: .byte 0x12, 0x34
30
31;*****************************************************************************
32;* code
33;*****************************************************************************
34 .text
35 .def _c_int00
36
37myConst .equ 011223344h
38
39_c_int00:
40
41 MVKL.S1 myConst, A1
42 MVKH.S1 myConst, A1
43
44 MVKL.S1 byte1, A2
45 MVKH.S1 byte1, A2
46 LDB.D1 *A2, B2
47
48 MVKL.S1 byte2, A3
49 MVKH.S1 byte2, A3
50 LDB.D1 *A3++, B3
51 LDB.D1 *A3, B4
52
53
54etrap:
55
56 BNOP.S1 etrap, 5
57
58
59
60
61
62
63
64
diff --git a/boot_loader/examples/emac/Ethernet_boot/pcsendpkt.c b/boot_loader/examples/ethernet/Ethernet_boot/pcsendpkt.c
index 587ca2f..c3c07fd 100644
--- a/boot_loader/examples/emac/Ethernet_boot/pcsendpkt.c
+++ b/boot_loader/examples/ethernet/Ethernet_boot/pcsendpkt.c
@@ -1,3 +1,35 @@
1/******************************************************************************
2 * Copyright (c) 2011 Texas Instruments Incorporated - http://www.ti.com
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 *
8 * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 *
11 * Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the
14 * distribution.
15 *
16 * Neither the name of Texas Instruments Incorporated nor the names of
17 * its contributors may be used to endorse or promote products derived
18 * from this software without specific prior written permission.
19 *
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 *
32 *****************************************************************************/
1#include <windows.h> 33#include <windows.h>
2#include <stdio.h> 34#include <stdio.h>
3#include <time.h> 35#include <time.h>
@@ -111,7 +143,7 @@ int main( int argc, char *argv[] )
111 /* get length in bytes */ 143 /* get length in bytes */
112 if(fgets(iline, 131, strin)==NULL) break; 144 if(fgets(iline, 131, strin)==NULL) break;
113 length = toNum(iline[2])<<12 | toNum(iline[3])<<8 | toNum(iline[4])<<4 | toNum(iline[5]); 145 length = toNum(iline[2])<<12 | toNum(iline[3])<<8 | toNum(iline[4])<<4 | toNum(iline[5]);
114 if(length == 0) break; 146 if(length == 0) break;
115 else if(length < UDP_LOW || length > UDP_HIGH) { 147 else if(length < UDP_LOW || length > UDP_HIGH) {
116 printf("Invalid length = %d\n",length); 148 printf("Invalid length = %d\n",length);
117 goto end; 149 goto end;
@@ -148,7 +180,7 @@ int main( int argc, char *argv[] )
148 /* packet number */ 180 /* packet number */
149 packetno++; 181 packetno++;
150 printf("Packet %d sent\n",packetno); 182 printf("Packet %d sent\n",packetno);
151 183
152 /* add delay between packets */ 184 /* add delay between packets */
153 for(i=0; i<DELAY; i++) { 185 for(i=0; i<DELAY; i++) {
154 tmp4 = tmp3; 186 tmp4 = tmp3;
diff --git a/boot_loader/examples/emac/Ethernet_boot/pcsendpkt.exe b/boot_loader/examples/ethernet/Ethernet_boot/pcsendpkt.exe
index 4e7173d..4e7173d 100644
--- a/boot_loader/examples/emac/Ethernet_boot/pcsendpkt.exe
+++ b/boot_loader/examples/ethernet/Ethernet_boot/pcsendpkt.exe
Binary files differ
diff --git a/boot_loader/examples/emac/Ethernet_boot/simple.eth b/boot_loader/examples/ethernet/Ethernet_boot/simple.eth
index fcbbb2c..fcbbb2c 100644
--- a/boot_loader/examples/emac/Ethernet_boot/simple.eth
+++ b/boot_loader/examples/ethernet/Ethernet_boot/simple.eth
diff --git a/boot_loader/examples/emac/Utilities/bconvert64x.c b/boot_loader/examples/ethernet/Utilities/bconvert64x.c
index 98b0dfd..c6b1b27 100644
--- a/boot_loader/examples/emac/Utilities/bconvert64x.c
+++ b/boot_loader/examples/ethernet/Utilities/bconvert64x.c
@@ -1,6 +1,39 @@
1/******************************************************************************
2 * Copyright (c) 2011 Texas Instruments Incorporated - http://www.ti.com
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 *
8 * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 *
11 * Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the
14 * distribution.
15 *
16 * Neither the name of Texas Instruments Incorporated nor the names of
17 * its contributors may be used to endorse or promote products derived
18 * from this software without specific prior written permission.
19 *
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 *
32 *****************************************************************************/
33
1/************************************************************************************ 34/************************************************************************************
2 * FILE PURPOSE: Convert a hex6x boot table file into the format required 35 * FILE PURPOSE: Convert a hex6x boot table file into the format required
3 * by the c6x chip boot loader. 36 * by the c6x chip boot loader.
4 ************************************************************************************ 37 ************************************************************************************
5 * FILE NAME: bconvert.c 38 * FILE NAME: bconvert.c
6 * 39 *
@@ -16,8 +49,8 @@
16 * | Data byte | Data byte | Data byte | Data byte | / 49 * | Data byte | Data byte | Data byte | Data byte | /
17 * +-------------+-------------+-------------+--------------+ / 50 * +-------------+-------------+-------------+--------------+ /
18 * | Data byte | Data byte | Data byte | Data byte | / 51 * | Data byte | Data byte | Data byte | Data byte | /
19 * +-------------+-------------+-------------+--------------+ 52 * +-------------+-------------+-------------+--------------+
20 * | 32 bit zero byte count (end of boot table) | 53 * | 32 bit zero byte count (end of boot table) |
21 * \--------------------------------------------------------/ 54 * \--------------------------------------------------------/
22 * 55 *
23 * 56 *
@@ -67,7 +100,7 @@ enum {
67 ERR_VALUE16_SIZE_ERR, 100 ERR_VALUE16_SIZE_ERR,
68 ERR_DATA32_SIZE_ERR, 101 ERR_DATA32_SIZE_ERR,
69 ERR_REG32_PARSE_ERROR, 102 ERR_REG32_PARSE_ERROR,
70 ERR_DATA32_REMAIN_ERR 103 ERR_DATA32_REMAIN_ERR
71}; 104};
72 105
73enum { 106enum {
@@ -213,7 +246,7 @@ int parseit (int argc, char *argv[], FILE **fin, FILE **fout, int *endian)
213 246
214 247
215 /* Make sure endian is known */ 248 /* Make sure endian is known */
216 if (!espec) 249 if (!espec)
217 return (ERR_PARSE_NO_ENDIAN); 250 return (ERR_PARSE_NO_ENDIAN);
218 251
219 /* Open input file if not stdin */ 252 /* Open input file if not stdin */
@@ -229,7 +262,7 @@ int parseit (int argc, char *argv[], FILE **fin, FILE **fout, int *endian)
229 if (*fout == NULL) 262 if (*fout == NULL)
230 return (ERR_PARSE_OUTPUT_OPEN_FAIL); 263 return (ERR_PARSE_OUTPUT_OPEN_FAIL);
231 } 264 }
232 265
233 return (0); 266 return (0);
234 267
235} /* parseit */ 268} /* parseit */
@@ -378,7 +411,7 @@ unsigned value32bitAdd (int endian, unsigned char *data, unsigned n, unsigned *p
378 v = (unsigned)data[w+0] << 24 | 411 v = (unsigned)data[w+0] << 24 |
379 (unsigned)data[w+1] << 16 | 412 (unsigned)data[w+1] << 16 |
380 (unsigned)data[w+2] << 8 | 413 (unsigned)data[w+2] << 8 |
381 (unsigned)data[w+3] << 0 ; 414 (unsigned)data[w+3] << 0 ;
382 415
383 *errflag = 0; 416 *errflag = 0;
384 417
@@ -411,9 +444,9 @@ unsigned value32bit (int endian, unsigned char *data, unsigned n, unsigned *p, i
411 444
412 445
413/********************************************************************************* 446/*********************************************************************************
414 * FUNCTION PURPOSE: Convert up to four bytes to big endian 447 * FUNCTION PURPOSE: Convert up to four bytes to big endian
415 ********************************************************************************* 448 *********************************************************************************
416 * DESCRIPTION: Data bytes are converted. 449 * DESCRIPTION: Data bytes are converted.
417 *********************************************************************************/ 450 *********************************************************************************/
418#define SWAP(x,y,z) (z)=(x);(x)=(y);(y)=(z) 451#define SWAP(x,y,z) (z)=(x);(x)=(y);(y)=(z)
419void data32bit (int endian, unsigned char *data, unsigned n, unsigned *p, unsigned m, int *errflag) 452void data32bit (int endian, unsigned char *data, unsigned n, unsigned *p, unsigned m, int *errflag)
@@ -551,10 +584,10 @@ void writeBFile (FILE *fout, unsigned char *data, unsigned n)
551 fclose (fout); 584 fclose (fout);
552 585
553} /* writeBFile */ 586} /* writeBFile */
554 587
555 588
556/************************************************************************************** 589/**************************************************************************************
557 * FUNCTION PURPOSE: Main 590 * FUNCTION PURPOSE: Main
558 ************************************************************************************** 591 **************************************************************************************
559 * DESCRIPTION: Provides the top level program flow. 592 * DESCRIPTION: Provides the top level program flow.
560 **************************************************************************************/ 593 **************************************************************************************/
@@ -570,7 +603,7 @@ int main (int argc, char *argv[])
570 unsigned n32; /* Number of bytes that form complete 32 bit values */ 603 unsigned n32; /* Number of bytes that form complete 32 bit values */
571 unsigned r32; /* Number of bytes remaining (0-3) */ 604 unsigned r32; /* Number of bytes remaining (0-3) */
572 605
573 int endian; /* Endian */ 606 int endian; /* Endian */
574 int errflag; /* error indicator */ 607 int errflag; /* error indicator */
575 int i, j; /* loop var */ 608 int i, j; /* loop var */
576 int origRegs; /* original reg count */ 609 int origRegs; /* original reg count */
@@ -603,8 +636,8 @@ int main (int argc, char *argv[])
603 636
604 /* The sections */ 637 /* The sections */
605 do { 638 do {
606 639
607 /* Get the section byte count */ 640 /* Get the section byte count */
608 v = value32bit (endian, data, n, &p, &errflag); 641 v = value32bit (endian, data, n, &p, &errflag);
609 if (errflag) { 642 if (errflag) {
610 showErr (errflag); 643 showErr (errflag);
@@ -650,17 +683,17 @@ int main (int argc, char *argv[])
650 /* Return resources */ 683 /* Return resources */
651 free (data); 684 free (data);
652 685
653 return (0); 686 return (0);
654 687
655} 688}
656
657 689
658 690
659 691
660 692
661 693
662 694
663 695
696
664 697
665 698
666 699
diff --git a/boot_loader/examples/emac/Utilities/bconvert64x.exe b/boot_loader/examples/ethernet/Utilities/bconvert64x.exe
index f17b5f7..f17b5f7 100644
--- a/boot_loader/examples/emac/Utilities/bconvert64x.exe
+++ b/boot_loader/examples/ethernet/Utilities/bconvert64x.exe
Binary files differ
diff --git a/boot_loader/examples/emac/Utilities/bootpacket.c b/boot_loader/examples/ethernet/Utilities/bootpacket.c
index e11d4f5..6beb46d 100644
--- a/boot_loader/examples/emac/Utilities/bootpacket.c
+++ b/boot_loader/examples/ethernet/Utilities/bootpacket.c
@@ -1,7 +1,38 @@
1/* Convert a boot table to Ethernet boot format */ 1/******************************************************************************
2/* A simple utility program written by D.Zhou */ 2 * Copyright (c) 2011 Texas Instruments Incorporated - http://www.ti.com
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 *
8 * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 *
11 * Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the
14 * distribution.
15 *
16 * Neither the name of Texas Instruments Incorporated nor the names of
17 * its contributors may be used to endorse or promote products derived
18 * from this software without specific prior written permission.
19 *
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 *
32 *****************************************************************************/
33
34/* A simple utility program to convert a boot table to Ethernet boot format */
3/* Version: 0.3 */ 35/* Version: 0.3 */
4/* Last modified on: June 14,2006 */
5 36
6 37
7#include <stdio.h> 38#include <stdio.h>
@@ -72,7 +103,7 @@ int toNumMAC (unsigned char c)
72 else if ((c >= 'a') && (c <= 'f')) 103 else if ((c >= 'a') && (c <= 'f'))
73 return(c - 'a' + 10); 104 return(c - 'a' + 10);
74 105
75 else if(c == ':') 106 else if(c == ':')
76 return(100); 107 return(100);
77 108
78 return(200); 109 return(200);
@@ -104,7 +135,7 @@ int getFileSize (FILE *s)
104 y = fgetc (s); 135 y = fgetc (s);
105 if (y == (unsigned char)EOF) 136 if (y == (unsigned char)EOF)
106 return (byteCount); 137 return (byteCount);
107 if (asciiByte(y)) 138 if (asciiByte(y))
108 byteCount++; 139 byteCount++;
109 } 140 }
110} 141}
@@ -179,7 +210,7 @@ UINT16 bootmiscOnesComplementAdd (UINT16 value1, UINT16 value2)
179 result = (result >> 16) + (result & 0xFFFF); /* add in carry */ 210 result = (result >> 16) + (result & 0xFFFF); /* add in carry */
180 result += (result >> 16); /* maybe one more */ 211 result += (result >> 16); /* maybe one more */
181 return (UINT16)result; 212 return (UINT16)result;
182} 213}
183 214
184 215
185 216
@@ -194,21 +225,21 @@ UINT16 bootmiscOnesComplementAdd (UINT16 value1, UINT16 value2)
194 p_data++; 225 p_data++;
195 len--; 226 len--;
196 } 227 }
197 return ((unsigned short) ~chksum); 228 return ((unsigned short) ~chksum);
198} 229}
199 230
200 231
201 232
202/* 233/*
203 Input file format: boot table in big endian format 234 Input file format: boot table in big endian format
204 235
205 Output file format: 236 Output file format:
206 237
207 1st line: CCS data format 238 1st line: CCS data format
208 2nd line: 0x0000 239 2nd line: 0x0000
209 3rd line: length of first packet in bytes, length counts not include itself 240 3rd line: length of first packet in bytes, length counts not include itself
210 ....... 241 .......
211 first packet 242 first packet
212 ....... 243 .......
213 244
214 0xEA00 245 0xEA00
@@ -217,7 +248,7 @@ UINT16 bootmiscOnesComplementAdd (UINT16 value1, UINT16 value2)
217 ....... 248 .......
218 second packet 249 second packet
219 ....... 250 .......
220 251
221 252
222 0xEA00 253 0xEA00
223 0x0000 254 0x0000
@@ -226,7 +257,7 @@ UINT16 bootmiscOnesComplementAdd (UINT16 value1, UINT16 value2)
226 other packets 257 other packets
227 ....... 258 .......
228 259
229 0xEA00 260 0xEA00
230 0X0000 261 0X0000
231 0X0000: end of the file 262 0X0000: end of the file
232*/ 263*/
@@ -320,7 +351,7 @@ void main (int argc, char *argv[])
320 data.srcMAC_L = (unsigned short)(MACaddr[4]<<8 | MACaddr[5]); 351 data.srcMAC_L = (unsigned short)(MACaddr[4]<<8 | MACaddr[5]);
321 352
322 } else { /* use default MAC address */ 353 } else { /* use default MAC address */
323 data.dstMAC_H = (unsigned short)DST_MAC_H; 354 data.dstMAC_H = (unsigned short)DST_MAC_H;
324 data.dstMAC_M = (unsigned short)DST_MAC_M; 355 data.dstMAC_M = (unsigned short)DST_MAC_M;
325 data.dstMAC_L = (unsigned short)DST_MAC_L; 356 data.dstMAC_L = (unsigned short)DST_MAC_L;
326 data.srcMAC_H = (unsigned short)SRC_MAC_H; 357 data.srcMAC_H = (unsigned short)SRC_MAC_H;
@@ -407,19 +438,19 @@ void main (int argc, char *argv[])
407 438
408 fprintf (strout, "0x%04X\n",0x0000); 439 fprintf (strout, "0x%04X\n",0x0000);
409 fprintf (strout, "0x%04X\n",TOTAL_HEADER_LEN+MAX_BOOTTBL_LEN); /* length in bytes */ 440 fprintf (strout, "0x%04X\n",TOTAL_HEADER_LEN+MAX_BOOTTBL_LEN); /* length in bytes */
410 441
411 data.UDPlength = UDP_HEADER_LEN + BOOTTBL_HEADER_LEN + MAX_BOOTTBL_LEN; 442 data.UDPlength = UDP_HEADER_LEN + BOOTTBL_HEADER_LEN + MAX_BOOTTBL_LEN;
412 data.IPlength = data.UDPlength + IP_HEADER_LEN; 443 data.IPlength = data.UDPlength + IP_HEADER_LEN;
413 UDPchecksum = bootmiscOnesComplementAdd(IP_TYPE_UDP, data.UDPlength); 444 UDPchecksum = bootmiscOnesComplementAdd(IP_TYPE_UDP, data.UDPlength);
414 445
415 for(j=0; j<counter; j++) { // For first and middle packets 446 for(j=0; j<counter; j++) { // For first and middle packets
416 447
417 data.IPchecksum=bootmiscOnesComplementChksum(0,&data.VerTOS,IP_HEADER_LEN/2); 448 data.IPchecksum=bootmiscOnesComplementChksum(0,&data.VerTOS,IP_HEADER_LEN/2);
418 449
419 if(getDataIn(strin, MAX_BOOTTBL_LEN, data.BootTable)!=0) { 450 if(getDataIn(strin, MAX_BOOTTBL_LEN, data.BootTable)!=0) {
420 fclose(strin); 451 fclose(strin);
421 fclose(strout); 452 fclose(strout);
422 return; 453 return;
423 }; 454 };
424 455
425 data.UDPchecksum=bootmiscOnesComplementChksum(UDPchecksum, &data.srcIPAddr_H,\ 456 data.UDPchecksum=bootmiscOnesComplementChksum(UDPchecksum, &data.srcIPAddr_H,\
@@ -444,7 +475,7 @@ void main (int argc, char *argv[])
444 data.IPchecksum = 0x0000; 475 data.IPchecksum = 0x0000;
445 data.UDPchecksum = 0x0000; 476 data.UDPchecksum = 0x0000;
446 477
447 } 478 }
448 479
449 // For the last packet 480 // For the last packet
450 temp = counter*MAX_BOOTTBL_LEN; 481 temp = counter*MAX_BOOTTBL_LEN;
diff --git a/boot_loader/examples/emac/Utilities/bootpacket.exe b/boot_loader/examples/ethernet/Utilities/bootpacket.exe
index cc11e0e..cc11e0e 100644
--- a/boot_loader/examples/emac/Utilities/bootpacket.exe
+++ b/boot_loader/examples/ethernet/Utilities/bootpacket.exe
Binary files differ
diff --git a/boot_loader/examples/ethernet/Utilities/bootpacket.h b/boot_loader/examples/ethernet/Utilities/bootpacket.h
new file mode 100644
index 0000000..a31a2df
--- /dev/null
+++ b/boot_loader/examples/ethernet/Utilities/bootpacket.h
@@ -0,0 +1,110 @@
1/******************************************************************************
2 * Copyright (c) 2011 Texas Instruments Incorporated - http://www.ti.com
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 *
8 * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 *
11 * Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the
14 * distribution.
15 *
16 * Neither the name of Texas Instruments Incorporated nor the names of
17 * its contributors may be used to endorse or promote products derived
18 * from this software without specific prior written permission.
19 *
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 *
32 *****************************************************************************/
33
34#ifndef bootpacket
35#define bootpacket
36
37typedef short int INT16;
38typedef int INT32;
39typedef unsigned short int UINT16;
40typedef unsigned int UINT32;
41
42#define DST_MAC_H 0x0008
43#define DST_MAC_M 0x7433
44#define DST_MAC_L 0x2630
45
46#define SRC_MAC_H 0x000D
47#define SRC_MAC_M 0x5676
48#define SRC_MAC_L 0x2F1A
49
50#define SRC_IP_ADDR_H 0x9EDA
51#define SRC_IP_ADDR_L 0x674E
52#define DST_IP_ADDR_H 0x9EDA
53#define DST_IP_ADDR_L 0x6723
54
55#define UDP_SRC_PORT 0x0
56#define UDP_SRC_PORT_BTPKT 0xBEEF /* Bill's bt-pkt.exe use this value */
57#define UDP_DST_PORT 0x9
58
59#define ETHER_TYPE_IP 0x800
60#define IP_TYPE_UDP 0x11
61
62#define MAGICNO 0x544B
63
64/* Actual packets has 14 +20 + 8 + 244 = 42 + 244 = 286 bytes */
65
66#define MAC_HEADER_LEN 14
67#define IP_HEADER_LEN 20
68#define UDP_HEADER_LEN 8
69#define BOOTTBL_HEADER_LEN 4
70#define TOTAL_HEADER_LEN 46 /* 14 + 20 + 8 + 4 = 46 bytes */
71
72#define MAX_PAYLOAD_LEN 244
73//#define MAX_PAYLOAD_LEN 1176
74#define MAX_BOOTTBL_LEN (MAX_PAYLOAD_LEN - BOOTTBL_HEADER_LEN) /* 240 bytes */
75
76#define SYMBOL 0xEA00
77#define BGN_BYTE_LEN 0x04 /* ex: 0x0000, 0x00A2 */
78#define END_BYTE_LEN 0x06 /* ex: EA00, 0000, 0000 */
79
80
81struct BootPacket {
82 INT16 dstMAC_H; /* MAC */
83 INT16 dstMAC_M;
84 INT16 dstMAC_L;
85 INT16 srcMAC_H;
86 INT16 srcMAC_M;
87 INT16 srcMAC_L;
88 INT16 EtherType;
89 INT16 VerTOS; /* IP */
90 UINT16 IPlength;
91 INT16 ID;
92 INT16 FlagsFrag;
93 INT16 TTLProtocol;
94 UINT16 IPchecksum;
95 INT16 srcIPAddr_H;
96 INT16 srcIPAddr_L;
97 INT16 dstIPAddr_H;
98 INT16 dstIPAddr_L;
99 INT16 srcPort; /* UDP */
100 INT16 dstPort;
101 UINT16 UDPlength;
102 UINT16 UDPchecksum;
103 INT16 MagicNo; /* Payload */
104 INT16 SeqNo;
105 INT16 BootTable[MAX_BOOTTBL_LEN/2];
106};
107
108
109
110#endif \ No newline at end of file
diff --git a/boot_loader/examples/ethernet/docs/README.txt b/boot_loader/examples/ethernet/docs/README.txt
new file mode 100644
index 0000000..d0f0a85
--- /dev/null
+++ b/boot_loader/examples/ethernet/docs/README.txt
@@ -0,0 +1,62 @@
1ROM Ethernet boot example
2
3A simple example demonstrating ROM Ethernet boot.
4
5
6Directory structure:
7
8docs - directory contains the README.txt
9simple - directory contains the batch/make file to build the simple example
10Utilities - directory contains the utilities to convert the hex6x boot table file
11 to the Ethernet boot format data file:
12
13 bconvert64x.exe - Convert a hex6x boot table file into the format required
14 by the c6x chip boot loader.
15 bootpacket.exe - Convert a boot table to Ethernet boot format
16
17
18Steps to build the example:
19
201. Run "simple.bat" under "tools\boot_loader\examples\ethernet\simple\". This will build the simple.out and use
21 hex6x.exe (delivered in CG tools package) to convert the .out to a boot table file, and then use the
22 bconvert64x.exe/bootpacket.exe to convert the hex6x boot table file to the Ethernet boot format data file,
23 simple.eth.
24
25
26Steps to send the simple.eth from the Host to the target DSP
27
281. Boot the target DSP in ROM Ethernet boot mode.
29
30 The DIP switch setting for C6678 EVM is:
31 SW3(pin1, pin2, pin3, pin4): off, on, off, on
32 SW4(pin1, pin2, pin3, pin4): on, on, on, off
33 SW5(pin1, pin2, pin3, pin4): on, on, off, off
34 SW6(pin1, pin2, pin3, pin4): off, on, on, on
35
36 The DIP switch setting for C6670 EVM is:
37 SW3(pin1, pin2, pin3, pin4): off, on, off, on
38 SW4(pin1, pin2, pin3, pin4): on, on, on, off
39 SW5(pin1, pin2, pin3, pin4): on, off, on, off
40 SW6(pin1, pin2, pin3, pin4): off, off, on, on
41
422. Once the DSP boots up, it transmits BOOTP packet at regular interval which will have the MAC ID of the DSP.
43
443. Add an ARP entry for the DSP MAC address associating with an IP local to the host. For example if the host PC's
45 IP is 192.168.1.1, then add an ARP entry with the DSP's MAC address associated with IP address 192.168.1.2.
46
474. Use the pcsendpkt.exe to send the image to the DSP using the associated IP address. For example
48 pcsendpkt.exe simple.eth 192.168.1.2
49
505. Use CCS to connect the EVM, and check that A1 register is set to 0x11223344, that confirms the simple program
51 is received and booted by the ROM boot loader.
52
53Notes:
541. In order to compile the pcsendpkt.c file please compile with -lwsock32 option for using windows socket.
552. Please refer to the C66x DSP Bootloader User's Guide (http://www.ti.com/litv/pdf/sprugy5) for more details.
563. Please refer to C6678L/C6670L EVM boot mode dip switch settings:
57http://processors.wiki.ti.com/index.php/TMDXEVM6678L_EVM_Hardware_Setup#Boot_Mode_Dip_Switch_Settings
58http://processors.wiki.ti.com/index.php/TMDXEVM6670L_EVM_Hardware_Setup#Boot_Mode_Dip_Switch_Settings
59
60and User's Guide for more details:
61http://processors.wiki.ti.com/index.php/BIOS_MCSDK_2.0_User_Guide
62
diff --git a/boot_loader/examples/emac/simple/makefile b/boot_loader/examples/ethernet/simple/makefile
index 136d6bd..949de97 100644
--- a/boot_loader/examples/emac/simple/makefile
+++ b/boot_loader/examples/ethernet/simple/makefile
@@ -5,7 +5,7 @@
5#* 5#*
6#* DESCRIPTION: Builds the following: 6#* DESCRIPTION: Builds the following:
7#* 7#*
8#* simple_him.out - little endian himalaya mapped program. 8#* simple.out - little endian mapped program.
9#* simple.le.btbl - Simple program in boot table format. 9#* simple.le.btbl - Simple program in boot table format.
10#* simple.eth - Simple Program in ETH format. 10#* simple.eth - Simple Program in ETH format.
11#* 11#*
diff --git a/boot_loader/examples/ethernet/simple/simple.bat b/boot_loader/examples/ethernet/simple/simple.bat
new file mode 100644
index 0000000..b48983a
--- /dev/null
+++ b/boot_loader/examples/ethernet/simple/simple.bat
@@ -0,0 +1,4 @@
1set PATH=%PATH%;"C:\Program Files\Texas Instruments\ccsv5\tools\compiler\c6000\bin";
2make simple.eth
3
4
diff --git a/boot_loader/examples/emac/simple/simple.cmd b/boot_loader/examples/ethernet/simple/simple.cmd
index 6b7cf3d..4589593 100644
--- a/boot_loader/examples/emac/simple/simple.cmd
+++ b/boot_loader/examples/ethernet/simple/simple.cmd
@@ -1,9 +1,9 @@
1/*************************************************************************** 1/***************************************************************************
2 * FILE PURPOSE: The Himalaya linker command file for program simple 2 * FILE PURPOSE: The linker command file for program simple
3 *************************************************************************** 3 ***************************************************************************
4 * FILE NAME: simple_him.cmd 4 * FILE NAME: simple_him.cmd
5 * 5 *
6 * DESCRIPTION: Maps the program simple into the Himalaya memory space 6 * DESCRIPTION: Maps the program simple into the memory space
7 * 7 *
8 ***************************************************************************/ 8 ***************************************************************************/
9 9
diff --git a/boot_loader/examples/emac/simple/simple.rmd b/boot_loader/examples/ethernet/simple/simple.rmd
index 7b0bf5c..7b0bf5c 100644
--- a/boot_loader/examples/emac/simple/simple.rmd
+++ b/boot_loader/examples/ethernet/simple/simple.rmd
diff --git a/boot_loader/examples/ethernet/simple/simple.s b/boot_loader/examples/ethernet/simple/simple.s
new file mode 100644
index 0000000..4501452
--- /dev/null
+++ b/boot_loader/examples/ethernet/simple/simple.s
@@ -0,0 +1,96 @@
1;/******************************************************************************
2; * Copyright (c) 2011 Texas Instruments Incorporated - http://www.ti.com
3; *
4; * Redistribution and use in source and binary forms, with or without
5; * modification, are permitted provided that the following conditions
6; * are met:
7; *
8; * Redistributions of source code must retain the above copyright
9; * notice, this list of conditions and the following disclaimer.
10; *
11; * Redistributions in binary form must reproduce the above copyright
12; * notice, this list of conditions and the following disclaimer in the
13; * documentation and/or other materials provided with the
14; * distribution.
15; *
16; * Neither the name of Texas Instruments Incorporated nor the names of
17; * its contributors may be used to endorse or promote products derived
18; * from this software without specific prior written permission.
19; *
20; * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21; * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22; * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23; * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24; * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25; * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26; * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27; * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28; * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29; * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30; * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31; *
32; *****************************************************************************/
33
34;****************************************************************************
35;* FILE PURPOSE: A simple endian independent example
36;****************************************************************************
37;* FILE NAME: Simple.s
38;*
39;* DESCRIPTION: A simple program that defines two initialized
40;* sections, text and data, and performs the following simple
41;* executions:
42;* 1. store a constant (011223344h) to register A1
43;* 2. store the data in byte1 section (0x12) to registerB2.
44;* 3. store the data in byte21 section (0x12, 034) to register B3, B4.
45;*
46;*****************************************************************************
47
48;*****************************************************************************
49;* Initialized data
50;*****************************************************************************
51 .data
52 .def someData
53someData .word 01234ABCDh
54
55 .def byte1
56 .sect ".byte1"
57byte1: .byte 0x12
58
59 .def byte2
60 .sect ".byte2"
61byte2: .byte 0x12, 0x34
62
63;*****************************************************************************
64;* code
65;*****************************************************************************
66 .text
67 .def _c_int00
68
69myConst .equ 011223344h
70
71_c_int00:
72
73 MVKL.S1 myConst, A1
74 MVKH.S1 myConst, A1
75
76 MVKL.S1 byte1, A2
77 MVKH.S1 byte1, A2
78 LDB.D1 *A2, B2
79
80 MVKL.S1 byte2, A3
81 MVKH.S1 byte2, A3
82 LDB.D1 *A3++, B3
83 LDB.D1 *A3, B4
84
85
86etrap:
87
88 BNOP.S1 etrap, 5
89
90
91
92
93
94
95
96
diff --git a/boot_loader/examples/i2c/nand/docs/README.txt b/boot_loader/examples/i2c/nand/docs/README.txt
index 6930c19..fe9eab9 100644
--- a/boot_loader/examples/i2c/nand/docs/README.txt
+++ b/boot_loader/examples/i2c/nand/docs/README.txt
@@ -26,12 +26,12 @@ Steps to run i2cnandboot in CCSv5:
26 26
27Steps to program i2cnandboot to NAND: 27Steps to program i2cnandboot to NAND:
28 28
291. Be sure IBL is programmed to I2C EEPROM bus address 81 (0x51), if IBL is not programmed, refer to 291. Be sure IBL is programmed to I2C EEPROM bus address 0x51, if IBL is not programmed, refer to
30 tools\boot_loader\ibl\doc\README.txt on how to program the IBL to EEPROM. 30 tools\boot_loader\ibl\doc\README.txt on how to program the IBL to EEPROM.
31 31
322. By default, IBL will boot a BBLOB image (Linux kernel) from NAND, to run this example, we need to change the 322. By default, IBL will boot a BBLOB image (Linux kernel) from NAND, to run this example, we need to change the
33 NAND boot image format to ELF: 33 NAND boot image format to ELF:
34 a. In setConfig_c66xx_main() of tools\boot_loader\ibl\src\util\i2cConfig\i2cConfig.gel, 34 a. In setConfig_c66xx_main() of tools\boot_loader\ibl\src\make\bin\i2cConfig.gel,
35 replace 35 replace
36 ibl.bootModes[1].u.nandBoot.bootFormat = ibl_BOOT_FORMAT_BBLOB; 36 ibl.bootModes[1].u.nandBoot.bootFormat = ibl_BOOT_FORMAT_BBLOB;
37 with 37 with
@@ -44,8 +44,13 @@ Steps to program i2cnandboot to NAND:
44 the app.bin to NAND flash. 44 the app.bin to NAND flash.
45 45
464. Once the programming is completed successfully, set the boot dip switches to I2C master mode, 464. Once the programming is completed successfully, set the boot dip switches to I2C master mode,
47 bus address 81 (0x51) and boot parameter index to be 2. 47 bus address 0x51 and boot parameter index to be 2.
48 48
495. After POR, IBL will boot the hello world image from NAND. 495. After POR, IBL will boot the hello world image from NAND.
50 50
51Please refer to User's Guide (http://processors.wiki.ti.com/index.php/BIOS_MCSDK_2.0_User_Guide) for more details. 51Please refer to C6678L/C6670L EVM boot mode dip switch settings:
52http://processors.wiki.ti.com/index.php/TMDXEVM6678L_EVM_Hardware_Setup#Boot_Mode_Dip_Switch_Settings
53http://processors.wiki.ti.com/index.php/TMDXEVM6670L_EVM_Hardware_Setup#Boot_Mode_Dip_Switch_Settings
54
55and User's Guide for more details:
56http://processors.wiki.ti.com/index.php/BIOS_MCSDK_2.0_User_Guide
diff --git a/boot_loader/examples/i2c/nor/docs/README.txt b/boot_loader/examples/i2c/nor/docs/README.txt
index dd4d846..b6119ed 100644
--- a/boot_loader/examples/i2c/nor/docs/README.txt
+++ b/boot_loader/examples/i2c/nor/docs/README.txt
@@ -27,7 +27,7 @@ Steps to run i2cnorboot in CCSv5:
27 27
28Steps to program i2cnorboot to NOR: 28Steps to program i2cnorboot to NOR:
29 29
301. Be sure IBL and boot configuration table are programmed to I2C EEPROM bus address 81 (0x51), if IBL and/or 301. Be sure IBL and boot configuration table are programmed to I2C EEPROM bus address 0x51, if IBL and/or
31 boot configuration table are not programmed, refer to tools\boot_loader\ibl\doc\README.txt on how to program 31 boot configuration table are not programmed, refer to tools\boot_loader\ibl\doc\README.txt on how to program
32 the IBL and boot configuration table to EEPROM. 32 the IBL and boot configuration table to EEPROM.
33 33
@@ -36,8 +36,15 @@ Steps to program i2cnorboot to NOR:
36 the app.bin to NOR flash. 36 the app.bin to NOR flash.
37 37
383. Once the programming is completed successfully, set the boot dip switches to I2C master mode, 383. Once the programming is completed successfully, set the boot dip switches to I2C master mode,
39 bus address 81 (0x51) and boot parameter index to be 0. 39 bus address 0x51 and boot parameter index to be 0.
40 40
414. After POR, IBL will boot the hello world image from NOR. 414. After POR, IBL will boot the hello world image from NOR.
42 42
43Please refer to User's Guide (http://processors.wiki.ti.com/index.php/BIOS_MCSDK_2.0_User_Guide) for more details. 43Please refer to C6678L/C6670L EVM boot mode dip switch settings:
44http://processors.wiki.ti.com/index.php/TMDXEVM6678L_EVM_Hardware_Setup#Boot_Mode_Dip_Switch_Settings
45http://processors.wiki.ti.com/index.php/TMDXEVM6670L_EVM_Hardware_Setup#Boot_Mode_Dip_Switch_Settings
46
47and User's Guide for more details:
48http://processors.wiki.ti.com/index.php/BIOS_MCSDK_2.0_User_Guide
49
50
diff --git a/boot_loader/examples/i2c/emac/docs/README.txt b/boot_loader/examples/i2c/tftp/docs/README.txt
index dda194d..d2799aa 100644
--- a/boot_loader/examples/i2c/emac/docs/README.txt
+++ b/boot_loader/examples/i2c/tftp/docs/README.txt
@@ -1,37 +1,37 @@
1EMAC boot over I2C example 1TFTP boot over I2C example
2 2
3A simple Hello World example demonstrating EMAC boot over I2C. 3A simple Hello World example demonstrating TFTP boot over I2C.
4 4
5Steps to build the example: 5Steps to build the example:
6 6
71. Import the i2cemacboot CCS project from tools\boot_loader\examples\i2c\emac\evmc66xxl directory. (in CCSv5, 71. Import the i2ctftpboot CCS project from tools\boot_loader\examples\i2c\tftp\evmc66xxl directory. (in CCSv5,
8 Project->Import Existing CCS/CCE Eclipse Projects) 8 Project->Import Existing CCS/CCE Eclipse Projects)
9 9
102. Clean the i2cemacboot project and re-build the project, after build is completed, i2cemacboot_evm66xxl.out and 102. Clean the i2ctftpboot project and re-build the project, after build is completed, i2ctftpboot_evm66xxl.out and
11 i2cemacboot_evm66xxl.map will be generated under tools\boot_loader\examples\i2c\emac\evmc66xxl\bin directory. 11 i2ctftpboot_evm66xxl.map will be generated under tools\boot_loader\examples\i2c\tftp\evmc66xxl\bin directory.
12 12
13Steps to run i2cemacboot in CCSv5: 13Steps to run i2ctftpboot in CCSv5:
14 14
151. Be sure to set the boot mode dip switch to no boot/EMIF16 boot mode on the EVM. 151. Be sure to set the boot mode dip switch to no boot/EMIF16 boot mode on the EVM.
16 16
172. Load the program tools\boot_loader\examples\i2c\emac\evmc66xxl\bin\i2cemacboot_evm66xxl.out to CCS. 172. Load the program tools\boot_loader\examples\i2c\tftp\evmc66xxl\bin\i2ctftpboot_evm66xxl.out to CCS.
18 18
193. Connect the 3-pin RS-232 cable from the EVM to the serial port of the PC, and start Hyper Terminal. 193. Connect the 3-pin RS-232 cable from the EVM to the serial port of the PC, and start Hyper Terminal.
20 20
214. Create a new connection with the Baud rate set to 115200 bps, Data bits 8, Parity none, Stop bits 1 and 214. Create a new connection with the Baud rate set to 115200 bps, Data bits 8, Parity none, Stop bits 1 and
22 Flow control none. Be sure the COM port # is set correctly. 22 Flow control none. Be sure the COM port # is set correctly.
23 23
245. Run the program in CCS, i2cemacboot will send the hello world booting info to both the CCS console and the 245. Run the program in CCS, i2ctftpboot will send the hello world booting info to both the CCS console and the
25 Hyper Terminal. 25 Hyper Terminal.
26 26
27Steps to boot i2cemacboot from EMAC: 27Steps to boot i2ctftpboot from TFTP:
28 28
291. Be sure IBL is programmed to I2C EEPROM bus address 81 (0x51), if IBL is not programmed, refer to 291. Be sure IBL is programmed to I2C EEPROM bus address 81 (0x51), if IBL is not programmed, refer to
30 tools\boot_loader\ibl\doc\README.txt on how to program the IBL to EEPROM. 30 tools\boot_loader\ibl\doc\README.txt on how to program the IBL to EEPROM.
31 31
322. By default, IBL will boot a BBLOB image from EMAC, to run this example, we need to change the 322. By default, IBL will boot a BBLOB image from TFTP, to run this example, we need to change the
33 EMAC boot image format to ELF: 33 TFTP boot image format to ELF:
34 a. In setConfig_c66xx_main() of tools\boot_loader\ibl\src\util\i2cConfig\i2cConfig.gel, 34 a. In setConfig_c66xx_main() of tools\boot_loader\ibl\src\make\bin\i2cConfig.gel,
35 replace 35 replace
36 ibl.bootModes[2].u.ethBoot.bootFormat = ibl_BOOT_FORMAT_BBLOB; 36 ibl.bootModes[2].u.ethBoot.bootFormat = ibl_BOOT_FORMAT_BBLOB;
37 with 37 with
@@ -40,15 +40,20 @@ Steps to boot i2cemacboot from EMAC:
40 the boot configuration table to EEPROM. 40 the boot configuration table to EEPROM.
41 41
423. Start a TFTP server (you can download a free, open source application from http://tftpd32.jounin.net) and copy 423. Start a TFTP server (you can download a free, open source application from http://tftpd32.jounin.net) and copy
43 tools\boot_loader\examples\i2c\emac\evmc66xxl\bin\i2cemacboot_evm66xxl.out to the TFTP base directory, rename 43 tools\boot_loader\examples\i2c\tftp\evmc66xxl\bin\i2ctftpboot_evm66xxl.out to the TFTP base directory, rename
44 i2cemacboot_evm66xxl.out to app.out. 44 i2ctftpboot_evm66xxl.out to app.out.
45 45
464. Set the IP address of the PC that is running the TFTP server to 192.168.2.101, since by default IBL will set the EVM 464. Set the IP address of the PC that is running the TFTP server to 192.168.2.101, since by default IBL will set the EVM
47 IP address to 192.168.2.100 and the TFTP server IP address to 192.168.2.101. 47 IP address to 192.168.2.100 and the TFTP server IP address to 192.168.2.101.
48 48
495. Set the boot dip switches to I2C master mode, bus address 81 (0x51) and boot parameter index to be 4. 495. Set the boot dip switches to I2C master mode, bus address 0x51 and boot parameter index to be 4.
50 50
516. Be sure the EVM and the PC are connected in the same subnet of a local network, after POR, IBL will download the 516. Be sure the EVM and the PC are connected in the same subnet of a local network, after POR, IBL will download the
52 boot image from TFTP server and boot from it. 52 boot image from TFTP server and boot from it.
53 53
54Please refer to User's Guide (http://processors.wiki.ti.com/index.php/BIOS_MCSDK_2.0_User_Guide) for more details. 54Please refer to C6678L/C6670L EVM boot mode dip switch settings:
55http://processors.wiki.ti.com/index.php/TMDXEVM6678L_EVM_Hardware_Setup#Boot_Mode_Dip_Switch_Settings
56http://processors.wiki.ti.com/index.php/TMDXEVM6670L_EVM_Hardware_Setup#Boot_Mode_Dip_Switch_Settings
57
58and User's Guide for more details:
59http://processors.wiki.ti.com/index.php/BIOS_MCSDK_2.0_User_Guide
diff --git a/boot_loader/examples/i2c/emac/evmc6670l/.ccsproject b/boot_loader/examples/i2c/tftp/evmc6670l/.ccsproject
index 79d3116..79d3116 100644
--- a/boot_loader/examples/i2c/emac/evmc6670l/.ccsproject
+++ b/boot_loader/examples/i2c/tftp/evmc6670l/.ccsproject
diff --git a/boot_loader/examples/i2c/emac/evmc6670l/.cproject b/boot_loader/examples/i2c/tftp/evmc6670l/.cproject
index b056636..03a9e17 100644
--- a/boot_loader/examples/i2c/emac/evmc6670l/.cproject
+++ b/boot_loader/examples/i2c/tftp/evmc6670l/.cproject
@@ -2,7 +2,7 @@
2<?fileVersion 4.0.0?> 2<?fileVersion 4.0.0?>
3 3
4<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage"> 4<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
5 <storageModule moduleId="org.eclipse.cdt.core.settings"> 5 <storageModule configRelations="2" moduleId="org.eclipse.cdt.core.settings">
6 <cconfiguration id="com.ti.ccstudio.buildDefinitions.C6000.Debug.1869204513"> 6 <cconfiguration id="com.ti.ccstudio.buildDefinitions.C6000.Debug.1869204513">
7 <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.ti.ccstudio.buildDefinitions.C6000.Debug.1869204513" moduleId="org.eclipse.cdt.core.settings" name="Debug"> 7 <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.ti.ccstudio.buildDefinitions.C6000.Debug.1869204513" moduleId="org.eclipse.cdt.core.settings" name="Debug">
8 <externalSettings/> 8 <externalSettings/>
@@ -16,7 +16,7 @@
16 </storageModule> 16 </storageModule>
17 <storageModule moduleId="org.eclipse.cdt.core.pathentry"/> 17 <storageModule moduleId="org.eclipse.cdt.core.pathentry"/>
18 <storageModule moduleId="cdtBuildSystem" version="4.0.0"> 18 <storageModule moduleId="cdtBuildSystem" version="4.0.0">
19 <configuration artifactExtension="out" artifactName="../bin/i2cemacboot_evm6670l" buildProperties="" cleanCommand="${CG_CLEAN_CMD}" description="" errorParsers="org.eclipse.rtsc.xdctools.parsers.ErrorParser;com.ti.ccstudio.errorparser.LinkErrorParser;com.ti.ccstudio.errorparser.CoffErrorParser;com.ti.ccstudio.errorparser.AsmErrorParser" id="com.ti.ccstudio.buildDefinitions.C6000.Debug.1869204513" name="Debug" parent="com.ti.ccstudio.buildDefinitions.C6000.Debug"> 19 <configuration artifactExtension="out" artifactName="../bin/i2ctftpboot_evm6670l" buildProperties="" cleanCommand="${CG_CLEAN_CMD}" description="" errorParsers="org.eclipse.rtsc.xdctools.parsers.ErrorParser;com.ti.ccstudio.errorparser.LinkErrorParser;com.ti.ccstudio.errorparser.CoffErrorParser;com.ti.ccstudio.errorparser.AsmErrorParser" id="com.ti.ccstudio.buildDefinitions.C6000.Debug.1869204513" name="Debug" parent="com.ti.ccstudio.buildDefinitions.C6000.Debug">
20 <folderInfo id="com.ti.ccstudio.buildDefinitions.C6000.Debug.1869204513." name="/" resourcePath=""> 20 <folderInfo id="com.ti.ccstudio.buildDefinitions.C6000.Debug.1869204513." name="/" resourcePath="">
21 <toolChain id="com.ti.ccstudio.buildDefinitions.C6000_7.2.exe.DebugToolchain.2097842143" name="TI Code Generation Tools" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.exe.DebugToolchain" targetTool="com.ti.ccstudio.buildDefinitions.C6000_7.2.exe.linkerDebug.854128311"> 21 <toolChain id="com.ti.ccstudio.buildDefinitions.C6000_7.2.exe.DebugToolchain.2097842143" name="TI Code Generation Tools" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.exe.DebugToolchain" targetTool="com.ti.ccstudio.buildDefinitions.C6000_7.2.exe.linkerDebug.854128311">
22 <option id="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS.732314103" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS" valueType="stringList"> 22 <option id="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS.732314103" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS" valueType="stringList">
@@ -31,7 +31,7 @@
31 </option> 31 </option>
32 <option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.1263633169" name="Code Generation tools version" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION" value="7.2.0" valueType="string"/> 32 <option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.1263633169" name="Code Generation tools version" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION" value="7.2.0" valueType="string"/>
33 <targetPlatform binaryParser="org.eclipse.cdt.core.ELF" id="com.ti.ccstudio.buildDefinitions.C6000_7.2.exe.targetPlatformDebug.30003368" name="Platform" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.exe.targetPlatformDebug"/> 33 <targetPlatform binaryParser="org.eclipse.cdt.core.ELF" id="com.ti.ccstudio.buildDefinitions.C6000_7.2.exe.targetPlatformDebug.30003368" name="Platform" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.exe.targetPlatformDebug"/>
34 <builder buildPath="${workspace_loc:/i2cemacboot/Debug}" id="com.ti.ccstudio.buildDefinitions.C6000_7.2.exe.builderDebug.1571910857" keepEnvironmentInBuildfile="false" name="GNU Make" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.exe.builderDebug"/> 34 <builder buildPath="${workspace_loc:/i2ctftpboot/Debug}" id="com.ti.ccstudio.buildDefinitions.C6000_7.2.exe.builderDebug.1571910857" keepEnvironmentInBuildfile="false" name="GNU Make" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.exe.builderDebug"/>
35 <tool id="com.ti.ccstudio.buildDefinitions.C6000_7.2.exe.compilerDebug.1787566966" name="C6000 Compiler" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.exe.compilerDebug"> 35 <tool id="com.ti.ccstudio.buildDefinitions.C6000_7.2.exe.compilerDebug.1787566966" name="C6000 Compiler" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.exe.compilerDebug">
36 <option id="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.DIAG_WARNING.1206666269" name="Treat diagnostic &lt;id&gt; as warning (--diag_warning, -pdsw)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.DIAG_WARNING" valueType="stringList"> 36 <option id="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.DIAG_WARNING.1206666269" name="Treat diagnostic &lt;id&gt; as warning (--diag_warning, -pdsw)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.DIAG_WARNING" valueType="stringList">
37 <listOptionValue builtIn="false" value="225"/> 37 <listOptionValue builtIn="false" value="225"/>
@@ -47,8 +47,8 @@
47 <inputType id="com.ti.ccstudio.buildDefinitions.C6000_7.2.compiler.inputType__ASM2_SRCS.2124959934" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.compiler.inputType__ASM2_SRCS"/> 47 <inputType id="com.ti.ccstudio.buildDefinitions.C6000_7.2.compiler.inputType__ASM2_SRCS.2124959934" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.compiler.inputType__ASM2_SRCS"/>
48 </tool> 48 </tool>
49 <tool id="com.ti.ccstudio.buildDefinitions.C6000_7.2.exe.linkerDebug.854128311" name="C6000 Linker" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.exe.linkerDebug"> 49 <tool id="com.ti.ccstudio.buildDefinitions.C6000_7.2.exe.linkerDebug.854128311" name="C6000 Linker" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.exe.linkerDebug">
50 <option id="com.ti.ccstudio.buildDefinitions.C6000_7.2.linkerID.OUTPUT_FILE.572435525" name="Specify output file name (--output_file, -o)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.linkerID.OUTPUT_FILE" value="&quot;../bin/i2cemacboot_evm6670l.out&quot;" valueType="string"/> 50 <option id="com.ti.ccstudio.buildDefinitions.C6000_7.2.linkerID.OUTPUT_FILE.572435525" name="Specify output file name (--output_file, -o)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.linkerID.OUTPUT_FILE" value="&quot;../bin/i2ctftpboot_evm6670l.out&quot;" valueType="string"/>
51 <option id="com.ti.ccstudio.buildDefinitions.C6000_7.2.linkerID.MAP_FILE.405326097" name="Input and output sections listed into &lt;file&gt; (--map_file, -m)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.linkerID.MAP_FILE" value="&quot;../bin/i2cemacboot_evm6670l.map&quot;" valueType="string"/> 51 <option id="com.ti.ccstudio.buildDefinitions.C6000_7.2.linkerID.MAP_FILE.405326097" name="Input and output sections listed into &lt;file&gt; (--map_file, -m)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.linkerID.MAP_FILE" value="&quot;../bin/i2ctftpboot_evm6670l.map&quot;" valueType="string"/>
52 <option id="com.ti.ccstudio.buildDefinitions.C6000_7.2.linkerID.LIBRARY.1992557769" name="Include library file or command file as input (--library, -l)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.linkerID.LIBRARY" valueType="libs"> 52 <option id="com.ti.ccstudio.buildDefinitions.C6000_7.2.linkerID.LIBRARY.1992557769" name="Include library file or command file as input (--library, -l)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.linkerID.LIBRARY" valueType="libs">
53 <listOptionValue builtIn="false" value="&quot;rts6600_elf.lib&quot;"/> 53 <listOptionValue builtIn="false" value="&quot;rts6600_elf.lib&quot;"/>
54 <listOptionValue builtIn="false" value="&quot;ti.platform.evm6670l.ae66&quot;"/> 54 <listOptionValue builtIn="false" value="&quot;ti.platform.evm6670l.ae66&quot;"/>
@@ -64,7 +64,7 @@
64 <option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.TARGET.1742151819" name="RTSC target (-t)" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.TARGET" value="ti.targets.elf.C66" valueType="string"/> 64 <option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.TARGET.1742151819" name="RTSC target (-t)" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.TARGET" value="ti.targets.elf.C66" valueType="string"/>
65 <option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.PLATFORM.1677251639" name="RTSC platform (-p)" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.PLATFORM" value="ti.platforms.evm6670" valueType="string"/> 65 <option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.PLATFORM.1677251639" name="RTSC platform (-p)" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.PLATFORM" value="ti.platforms.evm6670" valueType="string"/>
66 <option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.BUILD_PROFILE.1512447741" name="Build profile (-r)" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.BUILD_PROFILE" value="debug" valueType="string"/> 66 <option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.BUILD_PROFILE.1512447741" name="Build profile (-r)" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.BUILD_PROFILE" value="debug" valueType="string"/>
67 <option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.XDC_PATH.997241669" name="RTSC package repositories (--xdcpath)" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.XDC_PATH" valueType="stringList"/> 67 <option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.XDC_PATH.997241669" name="RTSC package repositories (--xdcpath)" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.XDC_PATH"/>
68 </tool> 68 </tool>
69 </toolChain> 69 </toolChain>
70 </folderInfo> 70 </folderInfo>
@@ -73,10 +73,9 @@
73 <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/> 73 <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
74 <storageModule moduleId="org.eclipse.cdt.core.language.mapping"/> 74 <storageModule moduleId="org.eclipse.cdt.core.language.mapping"/>
75 <storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/> 75 <storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
76 <storageModule moduleId="scannerConfiguration"/>
77 </cconfiguration> 76 </cconfiguration>
78 </storageModule> 77 </storageModule>
79 <storageModule moduleId="cdtBuildSystem" version="4.0.0"> 78 <storageModule moduleId="cdtBuildSystem" version="4.0.0">
80 <project id="i2cemacboot.com.ti.ccstudio.buildDefinitions.C6000.ProjectType.1742876545" name="C6000" projectType="com.ti.ccstudio.buildDefinitions.C6000.ProjectType"/> 79 <project id="i2ctftpboot.com.ti.ccstudio.buildDefinitions.C6000.ProjectType.1742876545" name="C6000" projectType="com.ti.ccstudio.buildDefinitions.C6000.ProjectType"/>
81 </storageModule> 80 </storageModule>
82</cproject> 81</cproject>
diff --git a/boot_loader/examples/i2c/emac/evmc6670l/.project b/boot_loader/examples/i2c/tftp/evmc6670l/.project
index 459c24e..a8fbd18 100644
--- a/boot_loader/examples/i2c/emac/evmc6670l/.project
+++ b/boot_loader/examples/i2c/tftp/evmc6670l/.project
@@ -1,6 +1,6 @@
1<?xml version="1.0" encoding="UTF-8"?> 1<?xml version="1.0" encoding="UTF-8"?>
2<projectDescription> 2<projectDescription>
3 <name>i2cemacboot_evmc6670l</name> 3 <name>i2ctftpboot_evmc6670l</name>
4 <comment></comment> 4 <comment></comment>
5 <projects> 5 <projects>
6 </projects> 6 </projects>
@@ -30,7 +30,7 @@
30 </dictionary> 30 </dictionary>
31 <dictionary> 31 <dictionary>
32 <key>org.eclipse.cdt.make.core.buildLocation</key> 32 <key>org.eclipse.cdt.make.core.buildLocation</key>
33 <value>${workspace_loc:/i2cemacboot/Debug}</value> 33 <value>${workspace_loc:/i2ctftpboot/Debug}</value>
34 </dictionary> 34 </dictionary>
35 <dictionary> 35 <dictionary>
36 <key>org.eclipse.cdt.make.core.cleanBuildTarget</key> 36 <key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
@@ -85,12 +85,12 @@
85 <link> 85 <link>
86 <name>README.txt</name> 86 <name>README.txt</name>
87 <type>1</type> 87 <type>1</type>
88 <location>TI_MCSDK_I2CEXAMPLES_DIR/emac/docs/README.txt</location> 88 <location>TI_MCSDK_I2CEXAMPLES_DIR/tftp/docs/README.txt</location>
89 </link> 89 </link>
90 <link> 90 <link>
91 <name>src</name> 91 <name>src</name>
92 <type>2</type> 92 <type>2</type>
93 <locationURI>TI_MCSDK_I2CEXAMPLES_DIR/emac/src</locationURI> 93 <locationURI>TI_MCSDK_I2CEXAMPLES_DIR/tftp/src</locationURI>
94 </link> 94 </link>
95 </linkedResources> 95 </linkedResources>
96</projectDescription> 96</projectDescription>
diff --git a/boot_loader/examples/i2c/emac/evmc6670l/i2c_boot_emac_example.cmd b/boot_loader/examples/i2c/tftp/evmc6670l/i2c_boot_tftp_example.cmd
index cab1993..cab1993 100644
--- a/boot_loader/examples/i2c/emac/evmc6670l/i2c_boot_emac_example.cmd
+++ b/boot_loader/examples/i2c/tftp/evmc6670l/i2c_boot_tftp_example.cmd
diff --git a/boot_loader/examples/i2c/emac/evmc6670l/macros.ini b/boot_loader/examples/i2c/tftp/evmc6670l/macros.ini
index f4e4f7b..f4e4f7b 100644
--- a/boot_loader/examples/i2c/emac/evmc6670l/macros.ini
+++ b/boot_loader/examples/i2c/tftp/evmc6670l/macros.ini
diff --git a/boot_loader/examples/i2c/emac/evmc6678l/.ccsproject b/boot_loader/examples/i2c/tftp/evmc6678l/.ccsproject
index 79d3116..79d3116 100644
--- a/boot_loader/examples/i2c/emac/evmc6678l/.ccsproject
+++ b/boot_loader/examples/i2c/tftp/evmc6678l/.ccsproject
diff --git a/boot_loader/examples/i2c/emac/evmc6678l/.cproject b/boot_loader/examples/i2c/tftp/evmc6678l/.cproject
index da96a73..4d71d4c 100644
--- a/boot_loader/examples/i2c/emac/evmc6678l/.cproject
+++ b/boot_loader/examples/i2c/tftp/evmc6678l/.cproject
@@ -2,7 +2,7 @@
2<?fileVersion 4.0.0?> 2<?fileVersion 4.0.0?>
3 3
4<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage"> 4<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
5 <storageModule moduleId="org.eclipse.cdt.core.settings"> 5 <storageModule configRelations="2" moduleId="org.eclipse.cdt.core.settings">
6 <cconfiguration id="com.ti.ccstudio.buildDefinitions.C6000.Debug.1869204513"> 6 <cconfiguration id="com.ti.ccstudio.buildDefinitions.C6000.Debug.1869204513">
7 <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.ti.ccstudio.buildDefinitions.C6000.Debug.1869204513" moduleId="org.eclipse.cdt.core.settings" name="Debug"> 7 <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.ti.ccstudio.buildDefinitions.C6000.Debug.1869204513" moduleId="org.eclipse.cdt.core.settings" name="Debug">
8 <externalSettings/> 8 <externalSettings/>
@@ -16,7 +16,7 @@
16 </storageModule> 16 </storageModule>
17 <storageModule moduleId="org.eclipse.cdt.core.pathentry"/> 17 <storageModule moduleId="org.eclipse.cdt.core.pathentry"/>
18 <storageModule moduleId="cdtBuildSystem" version="4.0.0"> 18 <storageModule moduleId="cdtBuildSystem" version="4.0.0">
19 <configuration artifactExtension="out" artifactName="../bin/i2cemacboot_evm6678l" buildProperties="" cleanCommand="${CG_CLEAN_CMD}" description="" errorParsers="org.eclipse.rtsc.xdctools.parsers.ErrorParser;com.ti.ccstudio.errorparser.LinkErrorParser;com.ti.ccstudio.errorparser.CoffErrorParser;com.ti.ccstudio.errorparser.AsmErrorParser" id="com.ti.ccstudio.buildDefinitions.C6000.Debug.1869204513" name="Debug" parent="com.ti.ccstudio.buildDefinitions.C6000.Debug"> 19 <configuration artifactExtension="out" artifactName="../bin/i2ctftpboot_evm6678l" buildProperties="" cleanCommand="${CG_CLEAN_CMD}" description="" errorParsers="org.eclipse.rtsc.xdctools.parsers.ErrorParser;com.ti.ccstudio.errorparser.LinkErrorParser;com.ti.ccstudio.errorparser.CoffErrorParser;com.ti.ccstudio.errorparser.AsmErrorParser" id="com.ti.ccstudio.buildDefinitions.C6000.Debug.1869204513" name="Debug" parent="com.ti.ccstudio.buildDefinitions.C6000.Debug">
20 <folderInfo id="com.ti.ccstudio.buildDefinitions.C6000.Debug.1869204513." name="/" resourcePath=""> 20 <folderInfo id="com.ti.ccstudio.buildDefinitions.C6000.Debug.1869204513." name="/" resourcePath="">
21 <toolChain id="com.ti.ccstudio.buildDefinitions.C6000_7.2.exe.DebugToolchain.2097842143" name="TI Code Generation Tools" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.exe.DebugToolchain" targetTool="com.ti.ccstudio.buildDefinitions.C6000_7.2.exe.linkerDebug.854128311"> 21 <toolChain id="com.ti.ccstudio.buildDefinitions.C6000_7.2.exe.DebugToolchain.2097842143" name="TI Code Generation Tools" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.exe.DebugToolchain" targetTool="com.ti.ccstudio.buildDefinitions.C6000_7.2.exe.linkerDebug.854128311">
22 <option id="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS.732314103" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS" valueType="stringList"> 22 <option id="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS.732314103" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS" valueType="stringList">
@@ -31,7 +31,7 @@
31 </option> 31 </option>
32 <option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.1263633169" name="Code Generation tools version" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION" value="7.2.0" valueType="string"/> 32 <option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.1263633169" name="Code Generation tools version" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION" value="7.2.0" valueType="string"/>
33 <targetPlatform binaryParser="org.eclipse.cdt.core.ELF" id="com.ti.ccstudio.buildDefinitions.C6000_7.2.exe.targetPlatformDebug.30003368" name="Platform" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.exe.targetPlatformDebug"/> 33 <targetPlatform binaryParser="org.eclipse.cdt.core.ELF" id="com.ti.ccstudio.buildDefinitions.C6000_7.2.exe.targetPlatformDebug.30003368" name="Platform" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.exe.targetPlatformDebug"/>
34 <builder buildPath="${workspace_loc:/i2cemacboot/Debug}" id="com.ti.ccstudio.buildDefinitions.C6000_7.2.exe.builderDebug.1571910857" keepEnvironmentInBuildfile="false" name="GNU Make" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.exe.builderDebug"/> 34 <builder buildPath="${workspace_loc:/i2ctftpboot/Debug}" id="com.ti.ccstudio.buildDefinitions.C6000_7.2.exe.builderDebug.1571910857" keepEnvironmentInBuildfile="false" name="GNU Make" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.exe.builderDebug"/>
35 <tool id="com.ti.ccstudio.buildDefinitions.C6000_7.2.exe.compilerDebug.1787566966" name="C6000 Compiler" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.exe.compilerDebug"> 35 <tool id="com.ti.ccstudio.buildDefinitions.C6000_7.2.exe.compilerDebug.1787566966" name="C6000 Compiler" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.exe.compilerDebug">
36 <option id="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.DIAG_WARNING.1206666269" name="Treat diagnostic &lt;id&gt; as warning (--diag_warning, -pdsw)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.DIAG_WARNING" valueType="stringList"> 36 <option id="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.DIAG_WARNING.1206666269" name="Treat diagnostic &lt;id&gt; as warning (--diag_warning, -pdsw)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.DIAG_WARNING" valueType="stringList">
37 <listOptionValue builtIn="false" value="225"/> 37 <listOptionValue builtIn="false" value="225"/>
@@ -47,8 +47,8 @@
47 <inputType id="com.ti.ccstudio.buildDefinitions.C6000_7.2.compiler.inputType__ASM2_SRCS.2124959934" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.compiler.inputType__ASM2_SRCS"/> 47 <inputType id="com.ti.ccstudio.buildDefinitions.C6000_7.2.compiler.inputType__ASM2_SRCS.2124959934" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.compiler.inputType__ASM2_SRCS"/>
48 </tool> 48 </tool>
49 <tool id="com.ti.ccstudio.buildDefinitions.C6000_7.2.exe.linkerDebug.854128311" name="C6000 Linker" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.exe.linkerDebug"> 49 <tool id="com.ti.ccstudio.buildDefinitions.C6000_7.2.exe.linkerDebug.854128311" name="C6000 Linker" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.exe.linkerDebug">
50 <option id="com.ti.ccstudio.buildDefinitions.C6000_7.2.linkerID.OUTPUT_FILE.572435525" name="Specify output file name (--output_file, -o)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.linkerID.OUTPUT_FILE" value="&quot;../bin/i2cemacboot_evm6678l.out&quot;" valueType="string"/> 50 <option id="com.ti.ccstudio.buildDefinitions.C6000_7.2.linkerID.OUTPUT_FILE.572435525" name="Specify output file name (--output_file, -o)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.linkerID.OUTPUT_FILE" value="&quot;../bin/i2ctftpboot_evm6678l.out&quot;" valueType="string"/>
51 <option id="com.ti.ccstudio.buildDefinitions.C6000_7.2.linkerID.MAP_FILE.405326097" name="Input and output sections listed into &lt;file&gt; (--map_file, -m)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.linkerID.MAP_FILE" value="&quot;../bin/i2cemacboot_evm6678l.map&quot;" valueType="string"/> 51 <option id="com.ti.ccstudio.buildDefinitions.C6000_7.2.linkerID.MAP_FILE.405326097" name="Input and output sections listed into &lt;file&gt; (--map_file, -m)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.linkerID.MAP_FILE" value="&quot;../bin/i2ctftpboot_evm6678l.map&quot;" valueType="string"/>
52 <option id="com.ti.ccstudio.buildDefinitions.C6000_7.2.linkerID.LIBRARY.1992557769" name="Include library file or command file as input (--library, -l)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.linkerID.LIBRARY" valueType="libs"> 52 <option id="com.ti.ccstudio.buildDefinitions.C6000_7.2.linkerID.LIBRARY.1992557769" name="Include library file or command file as input (--library, -l)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.linkerID.LIBRARY" valueType="libs">
53 <listOptionValue builtIn="false" value="&quot;rts6600_elf.lib&quot;"/> 53 <listOptionValue builtIn="false" value="&quot;rts6600_elf.lib&quot;"/>
54 <listOptionValue builtIn="false" value="&quot;ti.platform.evm6678l.ae66&quot;"/> 54 <listOptionValue builtIn="false" value="&quot;ti.platform.evm6678l.ae66&quot;"/>
@@ -75,10 +75,9 @@
75 <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/> 75 <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
76 <storageModule moduleId="org.eclipse.cdt.core.language.mapping"/> 76 <storageModule moduleId="org.eclipse.cdt.core.language.mapping"/>
77 <storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/> 77 <storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
78 <storageModule moduleId="scannerConfiguration"/>
79 </cconfiguration> 78 </cconfiguration>
80 </storageModule> 79 </storageModule>
81 <storageModule moduleId="cdtBuildSystem" version="4.0.0"> 80 <storageModule moduleId="cdtBuildSystem" version="4.0.0">
82 <project id="i2cemacboot.com.ti.ccstudio.buildDefinitions.C6000.ProjectType.1742876545" name="C6000" projectType="com.ti.ccstudio.buildDefinitions.C6000.ProjectType"/> 81 <project id="i2ctftpboot.com.ti.ccstudio.buildDefinitions.C6000.ProjectType.1742876545" name="C6000" projectType="com.ti.ccstudio.buildDefinitions.C6000.ProjectType"/>
83 </storageModule> 82 </storageModule>
84</cproject> 83</cproject>
diff --git a/boot_loader/examples/i2c/emac/evmc6678l/.project b/boot_loader/examples/i2c/tftp/evmc6678l/.project
index e1f5627..bf80801 100644
--- a/boot_loader/examples/i2c/emac/evmc6678l/.project
+++ b/boot_loader/examples/i2c/tftp/evmc6678l/.project
@@ -1,6 +1,6 @@
1<?xml version="1.0" encoding="UTF-8"?> 1<?xml version="1.0" encoding="UTF-8"?>
2<projectDescription> 2<projectDescription>
3 <name>i2cemacboot_evmc6678l</name> 3 <name>i2ctftpboot_evmc6678l</name>
4 <comment></comment> 4 <comment></comment>
5 <projects> 5 <projects>
6 </projects> 6 </projects>
@@ -30,7 +30,7 @@
30 </dictionary> 30 </dictionary>
31 <dictionary> 31 <dictionary>
32 <key>org.eclipse.cdt.make.core.buildLocation</key> 32 <key>org.eclipse.cdt.make.core.buildLocation</key>
33 <value>${workspace_loc:/i2cemacboot/Debug}</value> 33 <value>${workspace_loc:/i2ctftpboot/Debug}</value>
34 </dictionary> 34 </dictionary>
35 <dictionary> 35 <dictionary>
36 <key>org.eclipse.cdt.make.core.cleanBuildTarget</key> 36 <key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
@@ -85,12 +85,12 @@
85 <link> 85 <link>
86 <name>README.txt</name> 86 <name>README.txt</name>
87 <type>1</type> 87 <type>1</type>
88 <location>TI_MCSDK_I2CEXAMPLES_DIR/emac/docs/README.txt</location> 88 <location>TI_MCSDK_I2CEXAMPLES_DIR/tftp/docs/README.txt</location>
89 </link> 89 </link>
90 <link> 90 <link>
91 <name>src</name> 91 <name>src</name>
92 <type>2</type> 92 <type>2</type>
93 <locationURI>TI_MCSDK_I2CEXAMPLES_DIR/emac/src</locationURI> 93 <locationURI>TI_MCSDK_I2CEXAMPLES_DIR/tftp/src</locationURI>
94 </link> 94 </link>
95 </linkedResources> 95 </linkedResources>
96</projectDescription> 96</projectDescription>
diff --git a/boot_loader/examples/i2c/emac/evmc6678l/i2c_boot_emac_example.cmd b/boot_loader/examples/i2c/tftp/evmc6678l/i2c_boot_tftp_example.cmd
index cab1993..cab1993 100644
--- a/boot_loader/examples/i2c/emac/evmc6678l/i2c_boot_emac_example.cmd
+++ b/boot_loader/examples/i2c/tftp/evmc6678l/i2c_boot_tftp_example.cmd
diff --git a/boot_loader/examples/i2c/emac/evmc6678l/macros.ini b/boot_loader/examples/i2c/tftp/evmc6678l/macros.ini
index f4e4f7b..f4e4f7b 100644
--- a/boot_loader/examples/i2c/emac/evmc6678l/macros.ini
+++ b/boot_loader/examples/i2c/tftp/evmc6678l/macros.ini
diff --git a/boot_loader/examples/i2c/emac/src/i2c_boot_emac_example.c b/boot_loader/examples/i2c/tftp/src/i2c_boot_tftp_example.c
index 55e447c..55e447c 100644
--- a/boot_loader/examples/i2c/emac/src/i2c_boot_emac_example.c
+++ b/boot_loader/examples/i2c/tftp/src/i2c_boot_tftp_example.c
diff --git a/boot_loader/tools_install.bat b/boot_loader/tools_install.bat
index c3aef59..0c6d54c 100644
--- a/boot_loader/tools_install.bat
+++ b/boot_loader/tools_install.bat
@@ -1,5 +1,8 @@
1mv -f MAD_UG.doc mad-utils\MAD_UG.doc 1mv -f MAD_UG.doc mad-utils\MAD_UG.doc
2 2
3rm -f examples\srio\docs\readme.doc
4
5rm -f -r ..\factory_images
3 6
4 7
5 8
diff --git a/post/docs/README.txt b/post/docs/README.txt
index 7ba3937..9ce271a 100644
--- a/post/docs/README.txt
+++ b/post/docs/README.txt
@@ -43,14 +43,19 @@ Steps to program POST to EEPROM:
43 change "C6000_CG_DIR", "TARGET", "ENDIAN" and "IBL_ROOT_DIR" parameters accordingly. 43 change "C6000_CG_DIR", "TARGET", "ENDIAN" and "IBL_ROOT_DIR" parameters accordingly.
44 44
453. Double click post_romparse.bat. This will generate a CCS format image file "post_i2crom.dat", which can be programmed 453. Double click post_romparse.bat. This will generate a CCS format image file "post_i2crom.dat", which can be programmed
46 to I2C EEPROM slave bus address 80 (0x50), below are the steps how to program the EEPROM using the EEPROM writer utility: 46 to I2C EEPROM slave bus address 0x50, below are the steps how to program the EEPROM using the EEPROM writer utility:
47 47
48 * Copy post_i2crom.dat to tools\writer\eeprom\evmc66xxl\bin directory and rename it to "app.dat". 48 * Copy post_i2crom.dat to tools\writer\eeprom\evmc66xxl\bin directory and rename it to "app.dat".
49 * Change bus_addr to "80" (0x50) and swap_data to "0" in tools\writer\eeprom\evmc66xxl\bin\eepromwriter_input.txt and save the file. 49 * Change bus_addr to 0x50 and swap_data to "0" in tools\writer\eeprom\evmc66xxl\bin\eepromwriter_input.txt and save the file.
50 * Refer to tools\writer\eeprom\evmc66xxl\docs\README.txt on how to program the CCS data file to EEPROM. 50 * Refer to tools\writer\eeprom\evmc66xxl\docs\README.txt on how to program the CCS data file to EEPROM.
51 51
524. Once the programming is completed successfully, user can set the boot mode to I2C mode with bus address 0x50 and 524. Once the programming is completed successfully, user can set the boot mode to I2C mode with bus address 0x50 and
53 boot the POST directly from the EEPROM after POR. The boot status and test result can be monitored using the Hyper 53 boot the POST directly from the EEPROM after POR. The boot status and test result can be monitored using the Hyper
54 Terminal as mentioned in "Steps to run POST in CCSv5". 54 Terminal as mentioned in "Steps to run POST in CCSv5".
55 55
56Please 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 56Please refer to C6678L/C6670L EVM boot mode dip switch settings:
57http://processors.wiki.ti.com/index.php/TMDXEVM6678L_EVM_Hardware_Setup#Boot_Mode_Dip_Switch_Settings
58http://processors.wiki.ti.com/index.php/TMDXEVM6670L_EVM_Hardware_Setup#Boot_Mode_Dip_Switch_Settings
59
60and User's Guide for more details:
61http://processors.wiki.ti.com/index.php/BIOS_MCSDK_2.0_User_Guide \ No newline at end of file
diff --git a/post/evmc6670l/.cproject b/post/evmc6670l/.cproject
index f0519a6..c270318 100644
--- a/post/evmc6670l/.cproject
+++ b/post/evmc6670l/.cproject
@@ -26,7 +26,7 @@
26 <listOptionValue builtIn="false" value="CCS_MBS_VERSION=5.0.1"/> 26 <listOptionValue builtIn="false" value="CCS_MBS_VERSION=5.0.1"/>
27 <listOptionValue builtIn="false" value="RUNTIME_SUPPORT_LIBRARY=rts6600_elf.lib"/> 27 <listOptionValue builtIn="false" value="RUNTIME_SUPPORT_LIBRARY=rts6600_elf.lib"/>
28 <listOptionValue builtIn="false" value="XDC_VERSION=3.20.08.88"/> 28 <listOptionValue builtIn="false" value="XDC_VERSION=3.20.08.88"/>
29 <listOptionValue builtIn="false" value="RTSC_PRODUCTS=com.ti.biosmcsdk.mcsdk_2.0.0.9:2.0.0.9;com.ti.biosmcsdk.pdk.C6670:1.0.0.9;"/> 29 <listOptionValue builtIn="false" value="RTSC_PRODUCTS=com.ti.biosmcsdk.pdk.C6670:1.0.0.10;"/>
30 <listOptionValue builtIn="false" value="OUTPUT_TYPE=rtscApplication:executable"/> 30 <listOptionValue builtIn="false" value="OUTPUT_TYPE=rtscApplication:executable"/>
31 </option> 31 </option>
32 <option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.1263633169" name="Code Generation tools version" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION" value="7.2.0" valueType="string"/> 32 <option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.1263633169" name="Code Generation tools version" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION" value="7.2.0" valueType="string"/>
@@ -39,7 +39,7 @@
39 <option id="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.INCLUDE_PATH.1353471041" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.INCLUDE_PATH" valueType="includePath"> 39 <option id="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.INCLUDE_PATH.1353471041" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.INCLUDE_PATH" valueType="includePath">
40 <listOptionValue builtIn="false" value="&quot;${CG_TOOL_ROOT}/include&quot;"/> 40 <listOptionValue builtIn="false" value="&quot;${CG_TOOL_ROOT}/include&quot;"/>
41 <listOptionValue builtIn="false" value="&quot;${TI_PDK_C6670_INSTALL_DIR}/packages/ti/platform&quot;"/> 41 <listOptionValue builtIn="false" value="&quot;${TI_PDK_C6670_INSTALL_DIR}/packages/ti/platform&quot;"/>
42 <listOptionValue builtIn="false" value="&quot;${TI_MCSDK_INSTALL_DIR}/tools/post/include&quot;"/> 42 <listOptionValue builtIn="false" value="&quot;${PROJECT_ROOT}/../include&quot;"/>
43 </option> 43 </option>
44 <option id="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.ABI.1765753112" name="Application binary interface (coffabi, eabi) (--abi)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.ABI" value="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.ABI.eabi" valueType="enumerated"/> 44 <option id="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.ABI.1765753112" name="Application binary interface (coffabi, eabi) (--abi)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.ABI" value="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.ABI.eabi" valueType="enumerated"/>
45 <option id="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.SILICON_VERSION.261244470" name="Target processor version (--silicon_version, -mv)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.SILICON_VERSION" value="6600" valueType="string"/> 45 <option id="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.SILICON_VERSION.261244470" name="Target processor version (--silicon_version, -mv)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.SILICON_VERSION" value="6600" valueType="string"/>
diff --git a/post/evmc6670l/bin/post_romparse.bat b/post/evmc6670l/bin/post_romparse.bat
index f24b574..cd42df0 100644
--- a/post/evmc6670l/bin/post_romparse.bat
+++ b/post/evmc6670l/bin/post_romparse.bat
@@ -1,7 +1,7 @@
1set C6000_CG_DIR="C:\Program Files\Texas Instruments\ccsv5\tools\compiler\c6000" 1set C6000_CG_DIR="C:\Program Files\Texas Instruments\ccsv5\tools\compiler\c6000"
2set TARGET=6670 2set TARGET=6670
3set ENDIAN=little 3set ENDIAN=little
4set IBL_ROOT_DIR="C:\Program Files\Texas Instruments\mcsdk_2_00_00_beta2\tools\boot_loader\ibl" 4set IBL_ROOT_DIR="..\..\..\boot_loader\ibl"
5set PATH=%PATH%;%SystemRoot%\system32;%SystemRoot%; 5set PATH=%PATH%;%SystemRoot%\system32;%SystemRoot%;
6 6
7 7
diff --git a/post/evmc6678l/.cproject b/post/evmc6678l/.cproject
index f6d801a..9d9dde1 100644
--- a/post/evmc6678l/.cproject
+++ b/post/evmc6678l/.cproject
@@ -26,7 +26,7 @@
26 <listOptionValue builtIn="false" value="CCS_MBS_VERSION=5.0.1"/> 26 <listOptionValue builtIn="false" value="CCS_MBS_VERSION=5.0.1"/>
27 <listOptionValue builtIn="false" value="RUNTIME_SUPPORT_LIBRARY=rts6600_elf.lib"/> 27 <listOptionValue builtIn="false" value="RUNTIME_SUPPORT_LIBRARY=rts6600_elf.lib"/>
28 <listOptionValue builtIn="false" value="XDC_VERSION=3.20.08.88"/> 28 <listOptionValue builtIn="false" value="XDC_VERSION=3.20.08.88"/>
29 <listOptionValue builtIn="false" value="RTSC_PRODUCTS=com.ti.biosmcsdk.mcsdk_2.0.0.9:2.0.0.9;com.ti.biosmcsdk.pdk.C6678L:1.0.0.9;"/> 29 <listOptionValue builtIn="false" value="RTSC_PRODUCTS=com.ti.biosmcsdk.pdk.C6678L:1.0.0.10;"/>
30 <listOptionValue builtIn="false" value="OUTPUT_TYPE=rtscApplication:executable"/> 30 <listOptionValue builtIn="false" value="OUTPUT_TYPE=rtscApplication:executable"/>
31 </option> 31 </option>
32 <option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.1263633169" name="Code Generation tools version" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION" value="7.2.0" valueType="string"/> 32 <option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.1263633169" name="Code Generation tools version" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION" value="7.2.0" valueType="string"/>
@@ -39,7 +39,7 @@
39 <option id="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.INCLUDE_PATH.1353471041" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.INCLUDE_PATH" valueType="includePath"> 39 <option id="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.INCLUDE_PATH.1353471041" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.INCLUDE_PATH" valueType="includePath">
40 <listOptionValue builtIn="false" value="&quot;${CG_TOOL_ROOT}/include&quot;"/> 40 <listOptionValue builtIn="false" value="&quot;${CG_TOOL_ROOT}/include&quot;"/>
41 <listOptionValue builtIn="false" value="&quot;${TI_PDK_C6678_INSTALL_DIR}/packages/ti/platform&quot;"/> 41 <listOptionValue builtIn="false" value="&quot;${TI_PDK_C6678_INSTALL_DIR}/packages/ti/platform&quot;"/>
42 <listOptionValue builtIn="false" value="&quot;${TI_MCSDK_INSTALL_DIR}/tools/post/include&quot;"/> 42 <listOptionValue builtIn="false" value="&quot;${PROJECT_ROOT}/../include&quot;"/>
43 </option> 43 </option>
44 <option id="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.ABI.1765753112" name="Application binary interface (coffabi, eabi) (--abi)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.ABI" value="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.ABI.eabi" valueType="enumerated"/> 44 <option id="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.ABI.1765753112" name="Application binary interface (coffabi, eabi) (--abi)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.ABI" value="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.ABI.eabi" valueType="enumerated"/>
45 <option id="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.SILICON_VERSION.261244470" name="Target processor version (--silicon_version, -mv)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.SILICON_VERSION" value="6600" valueType="string"/> 45 <option id="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.SILICON_VERSION.261244470" name="Target processor version (--silicon_version, -mv)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.SILICON_VERSION" value="6600" valueType="string"/>
diff --git a/post/evmc6678l/bin/post_romparse.bat b/post/evmc6678l/bin/post_romparse.bat
index d0be294..03d5e58 100644
--- a/post/evmc6678l/bin/post_romparse.bat
+++ b/post/evmc6678l/bin/post_romparse.bat
@@ -1,7 +1,7 @@
1set C6000_CG_DIR="C:\Program Files\Texas Instruments\ccsv5\tools\compiler\c6000" 1set C6000_CG_DIR="C:\Program Files\Texas Instruments\ccsv5\tools\compiler\c6000"
2set TARGET=6678 2set TARGET=6678
3set ENDIAN=little 3set ENDIAN=little
4set IBL_ROOT_DIR="C:\Program Files\Texas Instruments\mcsdk_2_00_00_beta2\tools\boot_loader\ibl" 4set IBL_ROOT_DIR="..\..\..\boot_loader\ibl"
5set PATH=%PATH%;%SystemRoot%\system32;%SystemRoot%; 5set PATH=%PATH%;%SystemRoot%\system32;%SystemRoot%;
6 6
7 7
diff --git a/writer/eeprom/evmc6670l/.cproject b/writer/eeprom/evmc6670l/.cproject
index 83f0f7d..d12f64c 100644
--- a/writer/eeprom/evmc6670l/.cproject
+++ b/writer/eeprom/evmc6670l/.cproject
@@ -26,7 +26,7 @@
26 <listOptionValue builtIn="false" value="CCS_MBS_VERSION=5.0.1"/> 26 <listOptionValue builtIn="false" value="CCS_MBS_VERSION=5.0.1"/>
27 <listOptionValue builtIn="false" value="RUNTIME_SUPPORT_LIBRARY=rts6600_elf.lib"/> 27 <listOptionValue builtIn="false" value="RUNTIME_SUPPORT_LIBRARY=rts6600_elf.lib"/>
28 <listOptionValue builtIn="false" value="XDC_VERSION=3.20.08.88"/> 28 <listOptionValue builtIn="false" value="XDC_VERSION=3.20.08.88"/>
29 <listOptionValue builtIn="false" value="RTSC_PRODUCTS=com.ti.biosmcsdk.mcsdk_2.0.0.9:2.0.0.9;com.ti.biosmcsdk.pdk.C6670:1.0.0.9;"/> 29 <listOptionValue builtIn="false" value="RTSC_PRODUCTS=com.ti.biosmcsdk.pdk.C6670:1.0.0.10;"/>
30 <listOptionValue builtIn="false" value="OUTPUT_TYPE=rtscApplication:executable"/> 30 <listOptionValue builtIn="false" value="OUTPUT_TYPE=rtscApplication:executable"/>
31 </option> 31 </option>
32 <option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.1263633169" name="Code Generation tools version" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION" value="7.2.0" valueType="string"/> 32 <option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.1263633169" name="Code Generation tools version" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION" value="7.2.0" valueType="string"/>
@@ -39,7 +39,7 @@
39 <option id="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.INCLUDE_PATH.1353471041" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.INCLUDE_PATH" valueType="includePath"> 39 <option id="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.INCLUDE_PATH.1353471041" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.INCLUDE_PATH" valueType="includePath">
40 <listOptionValue builtIn="false" value="&quot;${CG_TOOL_ROOT}/include&quot;"/> 40 <listOptionValue builtIn="false" value="&quot;${CG_TOOL_ROOT}/include&quot;"/>
41 <listOptionValue builtIn="false" value="&quot;${TI_PDK_C6670_INSTALL_DIR}/packages/ti/platform&quot;"/> 41 <listOptionValue builtIn="false" value="&quot;${TI_PDK_C6670_INSTALL_DIR}/packages/ti/platform&quot;"/>
42 <listOptionValue builtIn="false" value="&quot;${TI_MCSDK_INSTALL_DIR}/tools/writer/eeprom/include&quot;"/> 42 <listOptionValue builtIn="false" value="&quot;${PROJECT_ROOT}/../include&quot;"/>
43 </option> 43 </option>
44 <option id="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.ABI.1765753112" name="Application binary interface (coffabi, eabi) (--abi)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.ABI" value="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.ABI.eabi" valueType="enumerated"/> 44 <option id="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.ABI.1765753112" name="Application binary interface (coffabi, eabi) (--abi)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.ABI" value="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.ABI.eabi" valueType="enumerated"/>
45 <inputType id="com.ti.ccstudio.buildDefinitions.C6000_7.2.compiler.inputType__C_SRCS.397546270" name="C Sources" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.compiler.inputType__C_SRCS"/> 45 <inputType id="com.ti.ccstudio.buildDefinitions.C6000_7.2.compiler.inputType__C_SRCS.397546270" name="C Sources" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.compiler.inputType__C_SRCS"/>
diff --git a/writer/eeprom/evmc6670l/bin/eepromwriter_input.txt b/writer/eeprom/evmc6670l/bin/eepromwriter_input.txt
index 40c14f0..76b3dd9 100644
--- a/writer/eeprom/evmc6670l/bin/eepromwriter_input.txt
+++ b/writer/eeprom/evmc6670l/bin/eepromwriter_input.txt
@@ -1,5 +1,5 @@
1file_name = app.dat 1file_name = app.dat
2bus_addr = 81 2bus_addr = 0x51
3start_addr = 0 3start_addr = 0
4swap_data = 0 4swap_data = 0
5 5
diff --git a/writer/eeprom/evmc6678l/.cproject b/writer/eeprom/evmc6678l/.cproject
index af17263..b3df2e7 100644
--- a/writer/eeprom/evmc6678l/.cproject
+++ b/writer/eeprom/evmc6678l/.cproject
@@ -26,7 +26,7 @@
26 <listOptionValue builtIn="false" value="CCS_MBS_VERSION=5.0.1"/> 26 <listOptionValue builtIn="false" value="CCS_MBS_VERSION=5.0.1"/>
27 <listOptionValue builtIn="false" value="RUNTIME_SUPPORT_LIBRARY=rts6600_elf.lib"/> 27 <listOptionValue builtIn="false" value="RUNTIME_SUPPORT_LIBRARY=rts6600_elf.lib"/>
28 <listOptionValue builtIn="false" value="XDC_VERSION=3.20.08.88"/> 28 <listOptionValue builtIn="false" value="XDC_VERSION=3.20.08.88"/>
29 <listOptionValue builtIn="false" value="RTSC_PRODUCTS=com.ti.biosmcsdk.mcsdk_2.0.0.9:2.0.0.9;com.ti.biosmcsdk.pdk.C6678L:1.0.0.9;"/> 29 <listOptionValue builtIn="false" value="RTSC_PRODUCTS=com.ti.biosmcsdk.pdk.C6678L:1.0.0.10;"/>
30 <listOptionValue builtIn="false" value="OUTPUT_TYPE=rtscApplication:executable"/> 30 <listOptionValue builtIn="false" value="OUTPUT_TYPE=rtscApplication:executable"/>
31 </option> 31 </option>
32 <option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.1263633169" name="Code Generation tools version" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION" value="7.2.0" valueType="string"/> 32 <option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.1263633169" name="Code Generation tools version" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION" value="7.2.0" valueType="string"/>
@@ -39,7 +39,7 @@
39 <option id="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.INCLUDE_PATH.1353471041" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.INCLUDE_PATH" valueType="includePath"> 39 <option id="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.INCLUDE_PATH.1353471041" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.INCLUDE_PATH" valueType="includePath">
40 <listOptionValue builtIn="false" value="&quot;${CG_TOOL_ROOT}/include&quot;"/> 40 <listOptionValue builtIn="false" value="&quot;${CG_TOOL_ROOT}/include&quot;"/>
41 <listOptionValue builtIn="false" value="&quot;${TI_PDK_C6678_INSTALL_DIR}/packages/ti/platform&quot;"/> 41 <listOptionValue builtIn="false" value="&quot;${TI_PDK_C6678_INSTALL_DIR}/packages/ti/platform&quot;"/>
42 <listOptionValue builtIn="false" value="&quot;${TI_MCSDK_INSTALL_DIR}/tools/writer/eeprom/include&quot;"/> 42 <listOptionValue builtIn="false" value="&quot;${PROJECT_ROOT}/../include&quot;"/>
43 </option> 43 </option>
44 <option id="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.ABI.1765753112" name="Application binary interface (coffabi, eabi) (--abi)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.ABI" value="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.ABI.eabi" valueType="enumerated"/> 44 <option id="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.ABI.1765753112" name="Application binary interface (coffabi, eabi) (--abi)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.ABI" value="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.ABI.eabi" valueType="enumerated"/>
45 <inputType id="com.ti.ccstudio.buildDefinitions.C6000_7.2.compiler.inputType__C_SRCS.397546270" name="C Sources" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.compiler.inputType__C_SRCS"/> 45 <inputType id="com.ti.ccstudio.buildDefinitions.C6000_7.2.compiler.inputType__C_SRCS.397546270" name="C Sources" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.compiler.inputType__C_SRCS"/>
diff --git a/writer/eeprom/evmc6678l/bin/eepromwriter_input.txt b/writer/eeprom/evmc6678l/bin/eepromwriter_input.txt
index 40c14f0..76b3dd9 100644
--- a/writer/eeprom/evmc6678l/bin/eepromwriter_input.txt
+++ b/writer/eeprom/evmc6678l/bin/eepromwriter_input.txt
@@ -1,5 +1,5 @@
1file_name = app.dat 1file_name = app.dat
2bus_addr = 81 2bus_addr = 0x51
3start_addr = 0 3start_addr = 0
4swap_data = 0 4swap_data = 0
5 5
diff --git a/writer/eeprom/src/eepromwriter.c b/writer/eeprom/src/eepromwriter.c
index 4668da6..90b9eaa 100644
--- a/writer/eeprom/src/eepromwriter.c
+++ b/writer/eeprom/src/eepromwriter.c
@@ -42,12 +42,13 @@
42 ***************************************************************************************/ 42 ***************************************************************************************/
43#include <stdlib.h> 43#include <stdlib.h>
44#include <stdio.h> 44#include <stdio.h>
45#include<ctype.h>
45#include <string.h> 46#include <string.h>
46#include "platform.h" 47#include "platform.h"
47#include "types.h" 48#include "types.h"
48 49
49/* EEPROM writer utility version */ 50/* EEPROM writer utility version */
50char version[] = "01.00.00.02"; 51char version[] = "01.00.00.03";
51 52
52/* The input file name is hard coded */ 53/* The input file name is hard coded */
53char *input_file = "eepromwriter_input.txt"; 54char *input_file = "eepromwriter_input.txt";
@@ -238,6 +239,62 @@ flash_verify
238 return (TRUE); 239 return (TRUE);
239} 240}
240 241
242int32_t
243xtoi
244(
245 char *xs,
246 uint32_t *result
247)
248{
249 uint32_t szlen = strlen(xs);
250 int32_t i, xv, fact;
251
252 if (szlen > 0)
253 {
254 /* Converting more than 32bit hexadecimal value? */
255 if (szlen>8) return 2; /* exit */
256
257 /* Begin conversion here */
258 *result = 0;
259 fact = 1;
260
261 /* Run until no more character to convert */
262 for(i=szlen-1; i>=0 ;i--)
263 {
264 if (isxdigit(*(xs+i)))
265 {
266 if (*(xs+i)>=97)
267 {
268 xv = ( *(xs+i) - 97) + 10;
269 }
270 else if ( *(xs+i) >= 65)
271 {
272 xv = (*(xs+i) - 65) + 10;
273 }
274 else
275 {
276 xv = *(xs+i) - 48;
277 }
278 *result += (xv * fact);
279 fact *= 16;
280 }
281 else
282 {
283 // Conversion was abnormally terminated
284 // by non hexadecimal digit, hence
285 // returning only the converted with
286 // an error value 4 (illegal hex character)
287 return 4;
288 }
289 }
290 return 0;
291 }
292
293 // Nothing to convert
294 return 1;
295}
296
297
241/****************************************************************************** 298/******************************************************************************
242 * Function: parse_input_file 299 * Function: parse_input_file
243 ******************************************************************************/ 300 ******************************************************************************/
@@ -283,7 +340,17 @@ parse_input_file
283 return FALSE; 340 return FALSE;
284 } 341 }
285 342
286 eepromWriterInfo.busAddr = (uint32_t)atoi(data); 343 if ((data[0] == '0') && (data[1] == 'x' || data[1] == 'X'))
344 {
345 if (xtoi (&data[2], &eepromWriterInfo.busAddr) != 0)
346 {
347 return FALSE;
348 }
349 }
350 else
351 {
352 eepromWriterInfo.busAddr = (uint32_t)atoi(data);
353 }
287 354
288 fgets(line, MAX_LINE_LENGTH, fp); 355 fgets(line, MAX_LINE_LENGTH, fp);
289 key = (char *)strtok(line, tokens); 356 key = (char *)strtok(line, tokens);
diff --git a/writer/nand/evmc6670l/.cproject b/writer/nand/evmc6670l/.cproject
index 42b61cc..82805be 100644
--- a/writer/nand/evmc6670l/.cproject
+++ b/writer/nand/evmc6670l/.cproject
@@ -26,7 +26,7 @@
26 <listOptionValue builtIn="false" value="CCS_MBS_VERSION=5.0.1"/> 26 <listOptionValue builtIn="false" value="CCS_MBS_VERSION=5.0.1"/>
27 <listOptionValue builtIn="false" value="RUNTIME_SUPPORT_LIBRARY=rts6600_elf.lib"/> 27 <listOptionValue builtIn="false" value="RUNTIME_SUPPORT_LIBRARY=rts6600_elf.lib"/>
28 <listOptionValue builtIn="false" value="XDC_VERSION=3.20.08.88"/> 28 <listOptionValue builtIn="false" value="XDC_VERSION=3.20.08.88"/>
29 <listOptionValue builtIn="false" value="RTSC_PRODUCTS=com.ti.biosmcsdk.mcsdk_2.0.0.9:2.0.0.9;com.ti.biosmcsdk.pdk.C6670:1.0.0.9;"/> 29 <listOptionValue builtIn="false" value="RTSC_PRODUCTS=com.ti.biosmcsdk.pdk.C6670:1.0.0.10;"/>
30 <listOptionValue builtIn="false" value="OUTPUT_TYPE=rtscApplication:executable"/> 30 <listOptionValue builtIn="false" value="OUTPUT_TYPE=rtscApplication:executable"/>
31 </option> 31 </option>
32 <option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.1263633169" name="Code Generation tools version" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION" value="7.2.0" valueType="string"/> 32 <option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.1263633169" name="Code Generation tools version" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION" value="7.2.0" valueType="string"/>
@@ -39,7 +39,7 @@
39 <option id="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.INCLUDE_PATH.1353471041" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.INCLUDE_PATH" valueType="includePath"> 39 <option id="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.INCLUDE_PATH.1353471041" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.INCLUDE_PATH" valueType="includePath">
40 <listOptionValue builtIn="false" value="&quot;${CG_TOOL_ROOT}/include&quot;"/> 40 <listOptionValue builtIn="false" value="&quot;${CG_TOOL_ROOT}/include&quot;"/>
41 <listOptionValue builtIn="false" value="&quot;${TI_PDK_C6670_INSTALL_DIR}/packages/ti/platform&quot;"/> 41 <listOptionValue builtIn="false" value="&quot;${TI_PDK_C6670_INSTALL_DIR}/packages/ti/platform&quot;"/>
42 <listOptionValue builtIn="false" value="&quot;${TI_MCSDK_INSTALL_DIR}/tools/writer/nand/include&quot;"/> 42 <listOptionValue builtIn="false" value="&quot;${PROJECT_ROOT}/../include&quot;"/>
43 </option> 43 </option>
44 <option id="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.ABI.1765753112" name="Application binary interface (coffabi, eabi) (--abi)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.ABI" value="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.ABI.eabi" valueType="enumerated"/> 44 <option id="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.ABI.1765753112" name="Application binary interface (coffabi, eabi) (--abi)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.ABI" value="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.ABI.eabi" valueType="enumerated"/>
45 <inputType id="com.ti.ccstudio.buildDefinitions.C6000_7.2.compiler.inputType__C_SRCS.397546270" name="C Sources" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.compiler.inputType__C_SRCS"/> 45 <inputType id="com.ti.ccstudio.buildDefinitions.C6000_7.2.compiler.inputType__C_SRCS.397546270" name="C Sources" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.compiler.inputType__C_SRCS"/>
diff --git a/writer/nand/evmc6678l/.cproject b/writer/nand/evmc6678l/.cproject
index 28becb1..8722dc2 100644
--- a/writer/nand/evmc6678l/.cproject
+++ b/writer/nand/evmc6678l/.cproject
@@ -26,7 +26,7 @@
26 <listOptionValue builtIn="false" value="CCS_MBS_VERSION=5.0.1"/> 26 <listOptionValue builtIn="false" value="CCS_MBS_VERSION=5.0.1"/>
27 <listOptionValue builtIn="false" value="RUNTIME_SUPPORT_LIBRARY=rts6600_elf.lib"/> 27 <listOptionValue builtIn="false" value="RUNTIME_SUPPORT_LIBRARY=rts6600_elf.lib"/>
28 <listOptionValue builtIn="false" value="XDC_VERSION=3.20.08.88"/> 28 <listOptionValue builtIn="false" value="XDC_VERSION=3.20.08.88"/>
29 <listOptionValue builtIn="false" value="RTSC_PRODUCTS=com.ti.biosmcsdk.mcsdk_2.0.0.9:2.0.0.9;com.ti.biosmcsdk.pdk.C6678L:1.0.0.9;"/> 29 <listOptionValue builtIn="false" value="RTSC_PRODUCTS=com.ti.biosmcsdk.pdk.C6678L:1.0.0.10;"/>
30 <listOptionValue builtIn="false" value="OUTPUT_TYPE=rtscApplication:executable"/> 30 <listOptionValue builtIn="false" value="OUTPUT_TYPE=rtscApplication:executable"/>
31 </option> 31 </option>
32 <option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.1263633169" name="Code Generation tools version" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION" value="7.2.0" valueType="string"/> 32 <option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.1263633169" name="Code Generation tools version" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION" value="7.2.0" valueType="string"/>
@@ -39,7 +39,7 @@
39 <option id="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.INCLUDE_PATH.1353471041" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.INCLUDE_PATH" valueType="includePath"> 39 <option id="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.INCLUDE_PATH.1353471041" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.INCLUDE_PATH" valueType="includePath">
40 <listOptionValue builtIn="false" value="&quot;${CG_TOOL_ROOT}/include&quot;"/> 40 <listOptionValue builtIn="false" value="&quot;${CG_TOOL_ROOT}/include&quot;"/>
41 <listOptionValue builtIn="false" value="&quot;${TI_PDK_C6678_INSTALL_DIR}/packages/ti/platform&quot;"/> 41 <listOptionValue builtIn="false" value="&quot;${TI_PDK_C6678_INSTALL_DIR}/packages/ti/platform&quot;"/>
42 <listOptionValue builtIn="false" value="&quot;${TI_MCSDK_INSTALL_DIR}/tools/writer/nand/include&quot;"/> 42 <listOptionValue builtIn="false" value="&quot;${PROJECT_ROOT}/../include&quot;"/>
43 </option> 43 </option>
44 <option id="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.ABI.1765753112" name="Application binary interface (coffabi, eabi) (--abi)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.ABI" value="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.ABI.eabi" valueType="enumerated"/> 44 <option id="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.ABI.1765753112" name="Application binary interface (coffabi, eabi) (--abi)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.ABI" value="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.ABI.eabi" valueType="enumerated"/>
45 <inputType id="com.ti.ccstudio.buildDefinitions.C6000_7.2.compiler.inputType__C_SRCS.397546270" name="C Sources" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.compiler.inputType__C_SRCS"/> 45 <inputType id="com.ti.ccstudio.buildDefinitions.C6000_7.2.compiler.inputType__C_SRCS.397546270" name="C Sources" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.compiler.inputType__C_SRCS"/>
diff --git a/writer/nand/src/nandwriter.c b/writer/nand/src/nandwriter.c
index 3a19512..df325ae 100644
--- a/writer/nand/src/nandwriter.c
+++ b/writer/nand/src/nandwriter.c
@@ -47,11 +47,13 @@
47#include "types.h" 47#include "types.h"
48 48
49/* NAND writer utility version */ 49/* NAND writer utility version */
50char version[] = "01.00.00.02"; 50char version[] = "01.00.00.03";
51 51
52/* The input file name is hard coded */ 52/* The input file name is hard coded */
53char *input_file = "nand_writer_input.txt"; 53char *input_file = "nand_writer_input.txt";
54 54
55uint32_t swap_byte = 0;
56
55/* Parameters defined in the input_file */ 57/* Parameters defined in the input_file */
56#define FILE_NAME "file_name" 58#define FILE_NAME "file_name"
57#define START_ADDR "start_addr" 59#define START_ADDR "start_addr"
@@ -197,11 +199,14 @@ flash_nand
197 uint32_t block, start_block; 199 uint32_t block, start_block;
198 uint8_t *scrach_block; 200 uint8_t *scrach_block;
199 201
200 scrach_block = malloc(nandWriterInfo.blockSizeBytes); 202 if (swap_byte)
201 if (scrach_block == NULL)
202 { 203 {
203 printf ("Can not allocate scratch block memory!\n"); 204 scrach_block = malloc(nandWriterInfo.blockSizeBytes);
204 return (FALSE); 205 if (scrach_block == NULL)
206 {
207 printf ("Can not allocate scratch block memory!\n");
208 return (FALSE);
209 }
205 } 210 }
206 211
207 start_block = nandWriterInfo.startAddr / nandWriterInfo.blockSizeBytes; 212 start_block = nandWriterInfo.startAddr / nandWriterInfo.blockSizeBytes;
@@ -215,7 +220,7 @@ flash_nand
215 if (++block == p_device->block_count) 220 if (++block == p_device->block_count)
216 { 221 {
217 printf ("Flash failed: End of device reached\n"); 222 printf ("Flash failed: End of device reached\n");
218 free (scrach_block); 223 if (swap_byte) free (scrach_block);
219 return (FALSE); 224 return (FALSE);
220 } 225 }
221 } 226 }
@@ -230,7 +235,14 @@ flash_nand
230 wLen = nandWriterInfo.writeBytes - wPos; 235 wLen = nandWriterInfo.writeBytes - wPos;
231 } 236 }
232 237
233 formBlock((uint32_t *)(&nandWriterInfo.writeData[wPos]), nandWriterInfo.blockSizeBytes, scrach_block); 238 if (swap_byte)
239 {
240 formBlock((uint32_t *)(&nandWriterInfo.writeData[wPos]), nandWriterInfo.blockSizeBytes, scrach_block);
241 }
242 else
243 {
244 scrach_block = &nandWriterInfo.writeData[wPos];
245 }
234 if (platform_device_write(p_device->handle, 246 if (platform_device_write(p_device->handle,
235 block*nandWriterInfo.blockSizeBytes, 247 block*nandWriterInfo.blockSizeBytes,
236 scrach_block, 248 scrach_block,
@@ -238,13 +250,13 @@ flash_nand
238 { 250 {
239 printf ("platform_device_write block # %d failed!\n", block); 251 printf ("platform_device_write block # %d failed!\n", block);
240 print_platform_errno(); 252 print_platform_errno();
241 free (scrach_block); 253 if (swap_byte) free (scrach_block);
242 return (FALSE); 254 return (FALSE);
243 } 255 }
244 256
245 } 257 }
246 258
247 free (scrach_block); 259 if (swap_byte) free (scrach_block);
248 return (TRUE); 260 return (TRUE);
249} 261}
250 262
@@ -267,11 +279,14 @@ flash_verify
267 uint8_t *scrach_block; 279 uint8_t *scrach_block;
268 uint32_t *read_data_w; 280 uint32_t *read_data_w;
269 281
270 scrach_block = malloc(nandWriterInfo.blockSizeBytes); 282 if (swap_byte)
271 if (scrach_block == NULL)
272 { 283 {
273 printf ("Can not allocate scratch block memory!\n"); 284 scrach_block = malloc(nandWriterInfo.blockSizeBytes);
274 return (FALSE); 285 if (scrach_block == NULL)
286 {
287 printf ("Can not allocate scratch block memory!\n");
288 return (FALSE);
289 }
275 } 290 }
276 291
277 start_block = nandWriterInfo.startAddr / nandWriterInfo.blockSizeBytes; 292 start_block = nandWriterInfo.startAddr / nandWriterInfo.blockSizeBytes;
@@ -284,7 +299,7 @@ flash_verify
284 if (++block == p_device->block_count) 299 if (++block == p_device->block_count)
285 { 300 {
286 printf ("Flash failed: End of device reached\n"); 301 printf ("Flash failed: End of device reached\n");
287 free (scrach_block); 302 if (swap_byte) free (scrach_block);
288 return (FALSE); 303 return (FALSE);
289 } 304 }
290 } 305 }
@@ -292,6 +307,12 @@ flash_verify
292 307
293 printf ("Reading and verifying block %d (%d bytes of %d)\n", block, rPos, nandWriterInfo.writeBytes); 308 printf ("Reading and verifying block %d (%d bytes of %d)\n", block, rPos, nandWriterInfo.writeBytes);
294 309
310 if (!swap_byte)
311 {
312 scrach_block = &nandWriterInfo.readData[rPos];
313
314 }
315
295 /* Read a block of data */ 316 /* Read a block of data */
296 if(platform_device_read(p_device->handle, 317 if(platform_device_read(p_device->handle,
297 block*nandWriterInfo.blockSizeBytes, 318 block*nandWriterInfo.blockSizeBytes,
@@ -305,14 +326,17 @@ flash_verify
305 printf ("marking block %d as bad, re-flash attempted\n", block); 326 printf ("marking block %d as bad, re-flash attempted\n", block);
306 markBlockBad (p_device, block); 327 markBlockBad (p_device, block);
307 } 328 }
308 free (scrach_block); 329 if (swap_byte) free (scrach_block);
309 return (FALSE); 330 return (FALSE);
310 } 331 }
311 332
312 /* Convert the packed data */ 333 /* Convert the packed data */
313 read_data_w = (uint32_t *)(&nandWriterInfo.readData[rPos]); 334 if (swap_byte)
314 for (i = 0, j = 0; i < nandWriterInfo.blockSizeBytes; i += 4) 335 {
315 read_data_w[j++] = (scrach_block[i+0] << 24) | (scrach_block[i+1] << 16) | (scrach_block[i+2] << 8) | scrach_block[i+3]; 336 read_data_w = (uint32_t *)(&nandWriterInfo.readData[rPos]);
337 for (i = 0, j = 0; i < nandWriterInfo.blockSizeBytes; i += 4)
338 read_data_w[j++] = (scrach_block[i+0] << 24) | (scrach_block[i+1] << 16) | (scrach_block[i+2] << 8) | scrach_block[i+3];
339 }
316 340
317 rLen = nandWriterInfo.blockSizeBytes; 341 rLen = nandWriterInfo.blockSizeBytes;
318 if (nandWriterInfo.writeBytes - rPos < nandWriterInfo.blockSizeBytes) 342 if (nandWriterInfo.writeBytes - rPos < nandWriterInfo.blockSizeBytes)
@@ -327,14 +351,14 @@ flash_verify
327 { 351 {
328 printf ("Failure in block %d, at byte %d, (at byte %d in the data file) expected 0x%08x, read 0x%08x\n", 352 printf ("Failure in block %d, at byte %d, (at byte %d in the data file) expected 0x%08x, read 0x%08x\n",
329 block, i, rPos, nandWriterInfo.writeData[i], nandWriterInfo.readData[i]); 353 block, i, rPos, nandWriterInfo.writeData[i], nandWriterInfo.readData[i]);
330 free (scrach_block); 354 if (swap_byte) free (scrach_block);
331 return (FALSE); 355 return (FALSE);
332 } 356 }
333 } 357 }
334 358
335 } 359 }
336 360
337 free (scrach_block); 361 if (swap_byte) free (scrach_block);
338 return (TRUE); 362 return (TRUE);
339} 363}
340 364
diff --git a/writer/nor/evmc6670l/.cproject b/writer/nor/evmc6670l/.cproject
index fb857e6..89f87ee 100644
--- a/writer/nor/evmc6670l/.cproject
+++ b/writer/nor/evmc6670l/.cproject
@@ -26,7 +26,7 @@
26 <listOptionValue builtIn="false" value="CCS_MBS_VERSION=5.0.1"/> 26 <listOptionValue builtIn="false" value="CCS_MBS_VERSION=5.0.1"/>
27 <listOptionValue builtIn="false" value="RUNTIME_SUPPORT_LIBRARY=rts6600_elf.lib"/> 27 <listOptionValue builtIn="false" value="RUNTIME_SUPPORT_LIBRARY=rts6600_elf.lib"/>
28 <listOptionValue builtIn="false" value="XDC_VERSION=3.20.08.88"/> 28 <listOptionValue builtIn="false" value="XDC_VERSION=3.20.08.88"/>
29 <listOptionValue builtIn="false" value="RTSC_PRODUCTS=com.ti.biosmcsdk.mcsdk_2.0.0.9:2.0.0.9;com.ti.biosmcsdk.pdk.C6670:1.0.0.9;"/> 29 <listOptionValue builtIn="false" value="RTSC_PRODUCTS=com.ti.biosmcsdk.pdk.C6670:1.0.0.10;"/>
30 <listOptionValue builtIn="false" value="OUTPUT_TYPE=rtscApplication:executable"/> 30 <listOptionValue builtIn="false" value="OUTPUT_TYPE=rtscApplication:executable"/>
31 </option> 31 </option>
32 <option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.1263633169" name="Code Generation tools version" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION" value="7.2.0" valueType="string"/> 32 <option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.1263633169" name="Code Generation tools version" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION" value="7.2.0" valueType="string"/>
@@ -39,7 +39,7 @@
39 <option id="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.INCLUDE_PATH.1353471041" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.INCLUDE_PATH" valueType="includePath"> 39 <option id="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.INCLUDE_PATH.1353471041" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.INCLUDE_PATH" valueType="includePath">
40 <listOptionValue builtIn="false" value="&quot;${CG_TOOL_ROOT}/include&quot;"/> 40 <listOptionValue builtIn="false" value="&quot;${CG_TOOL_ROOT}/include&quot;"/>
41 <listOptionValue builtIn="false" value="&quot;${TI_PDK_C6670_INSTALL_DIR}/packages/ti/platform&quot;"/> 41 <listOptionValue builtIn="false" value="&quot;${TI_PDK_C6670_INSTALL_DIR}/packages/ti/platform&quot;"/>
42 <listOptionValue builtIn="false" value="&quot;${TI_MCSDK_INSTALL_DIR}/tools/writer/nor/include&quot;"/> 42 <listOptionValue builtIn="false" value="&quot;${PROJECT_ROOT}/../include&quot;"/>
43 </option> 43 </option>
44 <option id="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.ABI.1765753112" name="Application binary interface (coffabi, eabi) (--abi)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.ABI" value="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.ABI.eabi" valueType="enumerated"/> 44 <option id="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.ABI.1765753112" name="Application binary interface (coffabi, eabi) (--abi)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.ABI" value="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.ABI.eabi" valueType="enumerated"/>
45 <inputType id="com.ti.ccstudio.buildDefinitions.C6000_7.2.compiler.inputType__C_SRCS.397546270" name="C Sources" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.compiler.inputType__C_SRCS"/> 45 <inputType id="com.ti.ccstudio.buildDefinitions.C6000_7.2.compiler.inputType__C_SRCS.397546270" name="C Sources" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.compiler.inputType__C_SRCS"/>
diff --git a/writer/nor/evmc6678l/.cproject b/writer/nor/evmc6678l/.cproject
index 954257c..4969bbd 100644
--- a/writer/nor/evmc6678l/.cproject
+++ b/writer/nor/evmc6678l/.cproject
@@ -26,7 +26,7 @@
26 <listOptionValue builtIn="false" value="CCS_MBS_VERSION=5.0.1"/> 26 <listOptionValue builtIn="false" value="CCS_MBS_VERSION=5.0.1"/>
27 <listOptionValue builtIn="false" value="RUNTIME_SUPPORT_LIBRARY=rts6600_elf.lib"/> 27 <listOptionValue builtIn="false" value="RUNTIME_SUPPORT_LIBRARY=rts6600_elf.lib"/>
28 <listOptionValue builtIn="false" value="XDC_VERSION=3.20.08.88"/> 28 <listOptionValue builtIn="false" value="XDC_VERSION=3.20.08.88"/>
29 <listOptionValue builtIn="false" value="RTSC_PRODUCTS=com.ti.biosmcsdk.mcsdk_2.0.0.9:2.0.0.9;com.ti.biosmcsdk.pdk.C6678L:1.0.0.9;"/> 29 <listOptionValue builtIn="false" value="RTSC_PRODUCTS=com.ti.biosmcsdk.pdk.C6678L:1.0.0.10;"/>
30 <listOptionValue builtIn="false" value="OUTPUT_TYPE=rtscApplication:executable"/> 30 <listOptionValue builtIn="false" value="OUTPUT_TYPE=rtscApplication:executable"/>
31 </option> 31 </option>
32 <option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.1263633169" name="Code Generation tools version" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION" value="7.2.0" valueType="string"/> 32 <option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.1263633169" name="Code Generation tools version" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION" value="7.2.0" valueType="string"/>
@@ -39,7 +39,7 @@
39 <option id="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.INCLUDE_PATH.1353471041" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.INCLUDE_PATH" valueType="includePath"> 39 <option id="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.INCLUDE_PATH.1353471041" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.INCLUDE_PATH" valueType="includePath">
40 <listOptionValue builtIn="false" value="&quot;${CG_TOOL_ROOT}/include&quot;"/> 40 <listOptionValue builtIn="false" value="&quot;${CG_TOOL_ROOT}/include&quot;"/>
41 <listOptionValue builtIn="false" value="&quot;${TI_PDK_C6678_INSTALL_DIR}/packages/ti/platform&quot;"/> 41 <listOptionValue builtIn="false" value="&quot;${TI_PDK_C6678_INSTALL_DIR}/packages/ti/platform&quot;"/>
42 <listOptionValue builtIn="false" value="&quot;${TI_MCSDK_INSTALL_DIR}/tools/writer/nor/include&quot;"/> 42 <listOptionValue builtIn="false" value="&quot;${PROJECT_ROOT}/../include&quot;"/>
43 </option> 43 </option>
44 <option id="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.ABI.1765753112" name="Application binary interface (coffabi, eabi) (--abi)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.ABI" value="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.ABI.eabi" valueType="enumerated"/> 44 <option id="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.ABI.1765753112" name="Application binary interface (coffabi, eabi) (--abi)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.ABI" value="com.ti.ccstudio.buildDefinitions.C6000_7.2.compilerID.ABI.eabi" valueType="enumerated"/>
45 <inputType id="com.ti.ccstudio.buildDefinitions.C6000_7.2.compiler.inputType__C_SRCS.397546270" name="C Sources" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.compiler.inputType__C_SRCS"/> 45 <inputType id="com.ti.ccstudio.buildDefinitions.C6000_7.2.compiler.inputType__C_SRCS.397546270" name="C Sources" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.compiler.inputType__C_SRCS"/>
diff --git a/writer/nor/src/norwriter.c b/writer/nor/src/norwriter.c
index ddd8074..ca32b96 100644
--- a/writer/nor/src/norwriter.c
+++ b/writer/nor/src/norwriter.c
@@ -47,11 +47,13 @@
47#include "../include/types.h" 47#include "../include/types.h"
48 48
49/* NOR writer utility version */ 49/* NOR writer utility version */
50char version[] = "01.00.00.01"; 50char version[] = "01.00.00.02";
51 51
52/* The input file name is hard coded */ 52/* The input file name is hard coded */
53char *input_file = "nor_writer_input.txt"; 53char *input_file = "nor_writer_input.txt";
54 54
55uint32_t swap_byte = 0;
56
55/* Parameters defined in the input_file */ 57/* Parameters defined in the input_file */
56#define FILE_NAME "file_name" 58#define FILE_NAME "file_name"
57#define START_ADDR "start_addr" 59#define START_ADDR "start_addr"
@@ -108,7 +110,7 @@ formBlock
108) 110)
109{ 111{
110 uint32_t i, j; 112 uint32_t i, j;
111 113
112 /* Convert the data to a byte stream */ 114 /* Convert the data to a byte stream */
113 for (i = j = 0; j < blockSize; i++, j+=4) 115 for (i = j = 0; j < blockSize; i++, j+=4)
114 { 116 {
@@ -136,11 +138,14 @@ flash_nor
136 uint32_t block, start_block; 138 uint32_t block, start_block;
137 uint8_t *scrach_block; 139 uint8_t *scrach_block;
138 140
139 scrach_block = malloc(norWriterInfo.blockSizeBytes); 141 if (swap_byte)
140 if (scrach_block == NULL)
141 { 142 {
142 printf ("Can not allocate scratch block memory!\n"); 143 scrach_block = malloc(norWriterInfo.blockSizeBytes);
143 return (FALSE); 144 if (scrach_block == NULL)
145 {
146 printf ("Can not allocate scratch block memory!\n");
147 return (FALSE);
148 }
144 } 149 }
145 150
146 start_block = norWriterInfo.startAddr / norWriterInfo.blockSizeBytes; 151 start_block = norWriterInfo.startAddr / norWriterInfo.blockSizeBytes;
@@ -150,21 +155,20 @@ flash_nor
150 { 155 {
151 printf ("Flashing sector %d (%d bytes of %d)\n", block, wPos, norWriterInfo.writeBytes); 156 printf ("Flashing sector %d (%d bytes of %d)\n", block, wPos, norWriterInfo.writeBytes);
152 157
153 /*if (platform_device_erase_block(p_device->handle, block) != Platform_EOK)
154 {
155 printf ("NOR erase sector # %d failed!\n", block);
156 print_platform_errno();
157 free (scrach_block);
158 return (FALSE);
159 }*/
160
161 wLen = norWriterInfo.blockSizeBytes; 158 wLen = norWriterInfo.blockSizeBytes;
162 if (norWriterInfo.writeBytes - wPos < norWriterInfo.blockSizeBytes) 159 if (norWriterInfo.writeBytes - wPos < norWriterInfo.blockSizeBytes)
163 { 160 {
164 wLen = norWriterInfo.writeBytes - wPos; 161 wLen = norWriterInfo.writeBytes - wPos;
165 } 162 }
166 163
167 formBlock((uint32_t *)(&norWriterInfo.writeData[wPos]), norWriterInfo.blockSizeBytes, scrach_block); 164 if (swap_byte)
165 {
166 formBlock((uint32_t *)(&norWriterInfo.writeData[wPos]), norWriterInfo.blockSizeBytes, scrach_block);
167 }
168 else
169 {
170 scrach_block = &norWriterInfo.writeData[wPos];
171 }
168 if (platform_device_write(p_device->handle, 172 if (platform_device_write(p_device->handle,
169 block*norWriterInfo.blockSizeBytes, 173 block*norWriterInfo.blockSizeBytes,
170 scrach_block, 174 scrach_block,
@@ -172,12 +176,12 @@ flash_nor
172 { 176 {
173 printf ("platform_nor_write sector # %d failed!\n", block); 177 printf ("platform_nor_write sector # %d failed!\n", block);
174 print_platform_errno(); 178 print_platform_errno();
175 free (scrach_block); 179 if (swap_byte) free (scrach_block);
176 return (FALSE); 180 return (FALSE);
177 } 181 }
178 } 182 }
179 183
180 free (scrach_block); 184 if (swap_byte) free (scrach_block);
181 return (TRUE); 185 return (TRUE);
182} 186}
183 187
@@ -200,11 +204,14 @@ flash_verify
200 uint8_t *scrach_block; 204 uint8_t *scrach_block;
201 uint32_t *read_data_w; 205 uint32_t *read_data_w;
202 206
203 scrach_block = malloc(norWriterInfo.blockSizeBytes); 207 if (swap_byte)
204 if (scrach_block == NULL)
205 { 208 {
206 printf ("Can not allocate scratch block memory!\n"); 209 scrach_block = malloc(norWriterInfo.blockSizeBytes);
207 return (FALSE); 210 if (scrach_block == NULL)
211 {
212 printf ("Can not allocate scratch block memory!\n");
213 return (FALSE);
214 }
208 } 215 }
209 216
210 start_block = norWriterInfo.startAddr / norWriterInfo.blockSizeBytes; 217 start_block = norWriterInfo.startAddr / norWriterInfo.blockSizeBytes;
@@ -213,6 +220,11 @@ flash_verify
213 { 220 {
214 printf ("Reading and verifying sector %d (%d bytes of %d)\n", block, rPos, norWriterInfo.writeBytes); 221 printf ("Reading and verifying sector %d (%d bytes of %d)\n", block, rPos, norWriterInfo.writeBytes);
215 222
223 if (!swap_byte)
224 {
225 scrach_block = &norWriterInfo.readData[rPos];
226
227 }
216 /* Read a sector of data */ 228 /* Read a sector of data */
217 if(platform_device_read(p_device->handle, 229 if(platform_device_read(p_device->handle,
218 block*norWriterInfo.blockSizeBytes, 230 block*norWriterInfo.blockSizeBytes,
@@ -221,14 +233,17 @@ flash_verify
221 { 233 {
222 printf ("Failure in sector %d\n", block); 234 printf ("Failure in sector %d\n", block);
223 print_platform_errno(); 235 print_platform_errno();
224 free (scrach_block); 236 if (swap_byte) free (scrach_block);
225 return (FALSE); 237 return (FALSE);
226 } 238 }
227 239
228 /* Convert the packed data */ 240 /* Convert the packed data */
229 read_data_w = (uint32_t *)(&norWriterInfo.readData[rPos]); 241 if (swap_byte)
230 for (i = 0, j = 0; i < norWriterInfo.blockSizeBytes; i += 4) 242 {
231 read_data_w[j++] = (scrach_block[i+0] << 24) | (scrach_block[i+1] << 16) | (scrach_block[i+2] << 8) | scrach_block[i+3]; 243 read_data_w = (uint32_t *)(&norWriterInfo.readData[rPos]);
244 for (i = 0, j = 0; i < norWriterInfo.blockSizeBytes; i += 4)
245 read_data_w[j++] = (scrach_block[i+0] << 24) | (scrach_block[i+1] << 16) | (scrach_block[i+2] << 8) | scrach_block[i+3];
246 }
232 247
233 /* Read the data from the file */ 248 /* Read the data from the file */
234 rLen = norWriterInfo.blockSizeBytes; 249 rLen = norWriterInfo.blockSizeBytes;
@@ -243,14 +258,14 @@ flash_verify
243 { 258 {
244 printf ("Failure in sector %d, at byte %d, (at byte %d in the data file) expected 0x%08x, read 0x%08x\n", 259 printf ("Failure in sector %d, at byte %d, (at byte %d in the data file) expected 0x%08x, read 0x%08x\n",
245 block, i, rPos, norWriterInfo.writeData[i], norWriterInfo.readData[i]); 260 block, i, rPos, norWriterInfo.writeData[i], norWriterInfo.readData[i]);
246 free (scrach_block); 261 if (swap_byte) free (scrach_block);
247 return (FALSE); 262 return (FALSE);
248 } 263 }
249 } 264 }
250 265
251 } 266 }
252 267
253 free (scrach_block); 268 if (swap_byte) free (scrach_block);
254 return (TRUE); 269 return (TRUE);
255} 270}
256 271