summaryrefslogtreecommitdiffstats
blob: c637ccc669debac75abed0497fed68e0983de30e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
EMAC boot over I2C example

A simple Hello World example demonstrating EMAC boot over I2C.

Steps to build the example:

1. Import the i2cemacboot CCS project from tools\boot_loader\examples\i2c\emac\evmc66xxl directory. (in CCSv5, 
   Project->Import Existing CCS/CCE Eclipse Projects)

2. Clean the i2cemacboot project and re-build the project, after build is completed, i2cemacboot_evm66xxl.out and 
   i2cemacboot_evm66xxl.map will be generated under tools\boot_loader\examples\i2c\emac\evmc66xxl\bin directory.

Steps to run i2cemacboot in CCSv5:

1. Be sure to set the boot mode dip switch to no boot/EMIF16 boot mode on the EVM.

2. Load the program tools\boot_loader\examples\i2c\emac\evmc66xxl\bin\i2cemacboot_evm66xxl.out to CCS.

3. Connect the 3-pin RS-232 cable from the EVM to the serial port of the PC, and start Hyper Terminal.

4. Create a new connection with the Baud rate set to 115200 bps, Data bits 8, Parity none, Stop bits 1 and 
   Flow control none. Be sure the COM port # is set correctly.

5. Run the program in CCS, i2cemacboot will send the hello world booting info to both the CCS console and the 
   Hyper Terminal.

Steps to program i2cemacboot to EMAC:

1. Be sure IBL is programmed to I2C EEPROM bus address 81 (0x51), if IBL is not programmed, refer to
   tools\boot_loader\ibl\doc\README.txt on how to program the IBL to EEPROM. 

2. By default, IBL will boot a BBLOB image from EMAC, to run this example, we need to change the
   EMAC boot image format to ELF:
   a. In setConfig_c66xx_main() of tools\boot_loader\ibl\src\util\i2cConfig\i2cConfig.gel, 
      replace 
          ibl.bootModes[2].u.ethBoot.bootFormat        = ibl_BOOT_FORMAT_BBLOB;
      with
          ibl.bootModes[2].u.ethBoot.bootFormat        = ibl_BOOT_FORMAT_ELF;
   b. Re-program the boot configuration table, refer to tools\boot_loader\ibl\doc\README.txt on how to program 
      the boot configuration table to EEPROM. 
      
3. Copy tools\boot_loader\examples\i2c\emac\evmc66xxl\bin\i2cemacboot_evm66xxl.out to tools\bin2ccs and rename
   the file to app.out.

4. Double click bin2ccs.bat, which will convert app.out to a CCS format data file app.dat.

5. Start a TFTP server (you can download a free, open source application from http://tftpd32.jounin.net) and copy
   app.dat to the TFTP base directory.

6. 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 
   IP address to 192.168.2.100 and the TFTP server IP address to 192.168.2.101. 

7. Set the boot dip switches to I2C master mode, bus address 81 (0x51) and boot parameter index to be 4.

8. Be sure the EVM and the PC are connected in the same subnet of a local network, after POR, IBL will download the
   boot image from TFTP server and boot from it. By default IBL will boot an ELF format image, if user wants to boot 
   an image of other formats, he/she needs to change the boot configuration table accordingly, and re-program the table
   to the EEPROM.