element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Freedom development platform
  • Products
  • Dev Tools
  • Freedom development platform
  • More
  • Cancel
Freedom development platform
Documents Keil µVision (ARM-MDK) Tutorial for all FRDM with Processor Expert Driver Suite
  • Blog
  • Forum
  • Documents
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Freedom development platform to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Engagement
  • Author Author: FreescaleTools_and_Software
  • Date Created: 9 Aug 2013 12:12 PM Date Created
  • Last Updated Last Updated: 8 Oct 2021 5:34 AM
  • Views 1997 views
  • Likes 0 likes
  • Comments 0 comments
Related
Recommended

Keil µVision (ARM-MDK) Tutorial for all FRDM with Processor Expert Driver Suite

This tutorial was extracted from Erich Styger blog http://mcuoneclipse.wordpress.com with his agreement.

imageimage

 

The good thing with using ARM microcontroller is: there are plenty of tool choices. Even myself, I’m using multiple different tool chains. And while I’m heavily using Eclipse, there are non-Eclipse tool chains which have their advantages too.

The cool thing with CodeWarrior is that beside of Eclipse based, it comes with Processor Expert integrated. And I’m using Processor Expert a lot in my projects. But using Processor Expert does not mean I’m limited to CodeWarrior or Eclipse. So I can use CodeRed or IAR as tool chain with it. And this post is about using Processor Expert with the µVision tool chain from Keil/ARM.

 

Keil uVision Splash Screen

Keil uVision Splash Screen

 

Software Downloads

Keil is owned by ARM and of course supports ARM devices :-) . Their IDE product is µVision (the current version is µVision4).

Processor Expert is available as ‘standalone’ version (called ‘Driver Suite’) from Freescale. Basically this is a stripped down Eclipse version with Processor Expert in it. It will be used to configure the drivers/components, and then things get imported and compiled by µVision (like IAR).

Software Installation

If not already installed, you need the following tools:

  1. The µVision IDE, compiler and debugger, available from http://www.keil.com/download/product/ (MDK-ARM). Current version is V4.71a
  2. Processor Expert Driver Suite, available from http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=PE_DRIVER_SUITE ‘Download’ tab. Current version is Microcontrollers Driver Suite V10.2

Processor Expert Driver Suite

  First, I’m going to create a new project with Processor Expert. For this I launch eclipse: 

 

Launching PExDrv 

Launching PExDrv

 

If this is the first time, it asks me for a new Eclipse workspace:

 

Workspace Launcher

Workspace Launcher

 

The it shows the ‘Welcome’ view, from where I go to the workbench:

 

Go To Workbench

Go To Workbench


 

External Tools Configuration

From the workbench, I need to configure µVision as an external tool:

 

External Tools Configurations 

External Tools Configurations

 

:idea: that menu is accessible as well under Run > External Tools.

 

Next step is to add a new external tool. For this I select the ‘Program’:

 

Program selected

Program selected

 

and press the ‘New’ button:

 

New Program

New Program

 

This creates a new configuration:

 

 

New Configuration

New Configuration

 

Next I configure the settings:

 

Export2uVision Configuration

Export2uVision Configuration

 

  • Name: just something useful and easy to remember.
  • Location: Browse where you have µVision installed and use the µVision executable.
  • Working directory: use ${workspace_loc:/${project_path}}
  • Arguments: use -i ProjectInfo.xml ${project_name}.uvproj

 

This configures to launch the µVision executable with the working directory of my (currently selected) project. It uses the -i argument to import a project. The project information are inside the ProjectInfo.xml which is generated by Processor Expert. The last argument is the project name µVision should use for when the .uvproj project does not exist yet. 

 

Press ‘Close’ to return to the workbench.

Creating Processor Expert Project

In the next steps, I’m creating a Processor Expert project for the FRDM-KL25Z board.

To create the project, I use the menu File > New > Processor Expert Project:

 

New Processor Expert Project 

New Processor Expert Project

 

I give it a name:

 

Project Name

Project Name

 

Select the device:

 

Selected Device

Selected Device

 

Using the current perspective:

 

Using current perspective

Using current perspective

 

The next step is important: I need to select the correct compiler to be used (Keil ARM C/C++ Compiler):

 

Selecting ARM Keil Compiler

Selecting ARM Keil Compiler

 

Finish, and the project gets created.

Adding Components

Now I can configure my the Processor Expert components, or add my components from GitHub. For my example, I have added a LED and Wait component to have a blinking LED:

Generating Code

To generate the code, I use the ‘Generate Code’ Button:

 

Generate Code

Generate Code

 

Processor Expert has now generated the code and created the ProjectInfo.xml file which I can export to Keil to create an MDK project:

 

Generated Code and ProjectInfo.xml

Generated Code and ProjectInfo.xml


 

Exporting to Keil µVision

To export it to Keil µVision, I launch the external tool I have configured before. As this is the first time, I do not have a launch history :-( . So I first select the project (or the ProcessorExpert.pe file in the project), and then use ‘External Tools Configurations…’ again:

 

Running external tool the first time with no launch history

Running external tool the first time with no launch history

 

Next, I select the Program I want to run and press ‘Run’:

 

Run the External Program

Run the External Program

 

:!: Note: I need to have project (or ProcessorExpert.pe of that project) selected. Otherwise I get an error “Variable references empty selection: …” as my project variable is not defined:

 

Variable references empty selection 

Variable references empty selection

 

Now as I have it launched once, it is present in the recent launch list and I can execute it directly with a click:

 

Export2uVision with recent launch 

Export2uVision with recent launch

 

:idea: It is important to have a current project selected. So make sure you select the project folder or the ProcessorExpert.pe file inside the project.

 

This has created a µVision project based on the ProjectInfo.xml:

 

uVision Project Created

uVision Project Created


 

Launching µVision from Processor Expert Project

Eclipse is able to launch an application based on the file extension. As the .uvproj file extension is associated with µVision, I can double-click on the .uvproj file inside the Eclipse project explorer view:

 

Launching uVision Project from Eclipse

Launching uVision Project from Eclipse


 

:idea: In case the .uvproj file is not shown in the project view, use ‘Refresh’ context menu on it or hit the ‘F5′ key.

:!: Note that if I double-click again, it will create another µVision IDE.

Open Project in µVision

And I can load that project from the Keil IDE too. In µVision I use Project > Open Project menu and browse to the .uvproj created in previous step:

 

Open Project in uVision 

Open Project in uVision

 

Now I have the project loaded:

 

Loaded Processor Expert Project

Loaded Processor Expert Project

 

F7 performs the build of the project:

 

Building the Project

Building the Project


 

Changing Components

Whenever I change components (add, remove or change) in Processor Expert I need

  1. Generate Code in Processor Expert Driver Suite
  2. Run the external tool to import the changed files/settings into µVision (run my Export2uVision)
  3. Switch to µVision to confirm to reload the changes: 

 

Confirm to reload changed settings

Confirm to reload changed settings

 

Debugging the FRDM-KL25Z

Now that I have compiled my application, I want to debug it on the FRDM-KL25Z. µVision does not (seem) to support the P&E OpenSDA, but it has support for CMSIS-DAP (ARM is driving the CMSIS initiative). So I loaded my FRDM-KL25Z with the CMSIS-DAP firmware as described in this post. The debugger settings in µVision have one gotcha:

 

First I need to set it for CMSIS-DAP Debugger in the Project options:

 

Project Options for CMSIS-DAP Debugger

Project Options for CMSIS-DAP Debugger

 

Next to verify that it is using SWD (and not JTAG) in the settings:

 

SWJ SWD Settings

SWJ SWD Settings

 

First I thought: that’s it!

However, when I wanted to debug, I had “No ULINK Device found”:

 

No ULINK Device found 

No ULINK Device found

 

The gotcha is that I missed to set the CMSIS-DAP debugger in the Utilities tab too :-( :

 

CMSIS-DAP Debugger in Utilities

CMSIS-DAP Debugger in Utilities

 

After that, I was able to debug the application on the FRDM-KL25Z:

 

Debugging the Processor Expert Application

Debugging the Processor Expert Application

 

:-)

Summary

Processor Expert is not limited to CodeWarrior or Eclipse, it can be used as ‘Driver Suite’ with external tools like IAR or Keil. It is not as integrated with Eclipse based solutions, but still it allows to use the power of Processor Expert.

I wish µVision would implement something like in IAR to automatically reload the new files, so this is for sure something which would make µVision+Processor Expert an even better combination.

 

Happy Keiling :-)

  • cortex-m0+
  • mdk-arm
  • freescale
  • freedom_board
  • Cortex-M
  • kinetis
  • cortex
  • frdm-kl25z
  • keil
  • kinetis-l
  • cortex-m0
  • arm
  • freedom
  • Share
  • History
  • More
  • Cancel
  • Sign in to reply
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube