AM335x Flash Programmer For Ubuntu Linux User's Guide

= Overview =

AM335x Flash Programmer for Linux is intended for use in the factory production environment. It is a very simple program that opens the flash archive file produced by the AM335x Flash Image Builder (or produced manually) and programs the payload images into flash memory. This program is intended to be run on Ubuntu 10.04 LTS or Ubuntu 12.04 LTS. It is a stand-alone program that does NOT require the AM335x EZSDK Linux Software Development Kit to be installed. The installer is available separately from ti.com and after installation the program resides in the "${HOME}/am335x-flash-programmer" directory of the Ubuntu Linux host PC (by default). Using this program in the factory environment requires no compiling of images. The flash archive file is merely opened and programmed into the target system board.

See AM335x Flash Image Builder User's Guide for more information about the AM335x Flash Image Builder Program.

= Prerequisites =

1. Linux host PC running Ubuntu 10.04 LTS or Ubuntu 12.04 LTS.

= Hardware Used for Flash Programmer Verification Testing =

The following table shows the hardware that was used for verification testing of the flash programmer program.

Links are given to web pages where more information about these components can be obtained.

NOTES:

1. TI AM335x EVM supports multiple profiles which allow the board to expose different sets of peripherals.

Normally the profile should be set to Profile 'b0000', but for SPI flash testing the board must be set to Profile 'b0010'.

Below are the SW8 switch settings for NAND and SPI flash. This information will be displayed by the on screen

helper text when performing the system setup for programming SPI flash. TI AM335x GP EVM: DEFAULT PROFILE 'b0000' FOR NAND FLASH SW8 BIT  -&gt; 0 1 2 3 +=========+ ON      | | | | | | | v v v v | +=========+ OFF SW#  -&gt; 1 2 3 4 LEVEL -&gt; L L L L

TI AM335x GP EVM: SETTING PROFILE 'b0010' FOR SPI FLASH SW8 BIT  -&gt; 0 1 2 3 +=========+ ON      | | ^ | | | | v | v v | +=========+ OFF SW#  -&gt; 1 2 3 4 LEVEL -&gt; L H L L 2. Currently u-boot and kernel software only support NAND flash with an 8-bit interface.

The ability to automatically detect the NAND bus width needs to be added to that software.

For Beagle Bone, a NAND devices with 8-bit bus width would need to be substituted for

the 16-bit NAND device. The full NAND part number of a Micron NAND device can be found

by entering the five-char code symbolized on the device at this web page: www.micron.com/decoder.

3. For the Beagle Bone board, Ethernet boot requires a hardware modification (to the Rev A6 board). Add a 2.2K ohm pull-up resistor

to 3.3V to U15 pin 15. U15 is the LAN8710A Ethernet PHY device. Pin 15 is the COL/CRS_DV/MODE2 pin. The pull-up resistor added

for this pin sets the power-up strapping of the Ethernet PHY device to enable auto-negotiation after power-on reset. Customers with custom AM335x board designs based on the BeagleBone should be sure to make this circuit correction.

= Procedure =

Step 1: Download and Install AM335x Flash Programmer
The AM335x Flash Programmer for Ubuntu Linux is part of the FLASHTOOL-AM335x software tool that is available at http://www.ti.com/tool/flashtool. Click the "Get Software" button next to FLASHTOOL-AM335x and it will take you to a download page containing the following installation program. The flash programmer program for Ubuntu Linux is used to program binary images into flash memory on AM335x system boards using a Ubuntu Linux host computer.  

Copy the am335x-flash-programmer-linux installer program onto a Ubuntu Linux host computer. Use the chmod command to make the installer program executable then run the installer.

Substitute the actual version numbers for xx.yy.zz.

Ubuntu# chmod +x am335x-flash-programmer-linux-01.xx.yy.zz-Linux-x86-Install

Ubuntu# ./am335x-flash-programmer-linux-01.xx.yy.zz-Linux-x86-Install

The installer program will run as described here.

Select the installation language and click OK. Click Yes. Click Next. Click Next to use the default destination folder. Click Next. Click Finish to complete the installation program.

Step 2: Copy Am335x Flash Archive File(s) to Linux Host PC
The AM335x Flash Programmer uses as its input file a flash archive file that is created by the AM335x Flash Image Builder Program. The AM335x Flash Image Builder program is intended for the software developer to create a flash archive file that contains all files that are necessary to program flash memory using the AM335x Flash Programmer program. The flash archive files created by the AM335x Flash Image Builder program will be stored on the host PC that created it in the location shown below. These can then be sent to the production facility to serve as the input file to the AM335x Flash Programmer program, and should be copied into the installed AM335x Flash Programmer file tree in the ./flash-archive-files/ sub directory as shown here.

Below is a listing of a some flash archive files that were generated for various configurations shown in the location where they should be stored.



By the file naming convention you can identify the silicon revision, board type, peripheral interface for flash programming, the flash device type and the date and time that the archive was created. For example, from the name of the first file in the list below you can determine the following:

The device type is AM335x.

This is intended to program an AM335x silicon revision 1.0 device (AM335x with no rev letter).

The hardware platform is Beagle Bone.

Flash programming is to be done using an Ethernet interface between the host PC and the AM335x System Board.

The flash memory type is NAND.

The flash archive file was created on 06-19-2013 at 13:15:36.

Alll of the above information will be read in by the flash-programmer script when the flash-archive-file is opened. The script will read a file named flash-programmer.conf that contains the

same information.

Step 3: Run the AM335x Flash Programmer Script
To start the AM335x Flash Programmer shell script enter the following commands at the Ubuntu Host PC. cd ~/am335x-flash-programmer/linux/scripts/ sudo ./am335x-flash-programmer-linux.sh First you will be prompted to enter your password because the command has been run with root priveledges.

Step 3A: Software Package Installation / Update
The following packages are needed for operation of the program. These packages will be automatically installed or updated by the flash-programmer script. If for some reason, you do not want these packages to be installed you can CTRL-C out of the script at this point - but then you will not be able to run the flash programmer program.

Below is the script output during this part of the script. In this example, the software packages were all found to be already installed. If any need to be installed or updated you will be prompted to allow them to be installed. sitara@uda0182185:~/am335x-flash-programmer/linux/scripts$ sudo ./am335x-flash-programmer-linux.sh [sudo] password for sitara: am335x-flash-programmer-linux.sh v01.00.00.00 Texas Instruments Fri Jun 21 10:44:02 CDT 2013

Ubuntu version 12.04 "Precise Pangolin" found.

+=============================================================================================+ This script will set up your development host for the TI AM335x Flash programmer. Parts of this script require administrator priviliges (sudo access). +=============================================================================================+

+=============================================================================================+ Looking for missing host support packages using the following command: sudo apt-get install xinetd tftpd minicom zenity +=============================================================================================+ Reading package lists... Done Building dependency tree Reading state information... Done xinetd is already the newest version. minicom is already the newest version. tftpd is already the newest version. zenity is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 152 not upgraded.

+=============================================================================================+ Package verification and installation successfully completed. +=============================================================================================+

Restarting tftp server... xinetd stop/waiting xinetd start/running, process 3254

+=============================================================================================+ Host setup for TI am335x-flash-programmer completed +=============================================================================================+

Step 3B: Open the Flash Archive File
You will be prompted to open a flash archive file for programming your AM335x system board. Browse to the flash archive (*.tar.gz) file for programming your AM335x system board.

A file open dialog will open with the flash-archive-files folder selected. Double-click "flash-archive-files" to browse to that folder.



Select the flash-archive-file that is to be programmed into the AM335x System Board and click OK. For this example, we will program NAND

flash memory on the TI AM335x GP EVM via USB RNDIS.



Status Messages - Files Copied to TFTP Folder and DHCP Server Configuration
You may need to scroll back in the terminal window to see these messages. The script will extract the flash-archive-file into a temp directory. It will read in the flash-programmer.conf file which contains all the configuration settings. The script output displays all the files that are copied to the TFTP folder ("/tftpboot/"). Two DHCP server related system configuration files will be replaced. See the implementation details section for more details. A "/tmp/am335x-flash-programmer/" folder will be created and the original system files will be saved there. These files will only be saved the first time. When flash programming is completed, there is a script to run that will restore the original system settings. A udev rule is created that causes a script to automatically run when the AM335x USB RNDIS device attaches to the USB bus. The udev server is restarted to make the new udev rule take effect. If programming flash memory via Ethernet the "/etc/network/interfaces" file will also be saved and replaced (not shown here).

$RESTORE_FLASH_PATH set to /home/sitara/am335x-flash-programmer/temp/am335x-evm/restore-flash/usb_ether

$IMAGES_TO_FLASH_PATH set to /home/sitara/am335x-flash-programmer/temp/am335x-evm/images-to-flash/nand

Copying restore flash images to the TFTP folder.

Copying "MLO" for NAND flash to TFTP folder.

Copying "u-boot.img" for NAND flash to TFTP folder.

Copying "uImage" for NAND flash to TFTP folder.

Copying "ubi.img" for NAND flash to TFTP folder.

Copying debrick.scr to TFTP folder.

Saving DHCP server port name file to /tmp/am335x-flash-programmer/isc-dhcp-server. MSG-DHCP-006:Copying new DHCP server port name file to /etc/default/isc-dhcp-server.

Saving DHCP server configuration file to /tmp/am335x-flash-programmer/dhcpd.conf. MSG-DHCP-006:Copying new DHCP server configuration file to /etc/dhcp/dhcpd.conf.

MSG-NETWORK-001: Creating udev rule for AM335x USB RNDIS device at /etc/udev/rules.d/71-usb-boot.rules.

MSG-NETWORK-002: Restarting udev... udev stop/waiting udev start/running, process 4490

Step 3C: Making the Physical Connections
You may need to scroll back in the terminal window to see these messages. Depending on the board type and the peripheral interface being used specific instructions will be displayed to make the required physical connections to the AM335x system board. Below is the text that appears for the TI AM335x GP EVM for USB RNDIS flashing. Follow the instructions that appear for your specific configuration. Be sure to remove any installed SD Card. At this point the AM335x target board should remain powered off. +===============================================================================================+ PHYSICAL SETUP: +===============================================================================================+ 1. Connect a USB to Serial adapter from a Host PC USB port to a NULL MODEM serial cable (female / female).

2. Connect the other end of the NULL MODEM serial cable to the UART0 DB9 serial connector of the target system board.

3. Connect a +5V DC (3.8A) DC power supply (center conductor +5V) to the target system board +5V DC supply input.

4. Connect a USB cable from a Host PC USB port to the USB0 connector of the target system board. For the TI AM335x GP EVM, a USB Type A to Micro USB adapter cable is needed.

5. PLEASE REMOVE ANY INSTALLED BOOTABLE SD CARD. +=============================================================================================== The following sections illustrate how to make the connections for the different flash programming configurations.

TI AM335x GP EVM
1. Connect a USB to Serial adapter from a Host PC USB port to a NULL MODEM

serial cable (female / female).

2. Connect the other end of the NULL MODEM serial cable to the UART0 DB9  serial connector of the target system board.

3. Connect a +5V DC (3.8A) DC power supply (center conductor +5V) to the  target system board +5V DC supply input.

For flashing the TI AM335x GP EVM via USB: 4. Connect a USB cable from a Host PC USB port to the USB0 connector  of the target system board. For the TI AM335x GP EVM,  a USB Type A to Micro USB adapter is needed.

Connections for TI AM335x GP EVM for USB Flashing  For flashing the TI AM335x GP EVM via Ethernet:

4. Connect a CAT5 Ethernet cable from the Host PC Ethernet port to a LAN port of a 10/100 Ethernet switch.

5. Connect a CAT5 Ethernet cable from another LAN port of the 10/100 Ethernet switch to the EMAC1 Ethernet port of the target system board.

6. Connect the power supply for the Ethernet switch.

Connections for TI AM335x GP EVM for Ethernet Flashing

NOTES: 1. WHEN PROGRAMMING FLASH VIA ETHERNET, THE TARGET SYSTEM AND HOST PC MUST BE ISOLATED

'''  FROM YOUR CORPORATE NETWORK. DO NOT CONNECT THE ETHERNET CABLE FROM THE CORPORATE'''

  NETWORK TO THE ETHERNET SWITCH, OR THE LINUX HOST PC WILL ASSIGN IP ADDRESSES TO THE EXTERNAL

  NETWORK!!!

Beagle Bone
1. Connect a USB Type A to Mini USB adapter cable from a Host PC USB port to  the USB Client connector of the Beagle Bone. The Beagle Bone has an on-board  USB hub which allows the USB Client connection to be used for the serial console,   XDS100 JTAG port and for communication with the AM335x processor via the USB0 interface.

NOTE: In the following two photos only the BeagleBone baseboard is shown. For actual

testing a Memory Expansion Cape and NAND or NOR flash module is also required as

described here.

Connections for Beagle Bone for UART Boot + USB RNDIS File Transfer

For flashing the Beagle Bone via Ethernet add these connections:

2. Connect a CAT5 Ethernet cable from the Host PC Ethernet port to a LAN port of a 10/100 Ethernet switch.

3. Connect a CAT5 Ethernet cable from another LAN port of the 10/100 Ethernet switch to the EMAC1 Ethernet port of the target system board.

4. Connect the power supply for the Ethernet switch

Conections for Beagle Bone for Ethernet Flashing

NOTES

1. For BeagleBone, Ethernet flash programming requires a hardware modification as described in note #3 here.

2. WHEN PROGRAMMING FLASH VIA ETHERNET, THE TARGET SYSTEM AND HOST PC MUST BE ISOLATED

'''   FROM YOUR CORPORATE NETWORK. DO NOT CONNECT THE ETHERNET CABLE FROM THE CORPORATE'''

   NETWORK TO THE ETHERNET SWITCH, OR THE LINUX HOST PC WILL ASSIGN IP ADDRESSES TO THE EXTERNAL

'''   NETWORK!!! '''

Step 3D: Setting the SYSBOOT configuration
Depending on the board type and the peripheral interface being used specific instructions will be displayed for setting the SYSBOOT signals to boot from the required peripheral interface. Below is the helper text that appears for the TI AM335x GP EVM for USB RNDIS flashing. Follow the instructions that appear for your specific configuration. Do not power on the AM335x system board yet. Press &lt;Enter&gt; to continue. +===============================================================================================+ BOOT MODE SETUP: +===============================================================================================+ 1. Check that the SYSBOOT signals are set for USB RNDIS boot mode. For reference, here is how the AM335x GP EVM system board is configured for USB RNDIS boot mode: Boot mode switch settings, if any are implemented, will be different for a custom AM335x system board. +===============================================================================================+ USB0 BOOT MODE (SYS_BOOT = 0x400B = b0100 0000 0000 1011)  BOOT SEQ: USB0, NAND, SPI0, MMC0 +===============================================================================================+

SW3                            SW4 SYS_BOOT BIT -&gt;      8  9 10 11 12 13 14 15          0  1  2  3  4  5  6  7 ++     ++                    | ^  ^  ^  ^  ^  ^  |  ^ |      | |  |  ^  |  ^  ^  ^  ^ |                    | |  |  |  |  |  |  v  | |      | v  v  |  v  |  |  |  | | ++     ++ DIP SWITCH# -&gt;      | 1  2  3  4  5  6  7  8 |      | 1  2  3  4  5  6  7  8 | ++     ++ LOGIC LEVEL -&gt;        L  L  L  L  L  L  H  L          H  H  L  H  L  L  L  L +===============================================================================================+

Press &lt;Enter&gt; to continue...

For USB RNDIS or Ethernet Flash Programming
If flash programming is to take place via USB RNDIS the following message will appear and the script will exit. +===============================================================================================+ This Ubuntu Linux host computer has now been configured to automatically program the flash memory of your AM335x system board automatically when power is applied. For each system board to be programmed: 1. Connect the AM335x system board for USB flash programming as described above. 2. Make sure that the SYSBOOT is set for USB RNDIS boot mode. 3. Power on the AM335x system board to begin flash programming.

When all system boards have been programmed, run this script to restore original system settings: sudo /home/sitara/am335x-flash-programmer/linux/scripts/restore-system-settings.sh

For help booting the system board from the programmed flash memory run this script: sudo /home/sitara/am335x-flash-programmer/linux/scripts/boot-from-flash-helper.sh +===============================================================================================+

Detecting host console port name...

Found host console port: "ttyUSB0" Fri Jun 21 17:02:58 CDT 2013

sitara@udaxxxxxxx:~/am335x-flash-programmer/linux/scripts$

If flash programming is to take place via Ethernet the following message will appear and the script will exit. +===============================================================================================+ This Ubuntu Linux host computer has now been configured to automatically program the flash memory of your AM335x system board automatically when power is applied. For each system board to be programmed: 1. Connect the AM335x system board for Ethernet flash programming as described above. 2. Make sure that the SYSBOOT is set for Ethernet boot mode. 3. Power on the AM335x system board to begin flash programming.

When all system boards have been programmed, run this script to restore original system settings: sudo /home/sitara/am335x-flash-programmer/linux/scripts/restore-system-settings.sh

For help booting the system board from the programmed flash memory run this script: sudo /home/sitara/am335x-flash-programmer/linux/scripts/boot-from-flash-helper.sh +===============================================================================================+

Detecting host console port name...

Found host console port: "ttyUSB0" Fri Jun 21 17:02:58 CDT 2013

sitara@udaxxxxxxx:~/am335x-flash-programmer/linux/scripts$

A minicom window will open ready to capture the target board console output.

You may now power on the AM335x system board to begin flash programming. Below is a typical target console output for a

flash programming operation. This example programs the NAND flash on the TI AM335x GP EVM via USB RNDIS.

Welcome to minicom 2.5

OPTIONS: I18n Compiled on May 2 2011, 00:39:27. Port /dev/ttyUSB0

Press CTRL-A Z for help on special keys

U-Boot SPL 2013.01.01 (Jun 25 2013 - 14:52:02) musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn) musb-hdrc: MHDRC RTL version 2.0 musb-hdrc: setup fifo_mode 4 musb-hdrc: 28/31 max ep, 16384/16384 memory USB Peripheral mode controller at 47401000 using PIO, IRQ 0 Using default environment

usb_ether using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in MAC bc:6a:29:64:59:e0 HOST MAC de:ad:be:af:00:00 RNDIS ready musb-hdrc: peripheral reset irq lost! high speed config #2: 2 mA, Ethernet Gadget, using RNDIS USB RNDIS network up! BOOTP broadcast 1 BOOTP broadcast 2 Using usb_ether device TFTP from server 192.168.3.1; our IP address is 192.168.3.101 Filename 'u-boot-restore.img'. *************** ITEM #1 ************** Load address: 0x807fffc0 Loading: ################################################################# ######                                                                         663.1 KiB/s done Bytes transferred = 362688 (588c0 hex) U-Boot 2013.01.01 (Jun 25 2013 - 14:52:02) I2C:  ready DRAM: 1 GiB WARNING: Caches not enabled NAND: 256 MiB MMC:  OMAP SD/MMC: 0, OMAP SD/MMC: 1 Using default environment musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn) musb-hdrc: MHDRC RTL version 2.0 musb-hdrc: setup fifo_mode 4 musb-hdrc: 28/31 max ep, 16384/16384 memory USB Peripheral mode controller at 47401000 using PIO, IRQ 0 musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn) musb-hdrc: MHDRC RTL version 2.0 musb-hdrc: setup fifo_mode 4 musb-hdrc: 28/31 max ep, 16384/16384 memory USB Host mode controller at 47401800 using PIO, IRQ 0 Net:  &lt;ethaddr&gt; not set. Validating first E-fuse MAC cpsw, usb_ether Hit any key to stop autoboot: 0 using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in MAC bc:6a:29:64:59:e0 HOST MAC de:ad:be:af:00:00 RNDIS ready musb-hdrc: peripheral reset irq lost! high speed config #2: 2 mA, Ethernet Gadget, using RNDIS USB RNDIS network up! BOOTP broadcast 1 BOOTP broadcast 2 DHCP client bound to address 192.168.3.101 using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in MAC bc:6a:29:64:59:e0 HOST MAC de:ad:be:af:00:00 RNDIS ready high speed config #2: 2 mA, Ethernet Gadget, using RNDIS USB RNDIS network up! Using usb_ether device TFTP from server 192.168.3.1; our IP address is 192.168.3.101 Filename 'debrick.scr'. *************** ITEM #2 ************** Load address: 0x80000000 Loading: # 124 KiB/s done Bytes transferred = 508 (1fc hex) NAND erase.chip: device 0 whole chip Erasing at 0xffe0000 -- 100% complete. *************** ITEM #3 ************** OK using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in MAC bc:6a:29:64:59:e0 HOST MAC de:ad:be:af:00:00 RNDIS ready high speed config #2: 2 mA, Ethernet Gadget, using RNDIS USB RNDIS network up! Using usb_ether device TFTP from server 192.168.3.1; our IP address is 192.168.3.101 Filename 'MLO'. Load address: 0x81000000 Loading: #################### 624 KiB/s done Bytes transferred = 100373 (18815 hex) NAND write: device 0 offset 0x0, size 0x80000 524288 bytes written: OK                                                      *************** ITEM #4 ************** using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in MAC bc:6a:29:64:59:e0 HOST MAC de:ad:be:af:00:00 RNDIS ready high speed config #2: 2 mA, Ethernet Gadget, using RNDIS USB RNDIS network up! Using usb_ether device TFTP from server 192.168.3.1; our IP address is 192.168.3.101 Filename 'u-boot.img'. Load address: 0x81000000 Loading: ################################################################# #######                                                                        656.3 KiB/s done Bytes transferred = 364240 (58ed0 hex) NAND write: device 0 offset 0x80000, size 0x58ed0 364240 bytes written: OK                                                      *************** ITEM #5 ************** using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in MAC bc:6a:29:64:59:e0 HOST MAC de:ad:be:af:00:00 RNDIS ready high speed config #2: 2 mA, Ethernet Gadget, using RNDIS USB RNDIS network up! Using usb_ether device TFTP from server 192.168.3.1; our IP address is 192.168.3.101 Filename 'uImage'. Load address: 0x81000000 Loading: ################################################################# #################################################################              #################################################################               #################################################################               #################################################################               #################################################################               #################################################################               #################################################################               #################################################################               #######################################                                         664.1 KiB/s done Bytes transferred = 3194392 (30be18 hex) NAND write: device 0 offset 0x280000, size 0x30be18 3194392 bytes written: OK                                                     *************** ITEM #6 ************** using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in MAC bc:6a:29:64:59:e0 HOST MAC de:ad:be:af:00:00 RNDIS ready high speed config #2: 2 mA, Ethernet Gadget, using RNDIS USB RNDIS network up! Using usb_ether device TFTP from server 192.168.3.1; our IP address is 192.168.3.101 Filename 'ubi.img'. Load address: 0x81000000 Loading: ################################################################# #################################################################              #################################################################      . .        [Additional output lines omitted.] .        #################################################################               #################################################################               #################################################################               #################################################################               #############                                                                   666 KiB/s done Bytes transferred = 25690112 (1880000 hex) NAND write: device 0 offset 0x780000, size 0x1880000 25690112 bytes written: OK                                                    *************** ITEM #7 ************** U-Boot#
 * 1) Executing script at 80000000

In the target console output above I have added text marking off important items that indicate that the flash programming operation was successful (ITEM #1 - ITEM #7).

When all flash programming has been completeed the target console will stop at the u-boot prompt.

Programming Subsequent AM335x System Boards
The "am335x-flash-programmer-linux.sh" script only needs to be run once to setup the Linux host PC for flash programming.

To program the next AM35x system board no script needs to be run. Just repeat these three steps:

Step 3C: Making the Physical Connections

Step 3D: Setting the SYSBOOT configuration Step 3E: Power On AM335x System Board to Start Flash Programming Process

UART+USB Flash Programming
For UART+USB flash programming the helper text for setting the UART boot mode will appear, for your board type. This example if for the TI AM335x GP EVM. +===============================================================================================+ BOOT MODE SETUP: +===============================================================================================+ 1. Check that the SYSBOOT signals are set for UART0 boot mode. For reference, here is how the AM335x GP EVM system board is configured for UART boot mode: Boot mode switch settings, if any are implemented, will be different for a custom AM335x system board. +===============================================================================================+ UART0 BOOT MODE (SYS_BOOT = 0x4001 = b0100 0000 0000 0001)  BOOT SEQ: UART0, XIP, MMC0, SPI0 +===============================================================================================+

SW3                            SW4 SYS_BOOT BIT -&gt;      8  9 10 11 12 13 14 15          0  1  2  3  4  5  6  7 ++     ++                    | ^  ^  ^  ^  ^  ^  |  ^ |      | |  ^  ^  ^  ^  ^  ^  ^ |                    | |  |  |  |  |  |  v  | |      | v  |  |  |  |  |  |  | | ++     ++ DIP SWITCH# -&gt;      | 1  2  3  4  5  6  7  8 |      | 1  2  3  4  5  6  7  8 | ++     ++ LOGIC LEVEL -&gt;        L  L  L  L  L  L  H  L          H  L  L  L  L  L  L  L +===============================================================================================+

Press &lt;Enter&gt; to continue...

+===============================================================================================+

+===============================================================================================+ Please power on the AM335x system board NOW. Press &lt;Enter&gt; to continue... After configuring SYSBOOT per the on screen help text for UART boot, power on the AM335x system board and then press &lt;Enter&gt; to continue. A minicom window will open running a script to boot the target board from UART0 using an XMODEM transfer as shown.



The minicom window with the XMODEM transfer will close and another minicom window will open and the flash programming operation will proceed using the USB RNDIS interface for the subsequent file transfers from the host. The target console log from this point will be the same as for the USB RNDIS flashing example shown previously.



The original terminal window will ask you to wait for the flash programminmg process to complete. When the target console stops at the U-Boot# prompt press &lt;Enter&gt; in the terminal window. +=============================================================================================+ Wait for flash programming to complete... When the target console window stops at the "U-Boot#" prompt, press &lt;Enter&gt; to continue.

The script will not end. Instead it will prompt you to program another board or not.

Program another AM335x system board? (y/n)

[ y ]

If you enter 'y' for yes it will again show you the helper text for the SYSBOOT settings for UART boot mode. At this time the next board can be connected, SYSBOOT set for UART boot and the process repeats.

If you enter 'n' for no the script will restore the original system settings and then exit.

Restoring original system settings...

Restoring DHCP server port name file from /tmp/am335x-flash-programmer/isc-dhcp-server. Restoring DHCP server configuration file from /tmp/am335x-flash-programmer/dhcpd.conf. Saved state of DHCP server was STOPPED. MSG-SYSTEM_SETTINGS-002: Removing udev rule for AM335x USB RNDIS device at /etc/udev/rules.d/71-usb-boot.rules.

MSG-SYSTEM_SETTINGS-003: Restarting udev... udev stop/waiting udev start/running, process 15597

Removing saved system settings from /tmp/am335x-flash-programmer.

All system settings have been restored. Tue Jun 25 17:14:53 CDT 2013

sitara@udaxxxxxxx:~/am335x-flash-programmer/linux/scripts$

= Booting System Board from Flash Memory =

If after programming boards you wish to verify that the board can boot from the newly programmed flash memory the following script has been provided. This script will prompt you for the following:

1) Open the flash-archive-file that was used to program the board to be checked.

2) Power down the board.

3) Set SYSBOOT to boot from the flash memory that was programmed.

4) Press &lt;Enter&gt; to continue. The script will exit and a minicom window will open, ready to display the target console output.

5) Power on the board and verify in the console window that the system boots from flash memory.

To run the script: cd ~/am335x-flash-programmer/linux/scripts/ sudo ./boot-from-flash-helper.sh

= Restoring Original Host PC System Settings =

For USB RNDIS and Ethernet flash programming, after all AM335x system boards have been programmed a script has been provided to restore the original system settings. After running this script the Linux host will no longer be configured to program flash memory when a system board is powered on.

To run the script:

cd ~/am335x-flash-programmer/linux/scripts sudo ./restore-system-settings.sh

Example output from this script is shown here:

restore-system-settings.sh v01.00.00.00 Texas Instruments Tue Jun 25 17:41:52 CDT 2013

Ubuntu version 12.04 "Precise Pangolin" found.

Restoring original system settings...

Restoring DHCP server port name file from /tmp/am335x-flash-programmer/isc-dhcp-server. Restoring DHCP server configuration file from /tmp/am335x-flash-programmer/dhcpd.conf. Saved state of DHCP server was STOPPED. MSG-SYSTEM_SETTINGS-002: Removing udev rule for AM335x USB RNDIS device at /etc/udev/rules.d/71-usb-boot.rules.

MSG-SYSTEM_SETTINGS-003: Restarting udev... udev stop/waiting udev start/running, process 16608

Removing saved system settings from /tmp/am335x-flash-programmer.

All system settings have been restored. sitara@uda0182185:~/am335x-flash-programmer/linux/scripts$

For UART+USB flash programming, the restore-system-settings script is called when you indicate that there are no more boards to program.