TI Flash and Boot Utilities

 

TI Flash and Boot Utilities

Serial Boot and Flash Loading Utility

From Texas Instruments Embedded Processors Wiki

Jump to: navigation, search

TI Flash and Boot Utilities

These packages (currently available for the DM35x, DM644x, and DM646x) contain a set of utilities, some for running under CCS on Windows, and others for running from the command-line on both Windows and Linux. In these second set of utilities are applications for flashing the NOR and NAND (and in the future SD cards, SPI FLash/EEPROM, I2C EEPROM) of the EVMs via the serial port. All source is included for users who wish to adapt the applications to their own custom platform. The entire project is released under the GPLv2 license.

The Serial Flashing Host Utility (which offers the same functionality as a previous program called DVFlasher) executable is called sfh_<DEVICENAME>.exe, where device name is DM35x, DM644x, or DM646x.

The Serial Loading Host Utility (which offers the same functionality as a previous program called DVLoader) executable is called slh_<DEVICENAME>.exe, where device name is DM35x, DM644x, or DM646x.

These programs each encapsulate a distinct binary UBL which is transferred via the UART. This implies that the chip must be operating in the UART boot mode, showing the BOOTME prompt.

NOTE: The assumption is made that the UART of the device operates at 115200, 8N1. If the oscillator used with the device does not match the one used on the EVM (e.g. on a custom platform), the baud rate assumption may be incorrect.

The binary UBL in the case of the Serial Flasher program is known as the Serial Flasher Target, or sft. The binary UBL in the case of the Serial Loader program is the Serial Loader Target, or slt. The code for these is present in the directories of the same name.

Other alternatives for RBL UBL and host programs are also available.

Running

- Under Windows - This utilities can be run from the command line under Windows with the .Net Framework 2.0 or later installed.

 sfh_<DEVICENAME>.exe [options]
 slh_<DEVICENAME>.exe [options]

- Under Linux - They can also be run on a Linux machine with the latest open-source Mono Framework installed.

 mono sfh_<DEVICENAME>.exe [options]
 mono slh_<DEVICENAME>.exe [options]

Compiling

A makefile is included for compiling the host and target parts of each utility. The target portions are built first since they are embedded into the the host executables. These target portions are loaded to the DM35x device via the UART boot mode.


Under Windows

The currently supported method is to use the Cygwin environment (such as the one provided with the Montavista Linux tools for Windows) and put the C sharp compiler's (the csc.exe executable) install location in the user's path. This compiler comes with the .NET Framework installation and can usually be found in C:/WINDOWS/Microsoft.NET/Framework/<version number>. Then go to the top level directory of the package and run:

    make

Under Linux

The Mono Framework must be installed and in the path. RPMs are available at 'http://www.mono-project.com/Downloads'. Then go to the top level directory of the package and run:

    make
 

The above instructions assume the that GNU ARM cross-compiler tools (arm-none-linux-gnueabi-gcc, etc.) are in the current PATH.

Serial Loader Usage

More info can be found by running the utility with the '-h' option.

  slh_<DEVICENAME>.exe -h

1) Load a UBL or small UBL-like application to the DM35x IRAM

  slh_<DEVICENAME>.exe -load2IRAM <UBL binary file>

2) Load a larger image compiled to run at start of DDR space

  slh_<DEVICENAME>.exe -load2DDR <binary application file>

For the load to IRAM option, the file size is limited to 14KB, and the application assumes an entry point address of 0x0100 (the smallest allowed). The entry point address canbe modified by using the -startAddr command line option, with the address specified in hex.

For the load to DDR option, the file size is limited to 32MB, and the application assumes a load address and entry point address of 0x80000000. The entry point address can be altered by using the -startAddr command line option, as with the -load2IRAM case. The load address can be altered from the default by using the -loadAddr command line option

Serial Flasher Usage

More info can be found by running the utility with the '-h' option.

  sfh_<DEVICENAME>.exe -h

1) Erase the NAND flash

  sfh_<DEVICENAME>.exe -nanderase

2) Flash the NAND with a UBL and u-boot image

   sfh_<DEVICENAME>.exe -nandflash  <UBL binary file> <binary application file>

The entry point of the UBL is assumed to be 0x0100, but this can be changed by using the -UBLStartAddr option. The entry point and load address of the application default to 0x81080000 (u-boot defaults). To change these values, use the -APPStartAddr and -APPLoadAddr option.

   sfh_<DEVICENAME>.exe -nandflash  -UBLStartAddr <address>  -APPLoadAddr <address> <UBL binary file> <binary application file>

3) Erase the NOR flash

  sfh_<DEVICENAME>.exe -norerase

4) Flash the NOR with a UBL and u-boot image

   sfh_<DEVICENAME>.exe -norflash  <UBL binary file> <binary application file>

The entry point of the UBL is assumed to be 0x0100, but this can be changed by using the -UBLStartAddr option. The entry point and load address of the application default to 0x81080000 (u-boot defaults). To change these values, use the -APPStartAddr and -APPLoadAddr option.

   sfh_<DEVICENAME>.exe -norflash  -UBLStartAddr <address>  -APPLoadAddr <address> <UBL binary file> <binary application file>

5) Flash the NOR with a single u-boot image (old u-boot builds)

   sfh_<DEVICENAME>.exe -norflash_noubl  <binary application file>

 

  NOTE: Currently, YOU MUST USE THE UBL BINARY CREATED BY THE UBL PROJECT IN THIS PACKAGE.  
        If you use any other UBL binary, the boot procedure will most likely fail.

Other Options for Both Utilities

  -p <COM PORT NAME>  : Allows specifying com port other than default 'COM1' or '/dev/ttyS0'.
  -h                  : Show help text.
  -v                  : See verbose output from the DM35x.

 

Obtaining the software

The latest software can be download from SourceForge by visiting the download page here.

Test Environment

The binaries included in the package were generated under Windows XP SP2 using the .NET Framework v2.0 C# compiler (csc.exe, v8.00.50727.42) and the CodeSourcery arm-none-linux-gnueabi cross compiler (gcc v4.2.3, Sourcery G++ Lite 2008q1-126). The slh and sfh binaries were tested under Windows XP using the .Net framework v2.0 and the Mono Framework for Windows v1.9.1, with a native serial port. Previous versions have been tested under Fedora 7 Linux, using a USB->serial adapter (Prolific PL2303 chipset), running both the Mono 1.2.3 and Mono 1.9.1 Frameworks.

Known Problems

We have had reports of problems when using this utility with a USB to Serial adapter on Ubuntu or Kubuntu 8.04. The data transfer hangs while the CRC is being transmitted to the EVM from the host.

The Mono serial port code for Linux platforms has a major bug that affects Mono 1.2.6 and 1.9.1. This has been fixed in newer versions of Mono (ie 2.0) and some distributions may have backported the fix to older versions of Mono. If not you can fix the Mono write_serial() function in support/serial.c yourself.

To fix Mono under Ubuntu 8.04:

 sudo -i
 mkdir mono
 cd mono
 apt-get build-dep mono-2.0-devel
 apt-get source mono-2.0-devel
 wget http://wiki.davincidsp.com/images/9/93/Mono-fix-linux-serial.patch.gz
 cd mono-1.2.6+dfsg
 zcat Mono-fix-linux-serial.patch.gz | patch -p 1
 dpkg-buildpackage -b
 dpkg -i ../libmono0_1.2.6+dfsg-6ubuntu3_i386.deb

This has been tested and works on Ubuntu 8.04 using standard serial ports and USB serial port adapters.

To fix Mono under Ubuntu 9.04:

You can do the above steps, or you can use an unofficial Mono 2.4.2.3 package for Ubuntu 9.04.

License

These tools are provided as freeware, with no guarantee. Issues can be reported to the DaVinci Linux Open Source mailing list.

For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article Serial Boot and Flash Loading Utility here. 

### 回答1: xv6是一个基于Unix的操作系统,它是由麻省理工学院开发的一个教学用途的操作系统。它的设计和实现都非常简单,因此非常适合用于操作系统的教学和学习。Unix utilities是Unix操作系统中的一些常用工具,例如ls、grep、awk、sed等,它们可以帮助用户完成各种任务,例如查看文件、搜索文本、处理数据等。这些工具也被移植到了其他操作系统中,成为了广泛使用的工具。 ### 回答2: xv6是一个教学目的的操作系统内核,它是根据Unix第六版(Version 6 Unix)设计而成的。Unix utilities是指Unix操作系统中提供的一系列实用工具程序。 xv6的设计灵感来自于Unix,因此它具有类似于Unix的文件系统、进程管理、内存管理等特性。它采用C语言编写,具有简洁的结构和易于理解的代码,这使得学生可以更好地理解操作系统的内部工作原理。xv6内核为学生提供了一个可用于学习和实验的平台,帮助他们深入了解操作系统和计算机系统的工作方式。 与此同时,Unix utilities是一些用于完成特定任务的Unix命令行工具程序。这些工具程序通常被用于处理文件、管理进程、网络通信、文本处理等方面。常见的Unix utilities包括ls(列出目录内容)、grep(查找指定模式)、cp(复制文件)、rm(删除文件)等等。这些工具程序非常强大且灵活,可以通过简单的命令行参数来满足各种不同需求。 xv6和Unix utilities有着密切的关系。学习和理解xv6可以帮助我们深入理解Unix操作系统的设计和实现原理。而掌握Unix utilities可以使我们更加高效地处理各种系统管理任务和编程工作。通过学习和使用这些工具,我们可以更好地理解和应用操作系统的概念和原则,提高我们的计算机系统操作和编程技能。总之,xv6和Unix utilities都为我们提供了学习和实践操作系统的机会,帮助我们更好地掌握计算机系统的核心知识。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值