This chapter describes the installation and use of iSYSTEM Debug Plugin for Eclipse.
The iSYSTEM Debug Plugin can communicate to iSYSTEM development tools and execute debug commands. All standard debug functionalities available in CDT are also implemented in the plugin. Additionally, SFR view and Real-time expressions view are also available. Comparing to winIDEA, the plugin does not implement trace, execution coverage and profiler functionality. The plugin therefore provides more than CDT debugger, but less than winIDEA. It currently still requires winIDEA to run in the background, but during the debugging, no switching to winIDEA is necessary.
Before starting with the installation the system must contain the following:
1. winIDEA IDE - (not required if user chooses to install the iSYSTEM Debugger for winIDEA Community Edition plugin). To download the latest winIDEA, go to http://www.isystem.com Downloads page.
2. Java - The plugin will install, but will not be available if older version of Java is installed!
3. Eclipse - To download the latest Eclipse go to http://www.eclipse.org/downloads/. If you want to use Eclipse for C/C++ development only, there is already a package with CDT available (Eclipse IDE for C/C++ Developers). In this case skip CDT installation described in the next step
4. CDT (C++ Development Toolkit) - To obtain CDT go to http://www.eclipse.org/cdt/downloads.php. CDT should be installed as Eclipse plugin.
The plugin supports all platforms supported by iSYSTEM embedded development tools.
Eclipse can be used only for single core MCU's. For Multi-core debugging refer to the following chapter: Multi-core Debugging.
There are two flavors of iSYSTEM Debugger plugin – a regular iSYSTEM BlueBox plugin and the plugin with winIDEA Community Edition. Both plugins have the same functionality but the plugin with winIDEA Community Edition also downloads and installs winIDEA Community Edition. Differences will be noted throughout this document. For regular plugin you must have winIDEA already installed on your system.
NOTE: iSYSTEM Debug Plugin for Eclipse older than Juno is based on an older CDT Debug architecture which is no longer being supported by the Eclipse/CDT community. So it is recommended to use Eclipse Juno or newer and the required plugin.
The plugin uses the Eclipse's standard installation procedure. Start Eclipse and select the main menu option Help / Install New Software. In the Work with text field enter:
The installation procedure is the same as for standard Eclipse, but we have to be careful about the version of the plug-in which we install.
To find the version of Eclipse which serves as a base of our CodeWarrior, select Help / About CodeWarrior Development Studio. A dialog opens, where we should click the button Installation details. Select tab Features in the next dialog and check the version of Eclipse Platform feature. Depending on this version you install the iSYSTEM debug plugin for Eclipse 4.2 and 4.3 as described above. For example, CW 10.5 is based on Eclipse 4.2.1.
The typical development procedure consists of the following steps:
1. Create a project in Eclipse / CDT - This step is described in the Eclipse / CDT help
2. Write some code and compile it - See the Eclipse / CDT help for details. Make sure you know the name and location of the output file, which should be downloaded to the target.
3. Create a winIDEA workspace - There are two options: we can use an existing winIDEA workspace configured for our target, or create a new one from scratch.
Creating a debug configuration
Before we can run debugger from Eclipse, we need to create a debug launch configuration.
The main menu option Run / Debug configurations opens the Debug configurations dialog.
First we select iSYSTEM Debugger and then we create a new configuration. Next we enter important information into the new configuration as shown.
Fields have the following meaning:
Open the iSYSTEM Debugger
Dialog entries for iSYSTEM Debugger have the following meaning:
Stop on start up at – defines if the execution should stop after start up, and where it should stop. Note, that the winIDEA option Debug / Files for download / Options / After download must be set to nothing (Stop), for this option to work properly.
Verbose log output – if checked, a detailed log of debugger execution is stored into log file. Since it takes some space and time, we usually leave this unchecked. In case of problems we can check this option and send log file to support team.
Use Real-time Access – if checked, real time access is enabled. It is important only for Real-time Expressions view.
Show winIDEA – This option hides winIDEA from the end user. Note that configuration dialogs accessible under the Configure button can still be used.
Verify after download – Specifies whether to perform a verification of the file downloaded to the target system.
Analyze source files – If this option is checked then source files will be analyzed after download to enable us to see macros inside the “Add global variables” dialog in the Variables view.
Workspace file – this field contains the path to the workspace file that will be opened by winIDEA. It's extension must be either 'xjrf'. Use of later one is recommended.
Configure - Advanced configuration option dialogs. This is explained in more detail in the next section.
If there is no instance of winIDEA running yet, then a new instance will be opened when a debug session is started or if the Configuration button is clicked. winIDEA instance that was opened by the Debugger will also be closed when Eclipse is closed.
In Debug Configuration dialog we have a Configure button. Clicking this button will open an advanced configuration dialog as seen below.
In order to show this dialog winIDEA must be started.
This will start the winIDEA specified in the preferences page and using the workspace which path has been set in the Workspace file: text field.
If we have specified for winIDEA to stay hidden then it will start in the background and never be shown.
If the workspace doesn’t exist you will be prompted to create it.
When creating a new workspace you must select which winIDEA hardware plugin you wish to use. An advanced configuration dialog will appear which can look differently for different winIDEA hardware plugins as seen on the screen shot.
Left is the dialog for iSYSTEM Development Tools plugin.
In the preferences page under Window / Preferences / iSYSTEM we can set which winIDEA installation is to be used. If there are no winIDEA installations on the current system then we still have the possibility of using winIDEA Community Edition that comes with the iSYSTEM Debugger plugin installation.
By using winIDEA Community Edition radio button (winIDEA Open) will be installed in an iSYSTEM directory inside the Eclipse installation directory. Installation will take place when we click Debug or Configure in the Debug Configuration dialog for the first time. If we installed the iSYSTEM Debugger for winIDEA Open then this already happened at plugin installation time.
Aside from the winIDEA Community Edition we can use any regular winIDEA installation found on the current system. Selecting the “latest” radio button will always use the newest installation/update. Browsing for a winIDEA installation is also possible and requires that the user points to the installation directory where winIDEA.exe can be found. Debug session will have to be restarted if we wish to use a different winIDEA installation than what was already used. A warning dialog will appear if a restart is required.
The SFR view is added to Eclipse workbench. SFRs are grouped in several groups. If a group which contains SFRs, or SFR which is composed of groups of bits, is selected, the detailed information is displayed in the details pane. For example, in the next image we can see bits of the CPSR register in the details pane on the right. There is also a layout menu, which gives options for different view layouts.
When the target is not in suspended state, Eclipse does not display information about target state, because it is normally not accessible. However, iSYSTEM hardware may enable us to observe global variables also during the running state (real-time access). If real-time access is available, check the check box in the debug configuration (see section Creating a Debug Configuration). Then select the main menu option 'Window | Show view | Other | Debug | Real-time expressions' as shown below.
The Real-time expressions view is added to the Eclipse workbench.
The Disassembly view shows the loaded program as assembler instructions mixed with source code for comparison. This view is a standard CDT feature, but when the iSYSTEM Debug Plugin is installed on the Infineon DAVE IDE alongside with the TASKING plugin, the disassembly view can’t be used as the TASKING plugin takes over the views signature and makes any changes impossible. When using the iSYSTEM Debug Plugin with DAVE the user should uninstall the TASKING plugin if the Disassembly view doesn’t work (is empty).
If downloading is slow, for example due to slow flash programming, and we know that the code did not change since the last debugging session, we can switch off the code downloading. If the toolbar button is pressed, then only symbols are downloaded when debugging session starts. The button has toggle state – each click reverses its state.
Launching without debugging
If we want to run the application without the debugger, we can do it by executing one of Run commands. In this case the plug-in tries to get the output file name from Eclipse. The output file name is available only if we use managed build in Eclipse. The output file name is specified in project properties: C/C++ Build / Settings / Build Artifact, fields Artifact Name, and Artifact extension. If there is no output file found in Eclipse project, we have to add output files manually to winIDEA.
Making copies of project
If we want to copy project files to other locations, we have to move all source files and project files. In case of Eclipse with CDT and iSYSTEM debugger, the following files have to be copied: