Using Kinetis Design Studio With IAR Embedded Workbench IDE
Join the DZone community and get the full member experience.
Join For FreeFor everyone who wants to combine the power of Eclipse and Processor Expert with the IAR Embedded Workbench IDE, here is how to get them working side by side:
We have projects at the university where we used the IAR Embedded Workbench IDE with Processor Expert. The standard way to use Processor Expert with either Keil or IAR is using the Processor Expert Microcontroller Driver Suite. This requires either installing a plugin into an existing Eclipse, or using the standalone Driver Suite Eclipse version.
So far we had to use the Processor Expert Driver Suite v10.4 (see Processor Expert (Driver Suite/Plugins/KDS) V10.4 with new Component Inspector) in Eclipse Kepler. On the other side, many students are using the Freescale Kinetis Design Studio for their lab work too. Having two Eclipse versions installed is fine, but not very elegant and uses more disk space than needed. So why not using one Eclipse instance for both? And indeed, I have found a way to eliminate the need for Processor Expert Driver suite: it is possible to use IAR with the Freescale Kinetis Design Studio (KDS) :-)
Outline
The following tutorial shows how to create an ARM Cortex project in Kinetis Design Studio, which then can be compiled and debugged with IAR Embedded Workbench. I’m using Kinetis Design Studio V2.0.0 (KDS) and IAR Embedded Workbench V7.30.4.8187. KDS is free of charge and unlimited, while there is a free IAR version (code size limited to 16 KByte for ARM Cortex-M0+).
Project Creation
In KDS, create a new project the usual way with the menu File > New > Kinetis Design Studio Project.
Then go through the wizard, make sure you select Processor Expert:
Then finish the wizard and have the project created in Eclipse.
Setup for the IAR Toolchain
By default, the project has been created for the GNU compiler in KDS. To use the project for IAR, I need to change it to use the IAR ARM Compiler. To do this, select the ProcessorExpert.pe file in the project. Then in the component inspector, select the Cpu and use the Inspector (context menu, if view is not already open), go the to Build options tab and change the compiler to IAR ARM C Compiler:
Then use the button to generate Processor Expert Code:
Beside of the source code, this generates a file ‘ProjectInfo.xml‘ which has information which can be used by other tools, like the IAR IDE.
Connect from IAR IDE
Launch the IAR IDE and create a new project:
Select ‘Empty project’ for ARM, press OK to create it:
The IAR IDE will ask to save the project file (*.ewp) at this time. Store the project file inside the KDS project created earlier:
Project Connections
In order to connect to the ProjectInfo.xml, make sure ‘Enable project connections’ is enabled in IAR. The setting is behind the menu Tools > Options:
Use the menu Project > Add Project Connection:
Select Processor Expert for the connection:
Press OK, then select the ProjectInfo.xml:
With this, I have connected the project to IAR:
Now I can compile the project in IAR, and it should not report any errors:
I had a case where IAR complained about a missing startup.c file. This was an entry in the generated ProjectInfo.xml file, while this file did not exist on disk (was not generated). It looks there was a glitch in writing that file. The solution was a) to close the project in Eclipse, b) re-open the project and c) re-generate code. This has fixed the entry in the ProjectInfo.xml file, and everything worked fine :-).
Summary
I can now compile/link/debug in IAR. I can switch to Eclipse and do my advanced editing, add new components or configure the project, and the IAR IDE project will be in sync. So now I can use Kinetis Design Studio instead of the Driver Suite 10.4 with IAR. And if you are using Keil (see Using Keil μVision 5 with Processor Expert): I expect that it should work the same way too :-)
Happy IARing :-)
Published at DZone with permission of Erich Styger, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.
Trending
-
Understanding Data Compaction in 3 Minutes
-
Front-End: Cache Strategies You Should Know
-
DevOps vs. DevSecOps: The Debate
-
How AI Will Change Agile Project Management
Comments