]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - keystone-rtos/mcsdk-tools.git/blob - boot_loader/MAD_README.txt
Added build scripts for MAD
[keystone-rtos/mcsdk-tools.git] / boot_loader / MAD_README.txt
1 Tools required to build MAD loader on Windows environment:
2 MinGW MSYS v1.0.11 (http://downloads.sourceforge.net/mingw/MSYS-1.0.11.exe)
4 Steps to build MAD loader:
5 1. Go to mad-utils\mad-loader directory, and modify the MYSYSPATH in setupenv.bat if necessary to set up the right tools path
6 2. Run "setupenv.bat"
7 3. Run ". ./buildmad" under bash command prompt, the buildmad script will build the MAD loader library/application and example applications
10 Contents:
11 ./examples: This folder contains example applications and DSO(s) for testing the MAD flow
12 ./mal: This folder contains the source for MAD loader library and the loader application
13 ./nmlLoader: This folder contains the source for the no man's land loader(NML).  NML is a
14              sub-component of the MAD loader and resides in a reserved virtual address space.
16 Build instructions:
17 NOTE FOR BUILDING ON WINDOWS ENVIRONMENT: For building on windows environment GNU utilities like
18 "make" would be required. The following build procedure should also work on Cygwin or MINGW-MSYS Bourne shell.
20     Before starting the build following environment setup has to be done 
21     1) variable C_DIR should be set to the top directory of the Code Generation tools e.g.
22        Linux bash shell: 
23           export C_DIR=/opt/TI/TI_CGT_C6000_7.2.0A10232/
24        MSYS bash shell: 
25           export C_DIR='"C:/Program Files/Texas Instruments/ccsv5/tools/compiler/c6000"'
26     2) Code Generation tool binaries should be in the path e.g.
27        Linux bash shell: 
28           export PATH=/opt/TI/TI_CGT_C6000_7.2.0A10232/bin:$PATH
29        MSYS bash shell: 
30           export PATH=$PATH:/c/Program\ Files/Texas\ Instruments/ccsv5/tools/compiler/c6000/bin/
32 Example applications:
33     Each of the applications have a makefile which should be used to build the application.
34     make DEVICE=<device number>
35         supported device numbers are 
36             C6472 (Tomahawk)
37             C6616 (Nyquist) 
38             C6678 (Tomahawk)
40 MAD loader library:
41     The makefile for building the MAD loader library is in the directory "mal/malLib/build"
42     Following are the steps to build the MAD loader library:
43     cd mal/malLib/build
44     make DEVICE=<device number>
45         supported device numbers are 
46             C6472 (Tomahawk)
47             C6616 (Nyquist) 
48             C6678 (Tomahawk)
50 MAD loader application:
51     The makefile for building the MAD loader library is in the directory "mal/malApp/build"
52     NOTE: The MAD loader library has to be built prior to building MAD loader App
53     Following are the steps to build the MAD loader library:
54     cd mal/malApp/build
55     make DEVICE=<device number>
56         supported device numbers are 
57             C6472 (Tomahawk)
58             C6616 (Nyquist)
59             C6678 (Tomahawk)
61     NOTE: MAD loader application needs to be XIP in DDR. The linker command file "lnk_<device number>.cmd"
62           is used to ensure that the MAD loader app is bound to XIP address in DDR.
64 NML:
65     The makefile for building the NML is in the directory "nmlLoader/build"
66     Following are the steps to build NML:
67     cd nmlLoader/build
68     make DEVICE=<device number>
69         supported device numbers are 
70             C6472 (Tomahawk)
71             C6616 (Nyquist)
72             C6678 (Tomahawk)
74     NOTE: Since NML is XIP in DDR, it has to be ensured that the NML code segments are bound to virtual address
75           which is XIP in DDR. NML is a part of the ROM file system loaded on DDR. if the offset of the 
76           NML ELF file changes in the ROM file system, then this address needs to be modified. This can happen
77           if the size of the MAD loader application changes.
78           To get the current offset of NML in ROM file system, do a trial run of the MAP tool, 
79           MAP tool will create a file ./tmp/fsOffsets.txt. This file will list the offset of all the 
80           files in the filesystem.
81           The linker command file "lnk_<device number>.cmd" is used to ensure that the NML is bound to XIP address in DDR.
82     NOTE: NML also needs RW area for stack and global variables. By default the linker command file has been setup 
83           to allocate the RW area towards the end of DDR memory. This should be changed by the user according to the
84           target execution environment.