VxWorks BSP Reference : wrPpmc8260

wrPpmc8260

NAME

wrPpmc8260 - Wind River PPMC8260

INTRODUCTION

This manual entry provides board-specific information necessary to run VxWorks for the wrPpmc8260 BSP. Please read the section "Getting the board running vxWorks" in order to configure the board to run vxWorks.

Getting the board running vxWorks This section will guide you step by step how to get vxWorks running on this board.

1. Setting the board Jumpers & Switches:

   In order to get the board running with the default configuration. the 
   following jumper's and switch's need to be set as follows:

   .CS

   PPMC8260 module:
   ---------------
   J7      Close   SW2-1    Close    SW3-1    Close (** Open for only PPMC)
   JP1     Close   SW2-2    Close    SW3-2    Close
   JP29    Close   SW2-3    Close    SW3-3    Close
                   SW2-4    Close    SW3-4    Close
                   SW2-5    Close    SW3-5    Close
                   SW2-6    Open     SW3-6    Open
                   SW2-7    Open     SW3-7    Open
                   SW2-8    Open     SW3-8    Open

   .CE

** Note: When using only the PPMC board in stand alone mode (not connected to
         a carrier board), this switch need to be in "Open" position.

   .CE

   On the carrier module:
   ----------------------
   JP3     Open
   JP4     Open

   .CS

2. Creating a bootrom_uncmp.hex:
   2.1 Launch Tornado II, go to the "Build" menu and choose the option 
       "Build Boot ROM...".
   2.2 the "Build Boot ROM" window will popup, in the "Select a BSP:" column
       choose the "wrPpmc8260", and in the "Select an Image to build:" column
       choose "bootrom_uncmp.hex" and press the "OK" button.
   2.3 After the build process will finish successfully (You will see "Done" in
       the "Build window" without error), you will have the bootrom_uncmp.hex in
       your BSP directory "$(WIND_BASE)/target/config/wrPpmc8260".

3. Programming bootrom_uncmp to PPMC8260 FLASH:
   If you are using visionCLICK please follow the instruction in section 3.1 
   if you are using SingleStep please follow the instruction in section 3.2

   3.1 Using visionCLICK:

       3.1.1 Install the visionPROBE II  or visionICE II and power it on. 
             Connect the JTAG interface cable from the visionPROBE II  or 
             visionICE II into the PPMC8260 board JTAG (JP6 The JTAG Port) 
             connector.

             Once all the connections have been made, power up the PPMC8260 
             board and start the visionCLICK executable on the host.

       3.1.2 Configure the visionCLICK project: 
             The "Welcome To visionCLICK" window will appear .In this window 
             press on the "Configure" button, This will invoke "PROJECTS/LOAD" 
             window. In this window press on the + left to the 
             "PowerPC_C_Demo.prj".This will show you the project configuration. 
             Point with the mouse cursor on the "Microprocessors" option and 
             press the right button and choose the type of CPU you have on your 
             board. For example: "PowerPC->MPC82xx->MPC8260" . Verify that the 
             "Target Control" option point to visionPROBE for visionPROBE II or 
             visionICE for visionICE II, Also switch to the "Communications" 
             TAB and verify that the "Normal Port/Rate" & "Download Port/Rate" 
             suite your connection. for example: "LPT1"  for visionPROBE II. 
             Now press the "Save" button at the bottom of the window and after 
             it on the "Activate" button.

       3.1.3 Program visionPROBE II / visionICE II with the proper register 
             setting for the PPMC8260 board:

             Go to the "Tools" menu and select the 
             "Log Output/Playback Scripts" option. The "Record / Playback" 
             dialog box will popup. In this dialog box go to the 
             "Playback Commands From File" group and press on the "Browse" 
             button. Navigate your self to the location of the following  
             register file: "ppmc8260.reg", the file located in the 
             visionCLICK installation. After choosing the register file press 
             on the "Open" button to confirm the selected reg file. You will 
             return back to the "Record / Playback" dialog box. Now press on 
             the "Start" button located in the same group. In the "Terminal" 
             window you can see that the visionCLICK is running the script. 
             When visionCLICK will finish the playback you will get back the 
             ">BKM>" or the ">ERR>".

       3.1.4 Get into Background Mode: 
             Execute the "IN" command to reset the board and initialize it with 
             the register setting.

             .CS
             IN
             .CS

             This command is the reset command to initialize the board.

       3.1.5 Setting the Flash Chip Select:

             3.1.5.1 Once the ">BKM>" prompt appears we need to verify that the 
                     Flash chip select configure correct. To do this type "CS" 
                     in the "Terminal" window and press enter. The first line 
                     is for the Flash chip select. This is chip select 0 "CS0" 
                     under the "PS" (From Port Size) column for the first line, 
                     check that the number is 32. If the number is else follow 
                     the step below in order to change it:

             3.1.5.2 Type "CS CS0" in the "Terminal" window and press Enter. 

                     .CS            
                     >BKM>CS CS0
                     .CE

             3.1.5.3 Press enter until you get the following line:

                     .CS
                     (0-3) = 64, 8, 16, 32 bits  |  Port Size  =  32 Bits    >
                     .CE

                     Enter 3 for 32 On Board Flash and keep pressing Enter 
                     until you get again the ">BKM>" prompt.    

             3.1.5.4 Once the prompt appears, reset the board and the emulator 
                     with the following command:

                     .CS            
                     >BKM>IN
                     .CE

                     After you got the ">BKM>" prompt again continue with the 
                     instruction in the next section.

       3.1.6 Converting the bootrom_uncmp.hex to bootrom_uncmp.bin:

              3.1.6.1 In visionCLICK, choose "Convert Object Modules" from the 
                      "Tools" menu. The "CONVERT BINARY AND SYMBOL OBJs" dialog 
                      box will pop up.Select "All Files" in the "Files of Type" 
                      box. Go to the "Select Input Object Module To Convert" 
                      group and navigate to the file "bootrom_uncmp.hex" 
                      located in: 
                      "$(WIND_BASE)/target/config/wrPpmc8260/bootrom_uncmp.hex"

              3.1.6.2 In the group "Binary Downloadable Objects Modules" check 
                      the "Create Flat BIN File For Flash Programming". 
                      "In Range Of 0x" editbox, enter 0 for the start address, 
                      and in the "To 0x" editbox, enter "FFFFFFFF".

              3.1.6.3 Make sure that all the other check box are unchecked. 
                      Press the "Convert" button. Close the terminal window 
                      when the conversion completes.

       3.1.7 Programming the PPMC8260 Flash:
             In visionCLICK, select "Program Flash Devices" from the Tools 
             pull-down menu. This will invoke the "TF FLASH PROGRAMMING" 
             window. If you are not using visionCLICK, you can also invoke 
             this window using the "visionICE Utilities Panel" and follow the 
             steps below:

             3.1.7.1 Click the "Select" in the "Flash Card or PC Host File 
                     Name and Path" group. The "CHOOSE A FILE FROM HOST PC" 
                     dialog box will popup. In the edit box enter the full path 
                     to the location of the "bootrom_uncmp.bin", or use the 
                     "<--Browse" button to browse to the file location. Go to 
                     the "+/- Bias" group and enter the number "FFF00100" in 
                     the edit box. Now click the "OK" button, this will bring 
                     you back to the "TF FLASH PROGRAMMING" dialog box. 

             3.1.7.2 In the "Programming Algorithm" group in, the edit box 
                     press on the "Select" button, and select one of the 
                     following Flash devices:

                     For the 16MB Flash: "INTEL 28F640Jx (4096 x 16) 2 Devices"

             3.1.7.3 Set the proper address of the Flash to "FFF00000", check 
                     the "Erase All" radio button,and set the 
                     "Available RAM Workspace" setting to "00000000", set the 
                     "Bytes Of Target RAM Required" to "60000".

             3.1.7.4 Press the "Erase and Program" button.

             3.1.7.5 Now the Flash memory is programmed with the new boot 
                     program. 

   3.2 Using SingleStep for vision:


       3.2.1 Install the visionPROBE II  or visionICE II and power it on. 
             Connect the JTAG interface cable from the visionPROBE II  or 
             visionICE II into the PPMC8260 board JTAG (JP6 The JTAG Port) 
             connector.

             Once all the connections have been made, power up the PPMC8260 
             board and start the SingleStep for vision executable on the host.

       3.2.2 Configure the SingleStep project: 

             3.2.2.1 Go to the "File" menu and choose the 
                     "Start Debug Session..." .

             3.2.2.2 The "Debug" dialog box will popup, In the "Connection" tab
                     choose the visionPROBE option & the correct LPT port if 
                     you are using visionPROBE, or visionICE & enter the 
                     emulator IP address if you are using visionICE.

             3.2.2.3 In the "Processor" tab choose the "MPC8260".

             3.2.2.4 In the "Register" tab choose the option 
                     "Use vision-style register window with REG file" and then
                     browse to the location of the file "ppmc8260.reg" and 
                     choose it. The "ppmc8260.reg" file should be in the 
                     SingleStep directory.

             3.2.2.5 In the "File" tab choose the "Debug without a file" 
                     option.

       3.2.3 Get into Background Mode: 

             3.2.3.1 Now in the "File" tab press OK.

             3.2.3.2 Now should get the "Debug Status" dialogbox and in the 
                     "Debug Session" field you should have in green 
                     "Started Successfully", press the "Close" button.

             3.2.3.3 Now go to the "Command" button in the toolbar and press on 
                     it. The "Command" Window will popup, the prompt in the 
                     window will be "SingleStep". Bring the mouse cursor above 
                     the "Command" window and press the right button. A menu 
                     will popup, choose the "VisionShell(vsh)" option. Now the 
                     prompt in the window will be ">BKM>". If the prompt is
                     ">ERR>" execute the "IN" command to reset the board and 
                     initialize it with the register setting.

                     .CS
                     IN
                     .CS
                     This command is the reset command to initialize the board. 
                     After you got the ">BKM>" prompt again continue with the 
                     instruction in the next section. 

       3.2.4 Setting the Flash Chip Select:

             3.2.4.1 Once the ">BKM>" prompt appears we need to verify that the 
                     Flash chip select configure correct. To do this type "CS" 
                     in the "Terminal" window and press enter. The first line 
                     is for the Flash chip select. This is chip select 0 "CS0" 
                     under the "PS" (From Port Size) column for the first line, 
                     check that the number is 32. If the number is else follow 
                     the step below in order to change it:

             3.2.4.2 Type "CS CS0" in the "Command" window and press Enter. 

                     .CS            
                     >BKM>CS CS0
                     .CE

             3.2.4.3 Press enter until you get the following line:

                     .CS
                     (0-3) = 64, 8, 16, 32 bits  |  Port Size  =  32 Bits    >
                     .CE

                     Enter 3 for 32 On Board Flash and keep pressing Enter 
                     until you get again the ">BKM>" prompt.    

             3.2.4.4 Once the prompt appears, reset the board and the emulator 
                     with the following command:

                     .CS            
                     >BKM>IN
                     .CE

                     After you got the ">BKM>" prompt again continue with the 
                     instruction in the next section.

       3.2.5 Converting the bootrom_uncmp.hex to bootrom_uncmp.bin:

             3.2.5.1 Go to the menu and choose "Tools" and 
                    "Vision Flash Utility..." . 

             3.2.5.2 The "Flash Programming Window" will popup. Go to the 
                     "Files" tab, press the "Convert" button.

             3.2.5.3 The "File Convertion" window will popup. In the 
                     "Enter new start address" edit box type "0x0" and in the
                     "Enter new end address" edit box type "0xFFFFFFFF".

             3.2.5.4 Now press the "Convert" button. After the convert operation
                     finished, you will see it in the "Convert Result" section
                     press the "Close" button.

       3.2.6 Programming the PPMC8260 Flash:

             3.2.6.2 In the "Flash Programming Window" window. Go to the 
                     "Configuration" tab, & choose the following Flash device:

                     For the 16MB Flash: "INTEL 28F640Jx (4096 x 16) 2 Devices"

                     In "Flash Bank" group for the "Start:" enter "FFF00000". 
                     In the "RAM Workspace" group for the "Workspace Start at:" 
                     enter "00000000" and for the "Workspace Size:" enter 
                     "60000".

             3.2.6.3 Now switch to the "Files" tab and press the "Add" button. 
                     The open dialogbox will popup, browse to 
                     "$(WIND_BASE)\target\config\wrPpmc8260                     "bootrom_uncmp.bin" file. Now after getting back to the 
                     "Files" tab you will see the full path to the selected 
                     file in the "Binary Files" group. Move the mouse curser 
                     above the line that showing the full path in the  
                     "Binary Files" group and press the right button to mark 
                     this line. Now press the "Toggle Enable" button to select 
                     this binary file. Make sure that the line is still marked, 
                     and press the "Edit" button on the right. The "File Edit" 
                     dialog box will popup. In the "Enter new start address" 
                     edit box enter "0xFFF00100" and press the "OK" button.

             3.2.6.4 Now go to the "Program" tab and press the "Erase/Program" 
                     button.

             3.2.6.5 Now the Flash memory is programmed with the new boot program.

4. Running the VxWorks Boot ROM program:

   4.1 Disconect visionPROBE II or the visonICE II if it still connected to the 
       board, because it still connected to the board in some case it can stop 
       the processor at the first instruction.

   4.2 Connecting the Ethernet channel and the serial channel:

       4.2.1 First, connect the supplied serial cable with the board. On 
             one said connect the RJ11 connector to the RS232 port on the front 
             of the 8260 PMC module, and on the other said use the 
             RJ11 to 9/25 Pin addapter to connect it to your host. The UART 
             devices is set as follow: 8 data bits, 1 stop bit, hardware 
             handshaking, and parity disabled. The serial console (9600 bps).

       4.2.2 Second, connect a standard Ethernet cable to the the RJ45 (JP28)
             connector on the PMC8260 module.

   4.3 Launch a terminal program on the host said, and configures it according 
       to the following details: 8 data bits, 1 stop bit, hardware handshaking, 
       and parity disabled. The serial console (9600 bps).

   4.4 Now to execute this new boot program turn the board off,and on. and you 
       should get the vxWorks boot count down on the terminal window. Press any
       key to stop the count down. Now follow the instruction in the 
       instructions in the "Getting Started" chapter of the 
       "VxWorks Programmer
s Guide." for more detail how to configure vxWorks.

Default configuration

bootrom_uncmp.hex is provided with this BSP. The bootrom_uncmp is configured to a ROM base address of 0x0 and includes, also it's configured to use the 16 MByte On Board FLASH and FCC2 10/100BaseT Ethernet as default boot device and SMC1 as console device. The hard reset configuration word must be programmed separately at the flash base address of 0xFE000000 and at offsets 0x0, 0x8, 0x10 and 0x18, see chapter 5 Reset in the MPC8260 PowerQUICC II User's Manual.

Using visionWARE to run VxWorks

The following section will explain how to launch VxWorks using visionWARE as a boot loader. Please follow the steps below:

Note: Before using vsionWARE you need to verify that visionWARE is programmed
      to you FLASH. If visionWARE is not exist on your FLASH, please see 
      "Programming bootrom_uncmp/bootrom to PPMC8260 FLASH using 
       visionCLICK/SingleStep" section how to program the PPMC8260 Flash, and 
      instead of programming the bootrom_uncmp.bin program the vWARE.bin 
      file.

    1. Connect your PPMC8260 serial channel (JP13) to a host running terminal 
       program at 9600 baud rate (For example  HyperTerminal) using the 
       supplied serial cable.

    2. Connect your PPMC8260 100Base-T (JP28) port using the Fast Ethernet 
       Transceiver to a network hub.

    3. Open TFTP server and point to the location of the vxWorks.bdx file. If 
       you want to use the TFTP server that is supplied with visionWARE, go to 
       the visionWARE directory on your host, inside the visionWARE root 
       directory you will find tftp directory that contain application called 
       tftpd32.exe . Run this application and the TFTPD32 window will popup. 
       In the TFTPD32 window press on the Settings button. This will invoke 
       the Tftpd32: Settings. Go to the Base Directory group and inside the 
       edit box type the full path to your vxWorks image, or use the Browse 
       button to navigate to there.

    4. Power up your PPMC8260 and press any key within 3 seconds from the serial 
       terminal to abort the boot script. This will display a >BKM> prompt.

    5. Type the shell command and press enter. Now you should get the 
       following line: "Command Channel = 0: serial >" Press enter.

    6. Next line will be: Boot Delay (seconds) = 1 >.Here you need to specify 
       the desired delay value and press enter.

    7. Next line will be:  Boot Script = > . Here you need to give the boot 
       script command. Please type the following: 
       "load \host\vxWorks.bdx!launch 100000" . Where host is the host name, 
       and press enter.

       Note(s):

       ** It is very important to keep the same space between the load 
          command and the host name \host.

       ** It is very important to keep the same space between the launch 
          command and the 100000.

       ** The host name should be the same as specified in the 
          "Remote System 1 Name" line.

    8. Next line will be "Prompt String = BKM >" . Press enter.

    9. Next line will be "MAC Address = 00-00-00-00-00-00 >" . If you want to 
       change the target MAC address, type it now and press enter, else press 
       just enter.

   10. Next line will be "IP Address = 0.0.0.0 >" .Type your target IP address. 
       For example: 24.42.124.92 and press enter.

   11. Next line will be "Subnet Mask = 0.0.0.0 >" . If you want to use subnet 
       mask, type it now and press enter, else just press enter.

   12. Next line will be "Default Gateway = 0.0.0.0 >" . If you want to use 
       default gateway, type it now and press enter, else just press enter.

   13. Next line will be "Remote System 1 Name = >" . Here you need to type 
       the same host name you specified in the Boot Script line.

   14. Next line will be "Remote System 1 IP = >" . Here you need to type your 
       host IP address. For example: 24.42.124.94 and press enter.

   15. Next line will be "Remote System 2 Name =  >" . Just press enter.

   16. Next line will be "Remote System 3 Name =  >" . Just press enter.

   17. Next line will be "Remote System 4 Name =  >" . Just press enter.

   18. Now you will get the following message: 

       Saving changes will generate a reboot.
       Save Changes (y/n)?

       Press y to save the changes.

   19. Now the changes are saved and the board will restart visionWARE and boot 
       vxWorks, after a few seconds you will get the following messages:

       Wind River visionWARE v2.00 for the PPMC8260 Board  
       MAC : 00-00-00-00-00-00 IP : 24.42.124.92
       Type "shell" to set IP and/or MAC addresses
       Type "help" to see available commands

       Press a key in the next <1> seconds to preempt boot script
       Booting from script...

       load \\host\vxWorks.bdx!launch 100000

       >Attached TCP/IP interface to motfcc unit 0
       Attaching interface lo0...done


                        VxWorks

       Copyright 1984-1998  Wind River Systems, Inc.

                   CPU: MPC8260 PowerQUICC II - Wind River. PPMC8260
               VxWorks: 5.5
           BSP version: 1.2/2
         Creation date: Aug 02 2001
                   WDB: Ready.

For more information regarding visionWARE boot services and the visionWARE development kit, please refer to the visionWARE manuals, located on the CD that was shipped with your board.

BOOT DEVICES

The supported boot device(s) is(are):
    motfcc - MII 10/100BaseT Fast Ethernet (FCC2)

        or:

    fei    - Intel 82559 NIC, 10/100BaseT Fast Ethernet (FEI)

FEATURES

This section describes the support and unsupported features of the PPMC8260

Supported Features

The supported features of the PPMC8260 board are:
    8260 processors, Bus 66MHz, CPM 133MHz, Core 200MHz
    Board Initialization
    MMU support
    Cache support
    Decrementer timer, is used to implement a System Clock.
    SMC1 a UART for COM1 (Consol channel).
    SMC2 a UART for COM2.
    FCC2 Port as an Ethernet device supporting 10/100Base-T protocol or
    100\10BaseT Intel 82557/9 PCI Ethernet device supporting 10\100Base-T 
        protocol (5V & 3.3V PCI).       
    TIMER2 as an 16-bit auxiliary clock.
    TIMER3 and TIMER4 are cascaded into a free-running 32-bit timer for 
        timestamp support.
    Interrupt Controller.
    Baud Rate Generators as required for SMC1 and SMC2.
    TUNDRA PowerSpan PCIBus bridge controller
    256 MB SDRAM on 60x Bus.
    16MB SDRAM on Local Bus.
    16MB On Board FLASH on 60x Bus.
    32KByte EEPROM for Ethernet MAC address and bootline.

 .SS "Unsupported Features"

The items not supported on the PPMC8260 are:
    Other MPC8260 peripherals
    Support for the L2 cache (hardware not available)

HARDWARE DETAILS

This section documents the details of the device drivers and board hardware elements for the PPMC8260.

Support for L1 Cache Locking

L1 cache locking is available for MPC8260. The cache lock routine can be used to lock the entire data or instruction cache with a specified memory region.

Devices

The chip drivers included are:

    smc8260Sio.c        - serial driver
    m8260IntrCtl.c      - interrupt controller driver
    m8260Timer.c        - timer driver
    byteNvRam.c         - Byte oriented nvram device
    eeprom.c            - EEPROM access routines
    m82xxDpramLib.c     - DPRAM memory driver.
    sysPowerSpan        - TUNDRA PowerSpan PCI bridge driver
    motFccEnd.o         - FCC Ethernet END driver
    miiLib.o            - Media Independent Interface library
    fei82557End.o       - FEI Ethernet END driver

The BSP configures SMC1 as a UART to implement a console device and the FCC2 as an Ethernet. SMC1 is used as a console device. FCC2 is used as a 10/100Base-T Ethernet port. FEI is used as a 10/100Base-T Ethernet port.

Default Memory Map

        Memory Map from CPU point of view

Chip Select      Start         Size   Access to
-------------------------------------------------------------------------------
CS0   (R/W)      0xFE000000    16MB   On Board FLASH memory
CS2-3 (R/W)      0x0          256MB   SODIMM SDRAM
CS4   (R/W)      0x38000000    16MB   SDRAM on Local bus
CS5   (R/W)      0xF2000000    32KB   NVRAM (EEPROM)
CS7   (R)        0xF1000000     8Bit  Configuration Switches (Register)
CS7   (W)        0xF1000001     8Bit  User LED's (Register)
CS7   (R)        0xF1000001     8Bit  User Switch's (Register)
CS7   (R)        0xF1000002     8Bit  Hardware revision value
CS7   (R)        0xF1000003     8Bit  PowerSpan status
                 0xF0000000    64KB   PPMC8260 internal memory resources, DPRAM

Shared Memory

NA

Programming the Hard Reset Configuration Word to the On Board FLASH

1. Power off the PPMC8260 board and set dip switch S2-1 to Open posetion
   (Sets Reset Configuration to internal default).

2. Power on the PPMC8260 and the emulator (visionPROBE II or visionICE II).

3. If you are using visionCLICK follow section 4.1, if you are using SingleStep
   for vision follow section 4.2 :

   4.1 Using visionCLICK:

           4.1.1. Start visionCLICK and go to the menu and choose 
                  Tools->Upload / Download Register Files->
                  Download Register Value from File To Emulator . The 
                  "CHOOSE FILE TO LOAD REGISTER FROM:" dialogbox will popup.
                  Browse to register file location and choose the "ppmc8260.reg"
                  , after plabacking the script finished continue to the next 
                  step.

           4.1.2. In the terminal window at the >BKM>  or >ERR> prompt enter 
                  the "IN" command and press enter. Now you should get the 
                  >BKM> prompt.

           4.1.3. Go to the "Tools" menu and choose the "Program Flash Devices" 
                  The "TF FLASH PROGRAMMING" dialogbox will popup.

           4.1.4. In the "Flash Card or PC Host File Name and Path" group, 
                  press the Select... button.

           4.1.5. The "CHOOSE A FILE FROM HOST PC" dialogbox will popup.Use the
                  <-Browse button to browse to 
                  $(WIND_BASE)\target\config\wrPpmc8260" and choose the 
                  ppmc8260_hreset.bin and press the OK button. After 
                  returning to the "CHOOSE A FILE FROM HOST PC" dialogbox press
                  again the OK button.

           4.1.6. Now you should be in the "TF FLASH PROGRAMMING" dialogbox. Go 
                  to the "Programming Algorithm" group and press the Select 
                  button.The "Choose TF Device Algorithm" dialogbox will popup. 
                  Choose the "INTEL  28F640Jx ( 4096 x 16 )  2 Devices" and 
                  press the OK button.

           4.1.7. Now you should be back in the "TF FLASH PROGRAMMING" dialog
                  box. In the "Device or Sector Base and End Address" enter 
                  the following: FE000000 for the "Base Address" and check the 
                  "Erase All" radio button.

           4.1.8. In the "Available RAM Workspace For Flash Algorithm" group 
                  enter the following: For "Start Address" F0008000 and for 
                  "Byts Of Target RAM Required" 4000.

           4.1.9. Now press the "Erase and Program" button. After getting the 
                  100%, close the "TF FLASH PROGRAMMING" dialogbox and continue 
                  to step 5.

   4.2 Using SingleStep for vision:

           4.2.1. Go to the File menu and choose the "Start Debug Session...".

           4.2.2. The Debug dialog box will popup, In the "Connection" tab
                  choose the visionPROBE option & the correct LPT port if you 
                  are using visionPROBE, or visionICE & enter the emulator IP 
                  address if you are using visionICE.

           4.2.3. In the "Processor" tab choose the MPC8260.

           4.2.4. In the Register tab choose the option 
                  "Use vision-style register window with REG file" and then
                  brows to the location of the register file, and choose the 
                  "ppmc8260.reg" file.

           4.2.5. In the "File" tab choose the "Debug without a file" option
                  and press OK.

           4.2.6. Now should get the "Debug Status" dialogbox and in the 
                  "Debug Session" field you should have in green 
                  "Started Successfully", press the Close button.

           4.2.7. Now go to the Command button in the toolbar and press on it
                  The Command Window will popup, the prompt in the window 
                  will be "SingleStep". Bring the mouse cursor above the 
                  Command window and pres the right button.A menu will popup, 
                  choose the "VisionShell(vsh)" option. Now the prompt in the
                  window will be ">BKM>".

           4.2.8. Go to the menu and choose "Tools"->"Vision Flash Utility..." .

           4,2.9. The "Flash Programming Window" will popup. Go to the 
                  Configuration tab, and choose the following Flash device:

                  "INTEL  28F640Jx ( 4096 x 16 )  2 Devices" . In "Flash Bank"
                  group for the "Start:" enter "FE000000".In the "RAM Workspace" 
                  group for the "Workspace Start at:" enter "F0008000" and for 
                  the "Workspace Size:" enter "4000".

          4.2.10. Now switch to the Files tab and press the Add button. 
                  The open dialogbox will popup, browse to 
                  $(WIND_BASE)\target\config\wrPpmc8260\ and choose the
                  "ppmc8260_hreset.bin" file. Now after getting back to the 
                  "Files" tab you will see the full path to the selected file 
                  in the "Binary Files" group. Move the mouse curser above the 
                  line that showing the full path in the "Binary Files" group
                  and press the right button to mark this line. Now press the 
                  "Toggle Enable" button to select this binary file.

          4.2.11. Now go to the "Program" tab and press the "Erase/Program" 
                  button. After the process finished continue to step 5.

5. Power off the PPMC8260 and close switch S2-1.You will get the ">ERR>" prompt
   in visionCLICK terminal window or in SingleStep command window.

7. Power on the PPMC8260 and at the ">ERR>" prompt enter: IN

8. The PPMC8260 will read the configuration word from Flash during reset and
   initialize the processor base on the configuration word entered in step 4 
   and you will get to ">BKM>".

9. Now you are ready to disconnect the emulator and run the BSP.

Using the vPROBE/vICE to download the vxWorks image directly to RAM

when using vPROBE/vICE to download the vxWorks image directly to RAM you need to remember that the CS & main CPU initialization are done by the emulator and not by the bootrom (romInit.s), because the reset symbol is "sysInit" and not the reset vector (0xFFF00100). Because this the code will execute only the module "sysALib.s", and it will not execute the module "romInit.s". If you will not use the correct register file the vxWorks image will not run correctly.

SDRAM Size

The BSP divides the 256MB SDRAM into two sections. The first section is used by vxWorks at the beginning and his size is 32MB. The second section is the rest of the memory 224MB can be added in the application level or by changing the compilation switch. Here is the reason way is done like this:

The reason the BSP divides the 256Meg SDRAM into 32MB sections and 224MB section has to do with the EABI compilation option of a 24 bit address. The default compilation options generates a bl for branch instructions. This increases performance, but places a 32Meg address limit on the code.

There are two "work arounds" to this limitation.

    1.) recompile all the source with the -mlongcall compilation flag
    2.) add remaining 224Meg to the memory pool vi the memAddToPool( ) function.

Option #1 would require all the libraries, driver, and the BSP to be recompiled with the -mlongcall compiler option. This results in a number of code changes; the most obvious code change is branches are implemented via brlr instruction verses the bl instruction.

Option #2, the preferable options, requires the USER_RESERVED_MEM and the memAddToPool( ) constructs be used to specify the remaining 224Meg to be added to the memory pool. Consult WindTech Note WTN41 for details on specifying user memory.

Ethernet Port

The BSP configures to use FCC2 as an Ethernet port. The name "motfcc" should be specified as the boot device to the boot ROMs when booting vxWorks over that interface. The Fast Ethernet Controller (FCC) makes available fast Ethernet connectivity through the use of a 10/100BaseT Ethernet port (JP28) through the RJ45 connector. The BSP configures to use END-style network driver. If you wishes to use the FEI as the boot device for more instruction please read the section "Switching between the FCC to FEI".

NVRAM Support

This BSP implements NvRam via a EEPROM device. There are a few user parameters associated with this device. The parameters are located in the "config.h" file and are:
    #undef  INCLUDE_EEPROM_LOCKING
    #define SMART_EEPROM_WRITE
    #define ETHERNET_ADR_SET /* (used in bootConfig.c to enable 'N' command) */
The INCLUDE_EEPROM_LOCKING parameter is typically #undef'ed. If #define'ed, the EEPROM will be software locked between accesses. This was implemented on the BSP to work around a power-on EEPROM corruption problem. It should be noted, that if the EEPROM is locked, its contents can not be altered via an emulator or visionPROBE II or visionICE II (JTAG/BDM does not meet the minimum timing relationships needed).

The SMART_EEPROM_WRITE parameter is typically #define'd. When defined, the EEPROM write code first checks to see if a cell is the desired value. If the memory location already contains the desired value, the write is skipped. This was implemented to increase the life of the EEPROM device.

The ETHERNET_ADR_SET is a value that indicates the MAC address is stored in NVRAM and alterable via the N bootrom command.

Changing the Ethernet Address

The "config.h" support two Ethernet interface (Not in the same time). The FCC Ethernet do not have a unique Ethernet hardware address assigned to it, and the FEI Ethernet have a unique Ethernet hardware address. A unique address is absolutely necessary if the user wishes to connect the board, using the FCC channel to a network. Thus, the user must provide a suitable 6 byte Ethernet address for each board used on a network. The default Ethernet Address is specified in the "config.h" The following relate to the storage of the Ethernet address in NVRAM:
    /* Ethernet MAC Address Parameters */
        #define CUST_ENET3      0xA0    /* Customer portion of MAC address */
        #define CUST_ENET4      0xAA
        #define CUST_ENET5      0xA0
The first three bytes (0x00, 0xa0, 0x1e) are a Wind River specific prefix that should be kept as-is. If for some reason you need to change them, in "config.h" change the following macros:
    #define WR_ENET0  0x00  /* Wind River specific portion of MAC (MSB->LSB) */
    #define WR_ENET1  0xa0
    #define WR_ENET2  0x1e        

    #define     ENET_DEFAULT 0xa01e0000
Note:
    The "ENET_DEFAULT" macro should contain the same number as the three 
    "WR_ENETx" macros. For example : 
    #define WR_ENET0  0x11
    #define WR_ENET1  0x22
    #define WR_ENET2  0x33        

    #define ENET_DEFAULT 0x11223300
The user must change the last three bytes to three unique bytes (i.e., bytes not used by any other Wind River Ethernet connection on your net). Check with your system administrator if you do not know this information. If these bytes need changing (they often will not), a new boot ROM must be burned, and a new image must be built. Ethernet Address can be specified at the bootrom prompt (N command). The Ethernet address is stored in the on board NVRAM. This option will able you to change the last three bytes. To use this option, open the console window (for example: hayper terminal) and when the bootrom banner appear and the countdown start, press any key, when you get the [VxWorks Boot] prompt , press N and follow the instructions.

Switching between the FCC to FEI

The BSP is using by default the FCC driver, but it is supporting also the FEI driver that is used for the Intel 82559 card pluged in the PCI bus. To use the FEI driver type c" in the boot prompt and for the boot device type "fei" instead of "motfcc".

Serial Configuration

SMC1 and SMC2 are configured as UART devices with 8 data bits, 1 stop bit, hardware handshaking, and parity disabled.

Serial Connections

This VxWorks MPC8260 BSP uses a simple 3 wire connection and standard phone jacks where pin 1 = RIN, pin 2 = TOUT, pin 3 = NC, and pin 4 = GND.

SCSI Configuration

There is no SCSI interface on this board.

Network Configuration

FCC2 is configured as a 10/100Mb/s Fast Ethernet port FEI is configured as a 10/100Mb/s Fast Ethernet port

VME Access

NA

PCI Access

One 32-bit address, 32-bit data; complies with PCI Local Bus Specification, Revision 2.1 The TUNDRA PowerSpan on the PMC module is the PCI bridge. If you need more PCI slot you can use the Wind River PCI DEVELOPMENT BOARD.

Force Default Boot Line Option

If the FORCE_DEFAULT_BOOT_LINE is defined in "config.h", then the DEFAULT_BOOT_LINE parameters are used as boot parameters regardless of the NVRAM values previously specified. Recall, boot parameters are stored in the NVRAM device so boot parameters are not lost during a power cycle.

Defining the FORCE_DEFAULT_BOOT_LINE value is useful for debugging emulator/visionPROBE II downloaded RAM based vxWorks images. It is considered a DEBUG options so it should be #undef'ed for the final image.

Normally the boot parameters are specified at the bootrom prompt and stored in NVRAM. When a downloaded image executes, the boot parameters are retrieved from the NVRAM device.

This can sometimes cause undesired results. For example, if the NVRAM has been previously initialized, then changing the DEFAULT_BOOT_LINE in the config.h will not result in the new settings being used. The reason being is the initialization code always takes the boot parameters from the NVRAM device. If there are sane values in the NVRAM device, these boot parameters are used.

If you intended to debug an image by downloading with WR's visionTools and plan on changing the DEFAULT_BOOT_LINE parameters a number of times, it might be convenience to define this FORCE_DEFAULT_BOOT_LINE parameter.

As a note, unitialized NVRAM device is initialized automatically with the DEFAULT_BOOT_LINE parameters specified in the "config.h" file.

As an alternate solution for the above scenario, the boot parameters can be changed via the bootrom. This will store the values in NVRAM and will subsequentially be used by the download image. This would require a sane bootrom and would require the target board to run via the bootroms to set the values and then halted to download the image to be debugged via the WR Tools.

Using the Local Bus

If a you configures FCC use of local bus, or is building a ROM resident image, then you MUST define INCLUDE_LOCAL_BUS_SDRAM in "config.h" as follow:

FROM

   #undef INCLUDE_LOCAL_BUS_SDRAM

TO

   #define INCLUDE_LOCAL_BUS_SDRAM

Building ROM Resident image

Before you build a rom resident vxWorks image you need to modify the following parameter in "config.h" :

FROM

    #undef FORCE_DEFAULT_BOOT_LINE

TO

    #define FORCE_DEFAULT_BOOT_LINE
Don't forget to enter the correct target IP address in the DEFAULT_BOOT_LINE. For more details please read the "Force Default Boot Line Option" section.

And in "config.h" to define the macro "#define INCLUDE_LOCAL_BUS_SDRAM".

** With the ROM RESIDENT from the user level, Zero Copy sockets is available,
   but the driver will internally and transparently convert the transmit calls 
   to copy sends. 

ROM Considerations

bootrom_uncmp.hex is provided with this BSP. The bootrom is configured to a ROM base address of 0x0. When programing the bootrom to the FLASH an offset of 0xFFF00100 need to be given, also it's configured to use the 16 MByte On Board Flash ROM and FCC2 10/100BaseT Ethernet as default boot device and SMC1 as console device. The hard reset configuration word must be programmed separately at the flash base address of 0xFE000000 and at offsets 0x0, 0x8, 0x10, 0x18 and 0x20, see chapter 5 Reset in the MPC8260 PowerQUICC II User's Manual.

Make Targets

Only bootrom_uncmp, bootrom, bootrom_res, vxWorks, vxWorks_romResident have been tested.

Dual Port RAM Map

The wrPpmc8260 is using the m82xxDpramLib.c to allocate dynamically the necessary DPRAM memory for the serial and Ethernet channels. Key features of sysDpramLib are:

    - Init the DPRAM memory with considerations of any Microcode that add been
      loaded.

    - Allocate aligned and non aligned memory.

    - Free memory.

    - Manage a special section (0xB000 - 0xC000) for special FCC needs.

Interrupts

The following table describes the relationship between the interrupt number, interrupt vector, and the interrupt bit position in the SIU Interrupt Mask Register (SIMR_H and SIMR_L). Also described is the mask to use to enable all interrupts of a higher priority.
Default Mask to Enable
Interrupt Interrupt Interrupt SIMR Higher Priority Interrupts Interrupt
Priority Number Vector Mask SIMR_H SIMR_L Source
_
HIGHEST PRIORITY
1 16 0x10 H 0x00000004 0000_0000 0000_0000 TMCNT
2 16 0x10 H 0x00000004 0000_0000 0000_0000 TMCNT
3 17 0x11 H 0x00000002 0000_0004 0000_0000 PIT
4 reserved
5 19 0x13 H 0x00004000 0000_0006 0000_0000 IRQ1
6 27 0x20 L 0x80000000 0000_4006 0000_0000 FCC1
7 28 0x21 L 0x40000000 0000_4006 8000_0000 FCC2
8 29 0x22 L 0x20000000 0000_4006 C000_0000 FCC3
9 inactive
10 unused
11 31 0x24 L 0x08000000 0000_4006 E000_0000 MCC1
12 32 0x25 L 0x04000000 0000_4006 E800_0000 MCC2
13 inactive
14 inactive
15 20 0x13 H 0x00002000 0000_4006 EC00_0000 IRQ2
16 21 0x14 H 0x00001000 0000_6006 EC00_0000 IRQ3
17 22 0x15 H 0x00000800 0000_7006 EC00_0000 IRQ4
18 23 0x16 H 0x00000400 0000_7806 EC00_0000 IRQ5
19 unused
20 35 0x28 L 0x00800000 0000_7C06 EC00_0000 SCC1
21 36 0x29 L 0x00400000 0000_7C06 EC80_0000 SCC2
22 37 0x2A L 0x00200000 0000_7C06 ECC0_0000 SCC3
23 38 0x2B L 0x00100000 0000_7C06 ECE0_0000 SCC4
24 inactive
25 inactive
26 inactive
27 inactive
28 unused
29 40 0x30 H 0x00010000 0000_7C06 ECF0_0000 PC15
30 12 0x0C L 0x00000010 0001_7C06 ECF0_0000 Timer 1
31 41 0x31 H 0x00020000 0001_7C06 ECF0_0010 PC14
32 unused
33 42 0x32 H 0x00040000 0003_7C06 ECF0_0010 PC13
34 10 0x0A L 0x00000040 0007_7C06 ECF0_0010 SDMA Bus Error
35 6 0x06 L 0x00000400 0007_7C06 ECF0_0050 IDMA1
36 unused
37 43 0x33 H 0x00080000 0007_7C06 ECF0_0450 PC12
38 44 0x34 H 0x00100000 000F_7C06 ECF0_0450 PC11
39 7 0x07 L 0x00000200 001F_7C06 ECF0_0450 IDMA2
40 13 0x0D L 0x00000008 001F_7C06 ECF0_0650 Timer 2
.bp

Interrupts, continued:

Default Mask to Enable
Interrupt Interrupt Interrupt SIMR Higher Priority Interrupts Interrupt
Priority Number Vector Mask SIMR_H SIMR_L Source
_
HIGHEST PRIORITY
41 45 0x35 H 0x00200000 001F_7C06 ECF0_0658 PC10
42 unused
43 unused
44 3 0x03 L 0x00002000 003F_7C06 ECF0_0658 RISC Timer Table
45 1 0x01 L 0x00008000 003F_7C06 ECF0_2658 I2C
46 unused
47 46 0x36 H 0x00400000 003F_7C06 ECF0_A658 PC9
48 47 0x37 H 0x00800000 007F_7C06 ECF0_A658 PC8
49 24 0x18 H 0x00000200 00FF_7C06 ECF0_A658 IRQ6
50 8 0x08 L 0x00000100 00FF_7E06 ECF0_A658 IDMA3
51 25 0x19 H 0x00000100 00FF_7E06 ECF0_A758 IRQ7
52 14 0x0E L 0x00000004 00FF_7F06 ECF0_A758 Timer 3
53 unused
54 unused
55 48 0x38 H 0x01000000 00FF_7F06 ECF0_A75C PC7
56 49 0x39 H 0x02000000 01FF_7F06 ECF0_A75C PC6
57 50 0x3A H 0x04000000 03FF_7F06 ECF0_A75C PC5
58 15 0x0F L 0x00000002 07FF_7F06 ECF0_A75C Timer 4
59 unused
60 51 0x3B H 0x08000000 07FF_7F06 ECF0_A75E PC4
61 unused
62 9 0x09 L 0x00000080 0FFF_7F06 ECF0_A75E IDMA4
63 2 0x02 L 0x00004000 0FFF_7F06 ECF0_A7DE SPI
64 52 0x3C H 0x10000000 0FFF_7F06 ECF0_E7DE PC3
65 53 0x3D H 0x20000000 1FFF_7F06 ECF0_E7DE PC2
66 4 0x04 L 0x00001000 3FFF_7F06 ECF0_E7DE SMC1
67 unused
68 5 0x05 L 0x00000800 3FFF_7F06 ECF0_F7DE SMC2
69 54 0x3E H 0x40000000 3FFF_7F06 ECF0_FFDE PC1
70 55 0x3F H 0x80000000 7FFF_7F06 ECF0_FFDE PC0
71 unused
72 unused
73 reserved
LOWEST PRIORITY

SPECIAL CONSIDERATIONS

This section describes miscellaneous information that the user needs to know about the BSP.

Cache coherency between the 603 core and the CPM

The MPC8260 is not maintaining cache coherency between the 603 core and the CPM, in result of this, all the data that is transfer from the 603 to the CPM an vise versa should be placed in non-cacheable memory. For example the FCC and SCC buffers and buffer descriptors should be allocated using cacheDmaMalloc( ). In this BSP the BD are located inside the CPM DPRAM, that means only the buffers are on the 60x bus, and they are non-cacheable.

Known Problems

NA

BIBLIOGRAPHY

MPC8260 PowerQUICC II User's Manual MPC8260UM/D PowerPC Microprocessor Family: The Programming Environments for 32-bit Microprocessors MPCFPE32B/AD MPC603e & EC603e RISC Microprocessors User's Manual MPC603EUM/AD Motorola PowerPC Microprocessor Family: The Programming Environments, Peripheral Component Interconnect (PCI) Local Bus Specification, Rev 2.1, PCI to PCI Bridge Architecture Specification 2.0, PICMG 2.0 D2.14 CompactPCI Specification, IEEE P1386.1 Draft 2.0 - PCI Mezzanine Card Specification (PMC),