summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHao Zhang2011-03-16 19:47:47 -0500
committerHao Zhang2011-03-16 19:47:47 -0500
commitc31e466cd91bc67d89f98a1431166c7cd9171bb1 (patch)
tree6aad76933207df0ec060917d3a18c81580616208 /boot_loader/examples/i2c/nand
parent21e2632c66415c00cb2db58cab681d5a449d9f35 (diff)
downloadmcsdk-tools-c31e466cd91bc67d89f98a1431166c7cd9171bb1.tar.gz
mcsdk-tools-c31e466cd91bc67d89f98a1431166c7cd9171bb1.tar.xz
mcsdk-tools-c31e466cd91bc67d89f98a1431166c7cd9171bb1.zip
add other tools utilities and examples
Diffstat (limited to 'boot_loader/examples/i2c/nand')
-rw-r--r--boot_loader/examples/i2c/nand/docs/README.txt47
-rw-r--r--boot_loader/examples/i2c/nand/evmc6678l/.ccsproject10
-rw-r--r--boot_loader/examples/i2c/nand/evmc6678l/.cproject83
-rw-r--r--boot_loader/examples/i2c/nand/evmc6678l/.project96
-rw-r--r--boot_loader/examples/i2c/nand/evmc6678l/i2c_boot_nand_example.cmd77
-rw-r--r--boot_loader/examples/i2c/nand/evmc6678l/macros.ini1
-rw-r--r--boot_loader/examples/i2c/nand/src/i2c_boot_nand_example.c113
7 files changed, 427 insertions, 0 deletions
diff --git a/boot_loader/examples/i2c/nand/docs/README.txt b/boot_loader/examples/i2c/nand/docs/README.txt
new file mode 100644
index 0000000..f14850b
--- /dev/null
+++ b/boot_loader/examples/i2c/nand/docs/README.txt
@@ -0,0 +1,47 @@
1NAND boot over I2C example
2
3A simple Hello World example demonstrating NAND boot over I2C.
4
5Steps to build the example:
6
71. Import the i2cnandboot CCS project from tools\boot_loader\examples\i2c\nand\evmc6xxxl directory. (in CCSv5,
8 Project->Import Existing CCS/CCE Eclipse Projects)
9
102. Clean the i2cnandboot project and re-build the project, after build is completed, i2cnandboot_evm6xxxl.out and
11 i2cnandboot_evm6xxxl.map will be generated under tools\boot_loader\examples\i2c\nand\evmc6xxxl\bin directory.
12
13Steps to run i2cnandboot in CCSv5:
14
151. Be sure to set the boot mode dip switch to no boot/EMIF16 boot mode on the EVM, please refer to the EVM technical
16 reference manual on how to set the boot mode dip switchs.
17
182. Load the program tools\boot_loader\examples\i2c\nand\evmc6xxxl\bin\i2cnandboot_evm6xxxl.out to CCS.
19
203. Connect the 3-pin RS-232 cable from the EVM to the serial port of the PC, and start Hyper Terminal.
21
224. Create a new connection with the Baud rate set to 115200 bps, Data bits 8, Parity none, Stop bits 1 and
23 Flow control none. Be sure the COM port # is set correctly.
24
255. Run the program in CCS, POST will send the booting image info to both the CCS console and the Hyper Terminal.
26
27
28Steps to program i2cnandboot to NAND:
29
301. Be sure IBL is progrommed to I2C EEPROM bus address 81 (0x51), if IBL is not programmed, refer to
31 tools\boot_loader\ibl\doc\README.txt on how to program the IBL to EEPROM.
32
332. Be sure NAND boot parameter table is progrommed to I2C EEPROM bus address 81 (0x51), if the table is not programmed,
34 refer to tools\boot_loader\ibl\doc\README.txt on how to program the boot parameter table to EEPROM.
35
363. Copy tools\boot_loader\examples\i2c\nand\evmc6xxxl\bin\i2cnandboot_evm6xxxl.out to tools\bin2ccs and rename
37 the file to app.out.
38
394. Double click bin2ccs.bat, which will convert app.out to a CCS format data file app.dat.
40
415. Copy app.dat to tools\writer\nand\evmc6xxxl\bin and refer to tools\writer\nand\docs\README.txt on how to program
42 the app.dat to NAND flash.
43
447. Once the the programming is completed successfully, user can set the boot mode to I2C mode with bus address 0x51
45 (please refer to the EVM technical reference manual on how to set the boot mode dip switchs) and
46 boot the Hellow World image from the NAND flash after POR.
47
diff --git a/boot_loader/examples/i2c/nand/evmc6678l/.ccsproject b/boot_loader/examples/i2c/nand/evmc6678l/.ccsproject
new file mode 100644
index 0000000..79d3116
--- /dev/null
+++ b/boot_loader/examples/i2c/nand/evmc6678l/.ccsproject
@@ -0,0 +1,10 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<?ccsproject version="1.0"?>
3
4<projectOptions>
5<deviceVariant value="com.ti.ccstudio.deviceModel.C6000.CustomC6000Device"/>
6<deviceEndianness value="little"/>
7<codegenToolVersion value="7.2.0"/>
8<isElfFormat value="true"/>
9<rts value="rts6600_elf.lib"/>
10</projectOptions>
diff --git a/boot_loader/examples/i2c/nand/evmc6678l/.cproject b/boot_loader/examples/i2c/nand/evmc6678l/.cproject
new file mode 100644
index 0000000..d67cafb
--- /dev/null
+++ b/boot_loader/examples/i2c/nand/evmc6678l/.cproject
@@ -0,0 +1,83 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<?fileVersion 4.0.0?>
3
4<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
5 <storageModule moduleId="org.eclipse.cdt.core.settings">
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">
8 <externalSettings/>
9 <extensions>
10 <extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
11 <extension id="com.ti.ccstudio.errorparser.LinkErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
12 <extension id="com.ti.ccstudio.errorparser.CoffErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
13 <extension id="org.eclipse.rtsc.xdctools.parsers.ErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
14 <extension id="com.ti.ccstudio.errorparser.AsmErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
15 </extensions>
16 </storageModule>
17 <storageModule moduleId="org.eclipse.cdt.core.pathentry"/>
18 <storageModule moduleId="cdtBuildSystem" version="4.0.0">
19 <configuration artifactExtension="out" artifactName="../bin/i2cnandboot_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="">
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">
23 <listOptionValue builtIn="false" value="DEVICE_CONFIGURATION_ID=com.ti.ccstudio.deviceModel.C6000.CustomC6000Device"/>
24 <listOptionValue builtIn="false" value="DEVICE_ENDIANNESS=little"/>
25 <listOptionValue builtIn="false" value="OUTPUT_FORMAT=ELF"/>
26 <listOptionValue builtIn="false" value="CCS_MBS_VERSION=5.0.1"/>
27 <listOptionValue builtIn="false" value="RUNTIME_SUPPORT_LIBRARY=rts6600_elf.lib"/>
28 <listOptionValue builtIn="false" value="XDC_VERSION=3.20.08.88"/>
29 <listOptionValue builtIn="false" value="RTSC_PRODUCTS=com.ti.biosmcsdk.pdk.C6678L:1.0.0.7;"/>
30 <listOptionValue builtIn="false" value="OUTPUT_TYPE=rtscApplication:executable"/>
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"/>
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:/i2cnandboot/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">
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"/>
38 </option>
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;"/>
41 <listOptionValue builtIn="false" value="&quot;${TI_PDK_C6678_INSTALL_DIR}/packages/ti/platform&quot;"/>
42 </option>
43 <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 <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__CPP_SRCS.1186530295" name="C++ Sources" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.compiler.inputType__CPP_SRCS"/>
46 <inputType id="com.ti.ccstudio.buildDefinitions.C6000_7.2.compiler.inputType__ASM_SRCS.46202294" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.compiler.inputType__ASM_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>
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/i2cnandboot_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/i2cnandboot_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">
53 <listOptionValue builtIn="false" value="&quot;rts6600_elf.lib&quot;"/>
54 <listOptionValue builtIn="false" value="&quot;ti.platform.evm6678l.ae66&quot;"/>
55 </option>
56 <option id="com.ti.ccstudio.buildDefinitions.C6000_7.2.linkerID.SEARCH_PATH.352622214" name="Add &lt;dir&gt; to library search path (--search_path, -i)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.2.linkerID.SEARCH_PATH" valueType="stringList">
57 <listOptionValue builtIn="false" value="&quot;${CG_TOOL_ROOT}/lib&quot;"/>
58 <listOptionValue builtIn="false" value="&quot;${CG_TOOL_ROOT}/include&quot;"/>
59 <listOptionValue builtIn="false" value="&quot;${TI_PDK_C6678_INSTALL_DIR}/packages/ti/platform/evmc6678l/platform_lib/lib/debug&quot;"/>
60 </option>
61 </tool>
62 <tool id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.1242540186" name="XDCtools" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool">
63 <option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.CODEGEN_TOOL_DIR.496009253" name="Code generation tool directory (-c)" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.CODEGEN_TOOL_DIR" value="&quot;${CG_TOOL_ROOT}&quot;" 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.evm6678" 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">
68 <listOptionValue builtIn="false" value="&quot;${TI_PDK_C6678_INSTALL_DIR}/packages&quot;"/>
69 </option>
70 </tool>
71 </toolChain>
72 </folderInfo>
73 </configuration>
74 </storageModule>
75 <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
76 <storageModule moduleId="org.eclipse.cdt.core.language.mapping"/>
77 <storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
78 </cconfiguration>
79 </storageModule>
80 <storageModule moduleId="cdtBuildSystem" version="4.0.0">
81 <project id="i2cnandboot.com.ti.ccstudio.buildDefinitions.C6000.ProjectType.1742876545" name="C6000" projectType="com.ti.ccstudio.buildDefinitions.C6000.ProjectType"/>
82 </storageModule>
83</cproject>
diff --git a/boot_loader/examples/i2c/nand/evmc6678l/.project b/boot_loader/examples/i2c/nand/evmc6678l/.project
new file mode 100644
index 0000000..c597440
--- /dev/null
+++ b/boot_loader/examples/i2c/nand/evmc6678l/.project
@@ -0,0 +1,96 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<projectDescription>
3 <name>i2cnandboot</name>
4 <comment></comment>
5 <projects>
6 </projects>
7 <buildSpec>
8 <buildCommand>
9 <name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
10 <arguments>
11 <dictionary>
12 <key>?name?</key>
13 <value></value>
14 </dictionary>
15 <dictionary>
16 <key>org.eclipse.cdt.make.core.append_environment</key>
17 <value>true</value>
18 </dictionary>
19 <dictionary>
20 <key>org.eclipse.cdt.make.core.autoBuildTarget</key>
21 <value>all</value>
22 </dictionary>
23 <dictionary>
24 <key>org.eclipse.cdt.make.core.buildArguments</key>
25 <value>-k</value>
26 </dictionary>
27 <dictionary>
28 <key>org.eclipse.cdt.make.core.buildCommand</key>
29 <value>${CCS_INSTALL_ROOT}/utils/gmake/gmake</value>
30 </dictionary>
31 <dictionary>
32 <key>org.eclipse.cdt.make.core.buildLocation</key>
33 <value>${workspace_loc:/i2cnandboot/Debug}</value>
34 </dictionary>
35 <dictionary>
36 <key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
37 <value>clean</value>
38 </dictionary>
39 <dictionary>
40 <key>org.eclipse.cdt.make.core.contents</key>
41 <value>org.eclipse.cdt.make.core.activeConfigSettings</value>
42 </dictionary>
43 <dictionary>
44 <key>org.eclipse.cdt.make.core.enableAutoBuild</key>
45 <value>true</value>
46 </dictionary>
47 <dictionary>
48 <key>org.eclipse.cdt.make.core.enableCleanBuild</key>
49 <value>true</value>
50 </dictionary>
51 <dictionary>
52 <key>org.eclipse.cdt.make.core.enableFullBuild</key>
53 <value>true</value>
54 </dictionary>
55 <dictionary>
56 <key>org.eclipse.cdt.make.core.fullBuildTarget</key>
57 <value>all</value>
58 </dictionary>
59 <dictionary>
60 <key>org.eclipse.cdt.make.core.stopOnError</key>
61 <value>true</value>
62 </dictionary>
63 <dictionary>
64 <key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
65 <value>true</value>
66 </dictionary>
67 </arguments>
68 </buildCommand>
69 <buildCommand>
70 <name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
71 <triggers>full,incremental,</triggers>
72 <arguments>
73 </arguments>
74 </buildCommand>
75 </buildSpec>
76 <natures>
77 <nature>org.eclipse.rtsc.xdctools.buildDefinitions.XDC.xdcNature</nature>
78 <nature>com.ti.ccstudio.managedbuild.core.ccsNature</nature>
79 <nature>org.eclipse.cdt.core.cnature</nature>
80 <nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
81 <nature>org.eclipse.cdt.core.ccnature</nature>
82 <nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
83 </natures>
84 <linkedResources>
85 <link>
86 <name>README.txt</name>
87 <type>1</type>
88 <location>TI_MCSDK_BLEXAMPLES_DIR/nand/docs/README.txt</location>
89 </link>
90 <link>
91 <name>src</name>
92 <type>2</type>
93 <locationURI>TI_MCSDK_I2CEXAMPLES_DIR/nand/src</locationURI>
94 </link>
95 </linkedResources>
96</projectDescription>
diff --git a/boot_loader/examples/i2c/nand/evmc6678l/i2c_boot_nand_example.cmd b/boot_loader/examples/i2c/nand/evmc6678l/i2c_boot_nand_example.cmd
new file mode 100644
index 0000000..cab1993
--- /dev/null
+++ b/boot_loader/examples/i2c/nand/evmc6678l/i2c_boot_nand_example.cmd
@@ -0,0 +1,77 @@
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 * Linker command file
35 *
36 */
37
38-c
39-heap 0x40000
40-stack 0x8000
41
42/* Memory Map 1 - the default */
43MEMORY
44{
45 L1PSRAM (RWX) : org = 0x0E00000, len = 0x7FFF
46 L1DSRAM (RWX) : org = 0x0F00000, len = 0x7FFF
47
48 L2SRAM (RWX) : org = 0x0820000, len = 0xe0000
49 MSMCSRAM (RWX) : org = 0xc000000, len = 0x200000
50 DDR3 (RWX) : org = 0x80000000,len = 0x10000000
51}
52
53SECTIONS
54{
55 .csl_vect > L2SRAM
56 .cppi > L2SRAM
57 .linkram > L2SRAM
58 .mac_buffer > L2SRAM
59 platform_lib > L2SRAM
60 .text > L2SRAM
61 GROUP (NEAR_DP)
62 {
63 .neardata
64 .rodata
65 .bss
66 } load > L2SRAM
67 .stack > L2SRAM
68 .cinit > L2SRAM
69 .cio > L2SRAM
70 .const > L2SRAM
71 .data > L2SRAM
72 .switch > L2SRAM
73 .sysmem > L2SRAM
74 .far > L2SRAM
75 .testMem > L2SRAM
76 .fardata > L2SRAM
77}
diff --git a/boot_loader/examples/i2c/nand/evmc6678l/macros.ini b/boot_loader/examples/i2c/nand/evmc6678l/macros.ini
new file mode 100644
index 0000000..f4e4f7b
--- /dev/null
+++ b/boot_loader/examples/i2c/nand/evmc6678l/macros.ini
@@ -0,0 +1 @@
TI_MCSDK_I2CEXAMPLES_DIR="../../../../
diff --git a/boot_loader/examples/i2c/nand/src/i2c_boot_nand_example.c b/boot_loader/examples/i2c/nand/src/i2c_boot_nand_example.c
new file mode 100644
index 0000000..6ebede1
--- /dev/null
+++ b/boot_loader/examples/i2c/nand/src/i2c_boot_nand_example.c
@@ -0,0 +1,113 @@
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 nand 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: NAND Boot Over I2C Example
36 **************************************************************************************
37 * FILE NAME: i2c_boot_nand_example.c
38 *
39 * DESCRIPTION: A simple hello world example demonstrating NAND boot over I2C.
40 *
41 ***************************************************************************************/
42#include <stdlib.h>
43#include <stdio.h>
44#include <string.h>
45#include "platform.h"
46
47#define BOOT_UART_BAUDRATE 115200
48
49/* i2c_boot_nand_example version */
50char version[] = "01.00.00.00";
51
52/******************************************************************************
53 * Function: print_platform_errno
54 ******************************************************************************/
55void
56print_platform_errno
57(
58 void
59)
60{
61 printf ("Returned platform error number is %d\n", platform_errno);
62}
63
64/******************************************************************************
65 * Function: write_uart
66 ******************************************************************************/
67void
68write_uart
69(
70 char* msg
71)
72{
73 uint32_t i;
74 uint32_t msg_len = strlen(msg);
75
76 /* Write the message to the UART */
77 for (i = 0; i < msg_len; i++)
78 {
79 platform_uart_write(msg[i]);
80 }
81}
82
83
84/******************************************************************************
85 * Function: main
86 ******************************************************************************/
87void main ()
88{
89 platform_init_flags init_flags;
90 platform_init_config init_config;
91 char version_msg[] = "\r\n\r\nNAND Boot Over I2C Example Version ";
92 char boot_msg[] = "\r\n\r\nBooting Hello World image from NAND flash via IBL over I2C 0x51 ...";
93
94 printf("%s%s\n\n", version_msg, version);
95
96 /* Initialize main Platform lib */
97 memset(&init_config, 0, sizeof(platform_init_config));
98 memset(&init_flags, 1, sizeof(platform_init_flags));
99 if (platform_init(&init_flags, &init_config) != Platform_EOK)
100 {
101 printf ("Platform init failed!\n");
102 print_platform_errno();
103 return;
104 }
105 platform_uart_init();
106 platform_uart_set_baudrate(BOOT_UART_BAUDRATE);
107
108 write_uart(version_msg);
109 write_uart(version);
110
111 printf("%s", boot_msg);
112 write_uart(boot_msg);
113}