Embedded Target for Motorola MPC555    

Configuring SingleStep and Downloading
Boot Code

The following sections explain how to configure the SingleStep debugger and download boot load code into flash memory. After configuring SingleStep, you will also be able to use the debugger directly to debug generated programs.

Purpose of Flash Memory Boot Code

When reading this section, you may want to refer to the internal memory map of the MPC555 in section 1.3 of the MPC555 Users Guide. You can find this document at the following URL.
http://e-www.motorola.com/webapp/sps/library/prod_lib.jsp

To run generated code from the flash memory, you must load the first 32K flash sector with boot code. The primary purpose of the boot code is to load and start application code when the board is powered on or reset. The boot code also acts as a download agent that downloads generated code into flash memory via CAN.

You will use SingleStep debugger to load the boot code. Once the boot code is loaded into flash memory, you can download code to the processor entirely over a CAN network without needing to use SingleStep or a BDM connection.

For more information on downloading generated code into flash memory via CAN see Downloading Boot and Application Code.

Configure Shortcuts to SingleStep

In order to start SingleStep with the proper options, we recommend that you configure two shortcuts to SingleStep as follows.

  1. The SingleStep installer will have installed a shortcut named SingleStep On Chip (MPC5xx) in your system's Start/Programs/SingleStep 7.6.2 menu. Locate this shortcut file and make a copy of it on your desktop. Rename the copy to SingleStep On Chip (MPC5xx) for Flash.
  2. Right-click on the SingleStep On Chip (MPC5xx) for Flash shortcut file and edit its Target property to read as follows

    ssteproot\cmd\bdmp58.exe -P -r matlabroot\toolbox\rtw\targets\mpc555dk\common\drivers\app_startup\memcfg.dbg -S matlabroot\toolbox\rtw\targets\mpc555dk\common\drivers\app_startup\mw_flash.wsp

  1. where ssteproot is the installed SingleStep directory and matlabroot is the MATLAB root directory.

    You will use the SingleStep On Chip (MPC5xx) for Flash shortcut when downloading boot or application code to flash memory via SingleStep.

  1. Make a copy of the SingleStep On Chip (MPC5xx) for Flash shortcut file you created in step 2 and rename it to SingleStep On Chip (MPC5xx) for RAM. Edit its Target property to read as follows

    ssteproot\cmd\bdmp58.exe -P -S matlabroot\toolbox\rtw\targets\mpc555dk\common\drivers\app_startup\mw_ram.wsp

  1. where ssteproot is the installed SingleStep directory and matlabroot is the MATLAB root directory.

    You will use this SingleStep On Chip (MPC5xx) for RAM shortcut when downloading code to RAM via SingleStep.

Configure phyCORE-MPC555 Jumpers

Make sure that the jumpers on the phyCORE-MPC555 board are set as described in Phytec Jumper Settings. The correct jumper configuration is required when downloading to flash memory via the BDM port. Any other jumper settings may cause downloading to flash memory to fail, or cause other problems when operating with the Embedded Target for Motorola MPC555. For additional information on jumper settings, consult the phyCORE-MPC555 documentation and the SingleStep manual.

Configure SingleStep Parameters

The next step is to configure the SingleStep options as follows:

  1. Start SingleStep using the SingleStep On Chip (MPC5xx) for Flash shortcut you created previously. The Debug dialog box opens.
  2. Click on the File tab. Select the Debug without a file check box, as shown.

  3. Click on the Connection tab. Choose parallel port or network settings appropriate to the physical connection you will be using between your PC and PhyCORE-MPC555 board. In the figure below, connection options are configured for the parallel port LPT1, with a Delay setting of 6.

  1. Click on the Processor tab. Confirm that the MPC555 is selected in the Processor menu, as shown.

  1. Click on the Options tab. Make sure that the Reset Target check box is selected, as shown.

  2. Click on the Target Configuration tab and select General from the Category menu. Then select Internal Memory Mapping Register from the Registers menu, as shown.

  1. Click on the Show button to open the Internal Memory Mapping Register dialog box. Confirm that the FLEN-flash enable check box is selected as shown below.

  1. Then click OK to close the Internal Memory Mapping Register dialog box and return to the Debug dialog box.

  1. Click OK. SingleStep attempts to connect to the processor, and displays a Debug Status window. This figure shows the Debug Status window after a successful connection.

  1. If you see error messages, consult the SingleStep documentation to troubleshoot the connection, or contact Wind River Systems for technical support.

  1. Click Close to dismiss the Debug Status window.

Download Boot Code to Flash Memory

The next step is to download the boot code to flash memory, using the SingleStep Flash Programmer dialog box.

  1. Activate the main SingleStep window. If you do not see a Flash button in the toolbar, select Tools from the ToolBars menu.
  2. Click on the Flash button on the toolbar. The Flash Programmer dialog box opens. Click on the Set Up tab. This figure shows the Set Up pane.

  1. Enter the Session File Name as

    matlabroot\toolbox\rtw\targets\mpc555dk\common\drivers\app_startup
    \boot_flash.pts

  2. Click the Load button. After a brief interval, a message box appears, indicating that the load has completed. Click OK to dismiss the message box.
  3. Click on the Program/Verify tab. On the Program/Verify pane of the dialog, enter the S-Record or Binary Image File as

    matlabroot\toolbox\rtw\targets\mpc555dk\common\drivers\bootcode\
    bootcode_flash.bin

  1. Also select the Auto Erase Before Programming and Auto Verify After Programming options.

  1. Click the Program button. The boot code is downloaded. During downloading, a number of progress messages are displayed in the Status panel at the bottom of the dialog box.
  2. Upon completing the download process, SingleStep displays a message box indicating successful completion. Click OK to dismiss the message box. Then, close the Flash Programmer dialog box. Do not save changes to the Flash Programmer when the Save dialog appears.
  3. If flash programming fails, you should

Your PhyCORE-MPC555 board is now ready to receive application code via CAN download. It is no longer necessary to download the code via the BDM device. However, if you prefer to download the application via BDM, you can do so as described in Downloading the Application to RAM via SingleStep/BDM.


  Installing SingleStep Debugger Setting Up Your Installation with Metrowerks CodeWarrior