Over a million developers have joined DZone.

Export and Import Processor Expert Component Settings

· Performance Zone

Evolve your approach to Application Performance Monitoring by adopting five best practices that are outlined and explored in this e-book, brought to you in partnership with BMC.

When I create a new Processor Expert project for a board I already have the components configured, then an easy way to transfer components from one project to another is to copy-paste the components. In the ‘source’ project I select the components I want to use, choose Copy (or CTRL+C shortcut on Windows):

Copy of Processor Expert Components

Copy of Processor Expert Components

In the destination project I simply Paste the components:

Paste of Components in Destination Project

Paste of Components in Destination Project

That works as for all kinds of components (including the CPU component). That way I can copy-paste components even between different Processor Expert IDE’s (Kinetis Design Studio, Processor Expert Driver Suite, CodeWarrior, etc). With this, the easiest way for me to port a project from one IDE to another then is simply:

  1. Create a new Processor Expert project under the new IDE
  2. Copy-Paste the components
  3. Copy-Paste the source files

That way students can copy-paste my components settings from my master project into their own project.

While this is a simple and easy way to copy component settings, it has two disadvantages:

  1. You need to be able to open the source project. If you do not have that IDE installed, you cannot copy from that project.
  2. You cannot send the settings by email or put it into a version control system, or pass it between machines.

I would have expected that there would be some XML data copied to the clipboard. Looking at the data, it is in a ‘component-transfer-format':

Component-transfer-format of Copied Processor Expert Component

Component-transfer-format of Copied Processor Expert Component

With a tool like ‘Free Clipboard Viewer’ (http://www.freeclipboardviewer.com/) that data can be saved and loaded again. But this will need such a special tool :-(.

A better and easier approach is this one: In Eclipse, the standard way to pass some settings between projects, workspaces and machines is to use the Export and Import functionality. So I can select a project, then use the menu File > Export. This gives me an ‘Export Component Settings’ wizard:

Export Component Settings

Export Component Settings

With that dialog, I can pick the set of components I want to export:

Exporting Processor Expert Component Settings

Exporting Processor Expert Component Settings

:!: As a little trap, that wizard only accepts files with a *.pef file extension! Which is weird.

Pressing ‘Finish’, and the settings get exported into the specified file. Looking at the content of the file, this is a normal XML file:

Content of exported PEF file

Content of exported PEF file

That makes the settings easily sharable: I can put it on a memory stick, on a file server, send it by email or put it into a version control system.

To import the component (and settings), I use in Eclipse the menu File > Import and use the Processor Expert Component Settings Import Wizard:

Import Exported Processor Expert Component Settings

Import Exported Processor Expert Component Settings

I select that .epf file, and get a dialog which shows me all the components setting in that file, and what I can do with them while importing:

Importing Component Settings

Importing Component Settings

I can Ignore components so they do not get imported:

Ignoring Components

Ignoring Components

For components which already exists in the destination project, I can select if I do not want to import it (‘Ignore‘), If I want to have it as additional component (‘Add new, keep existing‘), if the component shall be imported and the existing one be kept as backup (‘Add new, disable existing‘, or if the new component shall overwrite the existing one (‘Replace settings‘):

How to configure importing a component which already exists

How to configure importing a component which already exists

With this, I have all the flexibility :-).

Summary

To export and import components on a machine and between open projects the easiest way is to simply copy-paste one or multiple components. To store the settings on a file, to share it or to put it into a version control system (apart of storing the .pe file), I can use the File > Export and File > Import functionality for Processor Expert component settings.

Happy Exporting and Importing :-)

Learn tips and best practices for optimizing your capacity management strategy with the Market Guide for Capacity Management, brought to you in partnership with BMC.

Topics:

Published at DZone with permission of Erich Styger, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}