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) 🙂
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 V188.8.131.5287. KDS is free of charge and unlimited, while there is a free IAR version (code size limited to 16 KByte for ARM Cortex-M0+).
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:
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 :-).
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 🙂