Export and Import Processor Expert Component Settings
Join the DZone community and get the full member experience.
Join For FreeWhen 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):
In the destination project I simply Paste the components:
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:
- Create a new Processor Expert project under the new IDE
- Copy-Paste the components
- 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:
- You need to be able to open the source project. If you do not have that IDE installed, you cannot copy from that project.
- 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':
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:
With that dialog, I can pick the set of components I want to export:
:!: 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:
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:
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:
I can Ignore components so they do not get imported:
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‘):
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 :-)
Published at DZone with permission of Erich Styger, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.
Trending
-
A Comprehensive Guide To Testing and Debugging AWS Lambda Functions
-
Scaling Site Reliability Engineering (SRE) Teams the Right Way
-
Hiding Data in Cassandra
-
Docker Compose vs. Kubernetes: The Top 4 Main Differences
Comments