LSP210Installation
From Texas Instruments Embedded Processors Wiki
Translate this page to
Contents
Flash Utilities - Source
- Download the latest version of CCS 3.3. The version used for development was 3.3.81.5
- Also install the latest CODEGEN tools for TMS 470/ ARM
This is required if anybody wants to make changes to the UBL and re compile the CCS projects . The version used for development was 4.5.0
- For LSP 2.10 the source used for the NAND programmer and UBL is found at https://gforge01.dal.design.ti.com/svn/cat_flashutils/trunk
Flash Utilities - Installation
- In case there is a previous version of the CODEGEN tools already installed then CCS needs to know that it needs to use the
newer version of the CODEGEN tools. Please do the following as shown in the diagram. Make sure you point to the latest CODEGEN tools.
- In CCS Goto HELP->About->Component Manger->Build Tools
</center>
Compiling Software
- The precompiled binaries can be used from the bin/dm365 that is part of PSP package
- If changes need to be done to the NAND eraser, NAND programmer and UBL, then use the flash utilities
tar ball found in the board_utilties folder of the PSP package.
- Untar this in a Windows machine and build the NAND eraser, NAND writer and UBL projects in the DM36x trunk
just like any other CCS project.
- Commands to build U-Boot for DM365 are
make distclean
make davinci_dm365_evm_config
make
Structure of DM36x Trunk
Flash Utilities
- The same base drivers are used to add support for new devices such as DM365
- This makes it easy to add support for new devices.
- Features added to an existing driver become “visible” to all other SOC’s
- LSP 2.10 does not support booting from NOR in DM365 but NOR driver is present in the source code provided.
- Support for NOR boot can be added by referring to DM644x NOR Writer that is part of the same source.
DM36x CCS Projects
</center>
NAND Programmer - features
- The NAND programmer for DM365 supports the new layout in NAND, i.e for large page devices the layout
of a page is 2048 bytes of data + 64 bytes of OOB instead of being broken into chunks of
512 bytes of data + 16 bytes of OOB
- Has Support for 4K page size NANDs
- NAND writer writes UBL to block 1* and U-Boot to block *25 in DM355 and DM365
- This is done to maintain compatibility with RBL which searches for a UBL header in the first 24 blocks of the NAND.
- Modified NAND Writer utilties will be provided to erase the entire NAND. This needs to be done if the NAND
has been flashed previously with binaries from LSP 2.10 release 08 and before.
NAND Eraser - features
- A NANDeraser project is being provided as part of the release.
- The Project is called NANDEraser.pjt and is found in the DM36x trunk
- The reason why this utility has been provided is because if the NAND has been programmed incorrectly with the wrong
layout or if the Bad Block table has been written with incorrect information we want some mechanism to erase the
entire NAND.
- The NANDEraser will erase all blocks found in the NAND but skips erasing Bad Blocks.
- Many large page NANDs are internally actually 2 devices just like the NAND shipped with the Spectrum digital EVMs
This requires 2= Chip selects. On the DM355 and DM365 these chip selects are at =0x02000000 and 0x02004000.
Thus the address space of the first chip starts at 0x02000000 and the second chip starts at 0x02004000
- The NANDEraser will ask for an input where a user has to input the location where the NAND is connected
UBL - Source
- UBL initializes the device and loads U-Boot to RAM
- The UBL initializes the DDR, PLLs, EMIF,UART and timers and sets up PINMUX
- UBL for DM365 has a routine to avoid the VPPS hang issue. This is done using the POR_RESET function in the UBL
- UBL initializes DM365 to operate at an ARM frequency of 297 MHz and DDR frequency of 243 MHz
- It can be modified to add support for other combinations of ARM/DDR frequencies.
U-Boot 1.3.4
- The version of U-Boot used in LSP 2.10 is 1.3.4
- It has support for DM365, DM355(REV A and C), DM6467 and DM6446.
- The advantage of moving from version 1.2.0 is that it has support for a lot more features and has a lot of bug fixes.
- For e.g., DM365 supports booting from ONENAND. This would mean that customers using U-Boot will require a ONENAND driver. U-Boot 1.3.4 has this support whereas U-Boot 1.2.0 does not.
- Another example: In LSP 1.20 modifications were needed for the DM9000 driver in U-Boot 1.2.0. No modifications were needed in version U-Boot 1.3.4.
U-Boot NAND features
- The NAND driver has support for a page size of upto 4K
- Version 1.3.4 does not support NANDs of size greater than or equal to 4GB.
- Support is also present for the new standard layout where a page of data from a large page NAND
is handled as one chunk of 2048 bytes of data + 64 bytes of OOB or 4096 bytes of data + 128 bytes
of OOB, instead of being broken into chunks of 512 bytes of data + 16 bytes of OOB.
- New MICRON NANDs that have an OOB of 218 bytes for a page size of 4K have not been tested. Such a NAND was flashed with the NAND programmer and UBL but failed to boot up on the DM365. This however did work on the DM355 EVM with REV C silicon. This should be rectified in PG 1.2.
- By default the config file for DM365, davinci_dm365_evm.h has the options CFG_NAND_4BIT_ECC and
CFG_DAVINCI_STD_NAND_LAYOUT enabled.
- Disabling the CFG_DAVINCI_STD_NAND_LAYOUT flag in the DM365 config will mean that we will be using the legacy layout which is not recommended.
- This holds true for DM355 as well
U-Boot features Continued
- The NANDs that have been tested on the DM365 EVM include a 2 GB SLC NAND from MICRON
with a page size of 2K and a 2GB SLC NAND from SAMSUNG with a page size of 4K.
- DM365 U-Boot supports booting from NAND using JFFS2/YAFFS2 as a filesystem.
- Ramdisk can also be used as a filesystem
- U-Boot also supports booting from NFS
DM365 – Boot Overview
- Start CCS and run the DM365 Gel file provided
- Execute the function to setup the DM365 in the Turbo Mode
- This initializes the DM365 and enables us to load and execute the NAND programmer.
- The NAND programmer is used to write the UBL to block 1 and U-Boot to block 25 of NAND
- RBL detects a valid UBL magic number and copies UBL into IRAM.
- UBL then copies U-Boot into RAM
Flashing the DM365 EVM
- SW4 should be in the NAND boot mode.
- EVM should be in ‘Turbo Mode’ by setting Switch SW5 as shown.
- There is a difference between REV B and REV C of the DM365 EVM. In REV B EVM PIN 4 and 5 of SW5 should be set 1. In REV C EVM only PIN 5 of SW5 should be set to 1
</center>
Flashing - Continued
- In CCS load the NANDeraser_DM36x.out into RAM and execute the NAND eraser. The NAND Eraser
will ask for an input where user is asked to input the location where the NAND is connected. Input
'0x02000000'. This will erase the lower half of the NAND. To erase the upper half execute the program again
and input '0x02004000'. NANDs comes in various flavours. We can have a 2GB NAND where it is internally
- devices of 1 Gb each and there are others where internally the NAND is actually 1 device of 2GB. In the latter case
we do not have to execute the program twice.
- The NAND eraser does not need to be used twice in the case where the 2GB SLC NAND from SAMSUNG with page size
4K is used.
- In CCS load the NANDwriter_DM36x.out into RAM and execute the programmer
- The NAND programmer will then ask for the UBL that needs to be written to NAND.
Give UBL_DM36x_NAND.bin along with the entire path where the binary is located.
- Then Input the U-Boot binary. Input u-boot-1.3.4-dm365_evm.bin
along with the entire patch where the binary is located.
- The final two inputs required by the NAND writer are the U-Boot entry point
and the load address. Both these should be 0x81080000.
Flashing - Continued
- Connect NULL modem cable from DB9 connector on EVM to COM port on PC
- Setup the serial terminal for baud rate of 115200, 8 bit data, no parity, 1 stop-bit and no flow control.
- Power up the EVM and you should see the DM365 EVM :> prompt on the serial console.
- While U-Boot is coming up, you will see the version of UBL that is present in NAND.
- U-Boot will also print the information pertaining to the NAND that the DM365 is booting of.
Booting Linux from NAND
- Commands to write the kernel and filesystem to the NAND will differ depending on the block size of the NAND used.
- Since NAND writer will write U-Boot always to block 25 of NAND, the address of the partition for
the kernel and filesystem will differ depending on block size.
- The commands to be used can be found in the commands.txt file that is found in the docs folder of the PSP package.
U-Boot commands
- Set up the tftp server using command
setenv serverip <address>
- Set up the bootfile as follows
setenv bootfile uImage-dm365
- To write kernel image to 2 GB SLC NAND use the commands
dhcp
nand erase 0x400000 0x200000
nand write 0x80700000 0x400000 0x200000
- To write filesystem to 2 GB SLC NAND use the following commands
tftp 0x82000000 ramdisk.gz
nand erase 0xC00000 0x300000
nand write 0x82000000 0xC00000 0x300000
- Then setup the bootargs and bootcmd use the following commands
setenv bootcmd 'nand read 0x82000000 0xC00000 0x300000; nboot 0x80700000 0 0x400000; bootm'
setenv bootargs 'mem=116M console=ttyS0,115200n8 root=/dev/ram0 rw initrd=0x82000000,4M ip=dhcp'
- Additional variations of the commands can be found in the commands.txt file that is part of the PSP release




