Getting started with MPC5748G

Parent Previous Next

For the best evaluation experience we recommend to use the samples, which come already prepared, built and ready-to-go.

Setting up a new MPC5748G workspace

In this tutorial we will set up a new MPC5748G workspace, which will be debugged using an iC5000 emulator. We'll be using the Nexus trace port.


First create a new workspace by clicking File / Workspace / New Workspace. Choose a file name and location:

New Workspace dialog


New dialog will appear, prompting you to choose the hardware plugin. For use with iSystem tools, such as iC5000, choose the default option, iSYSTEM Development Tools:

Plug-in selection dialog


Hit OK to create a new workspace. The workspace needs to be configured now.

Hardware configuration

Open the Hardware / Hardware dialog and select iC5000 as the Hardware Type:

Hardware Configuration dialog


Connecting to the debugger via the USB

USB communication is set by default. Connect the debugger via the USB and turn it on. Open Hardware / Hardware / Communication tab and click Test to verify that the communication with the emulator can be successfully established.


Communication test result



Connecting to the debugger via the Ethernet

In case you want to communicate with iC5000 via the Ethernet, you may need to connect it via the USB first and set the Ethernet settings. This can be done by powering on the emulator and clicking the System Configuration button in the Hardware / Hardware / Hardware Type dialog. By default the IP address is allocated dynamically, if the DHCP server is available. If the DHCP server is not available, then enter the desired settings and click Apply changes button in order to save them:


System Configuration dialog


The emulator needs to be power-cycled in order for the changes to take place. Open the Communication tab of the Hardware Configuration window to select TCP/IP communication. Either enter the emulators IP address or choose the emulator from the drop-down menu. Now connect the iC5000 via the Ethernet port. Power-cycle the emulator and click Test to check, if the communication is successful.


Communication settings


Specifying the CPU settings

Open the Hardware / Emulation Options dialog and choose the PowerPC family from the drop-down menu. Choose the OnCE 5xxx from the POD/iCARD/iTAG menu and select the CPU you are using. In this case we're using MPC5748G:


CPU selection in the Emulation Options


Verifying the settings

Above settings are crucial to establishing a debug session. If any setting is incorrect, debug session will not be established. In order to verify that above settings are correct, CPU reset should be performed:

Turn off the debugger.

Connect the debug cable to the target board.

Connect the ground wire to the target board.

Turn on the iC5000 debugger.

Then turn on the target board.

Click Debug / Run control / CPU Reset to make sure that debug session can be successfully established.

iC5000 debugger connected to the MPC5748G target board

Adding a download file

In order to download the application to the microcontroller, the download file must be specified in the workspace. In this tutorial we assume, that the download file containing executable code and debug information is built with a third-party build tool. Open Debug / Files for download window and select New. Choose the desired download file and hit OK. Based on the download file type you may review the available options and click OK to confirm. Download File options dialog will open. If your code needs to be loaded at an offset, enter the offset for the code and the symbols. Click OK to confirm the Download file settings.


Download File options


Enable the Verify against Loaded code option in the Options tab to verify the download process:

Download Options


winIDEA needs to locate the source files in order to be able to debug the application on the source code level. Open Debug / Debug Options / Directories tab and add path to the source files to the alternate project files search directories list. Enable the Search subdirectories option if necessary.


Source file folder added to the alternate project files search directories list

Start debugging

Download the application by choosing Debug / Download. The download will be verified and you will be notified about any download errors if they occur. You may now debug you application.


winIDEA with most commonly used debug windows

Setting up the Analyzer

Open the Hardware / Analyzer Setup dialog. Nexus Trace Port is already chosen by default. If code, that is not present in the download file, will be recorded, then the option Code missing from download file should be read at run time needs to be enabled:


Analyzer Setup dialog


Note that Nexus clock must not exceed the maximum allowed frequency for the dedicated I/O pins. Nexus clock divider should be used when CPU clock is higher than frequency supported by the  I/O pins. MPC5748G supports MCKO Cycle time of minimum 15.6 ns (as stated in the MPC5748G data sheet), therefore maximum possible nexus trace port frequency is 64 MHz. This means that for applications running with frequency up to 64 MHz divider 1:1 may be used and for e.g. applications running with frequency 160 MHz divider 1:4 must be used. Open the Nexus tab on the CPU Setup dialog and choose correct Nexus clock divider. Note that Nexus clock divider directly affects how long teh analyzer session may be active (FIFO overflows are more likely to happen with bigger dividers, depending on the amount of data that is being recorded).


Entering the Nexus settings in the Nexus tab


To learn how to use the winIDEA Analyzer, please read the dedicated chapters.

Further read

For more detailed information on the Calypso 6M debug read the MPC5xxx emulation technical note.

For more information on the Analyzer read the Analyzer help topics.

For more information on the debug windows read the Debug Windows and the Debug Options chapters.