Embedded Connect is written by experienced Arrow engineers who are in the field working with a wide range of customers on a daily basis. They have a firm grasp on the latest embedded technologies, a passion for design, and a shared desire to help every Arrow partner guide innovation forward.
IDE Review: IAR Embedded Workbench for ARM
IAR Embedded Workbench provides an excellent development environment. It is a commercial integrated development environment (IDE) that contains all the tools for a very wide variety of manufacturers’ ARM-based microcontrollers. The interface is complex, but very flexible. It would take quite some time to know everything there is to know about this tool – but here are a few things that I have learned
The IAR system provides several menus in windows that can be docked or moved as the user desires. This is the standard for windowing type interfaces both on Linux and Windows. IAR also allows a user to add groups to the “Solution Explorer” and add files to each group. This feature allows a user to organize the project as he or she sees fit and to increase efficiency during project development. These groups are not associated with the actual file system, which can cause some confusion, but most of the time the user would arrange the file system the same way as the groupings they are using in IAR.
All the tools necessary to build embedded applications are present in IAR Embedded Workbench. The platform allows the user to set project-wide options for the compiler, assembler, and linker. This also applies to a grouping so that each group can have different compiler, assembler, and linker options. The options tabs also have a huge number of options allowing the user to get very fine control of exactly how the available tools work with the project and groups. All in all, I found this to be a very useful environment once I got used to where things are located and how they worked.
I was hoping to use the exact same code that I used in the Arrow Cloud Connect tool to provide a comparison of code size and execution time. However, after a few days of making small changes that amounted to a huge change in the code base, the code was still not compiling. So I decided to back up and punt. Lucky for us, Freescale offers several examples and a set of common drivers for each interface. This package is downloadable from Freedom Development Platform site on the downloads tab. I downloaded version 3 of the Sample Code Package and created a new project according to the Sample Code Guide for IAR included in the download. I already had IAR Embedded Workbench for ARM version 220.127.116.1185 installed. The optimization level is set to “low” and it defaults to using the C99 standard. The IAR tool would not generate code that could be loaded using the MSD Flash programmer as the Cloud Connect site did. However, the FRDM-KL25Z Quick Start Package, also available from Freescale at the Freedom Development Platform website, contains the OpenSDA Debug program. This program is loaded using the SDA Boot Loader mode, described in the Quick Start Manual, and allows the OpenSDA port on the board to be a debugger. Then I was able to load code and step through it locally.
Here are the numbers I collected from the new program:
- File size: 173K bytes
- 41 ticks to initialize the ADC or about 82ms
- 10 ticks to read the ADC value on channel 8 or 20ms
This is not quite what I expected. It took 315ms, which is a huge savings on time. It now takes about 20ms to read each time, which is about ten times the amount it took with the GNU compiler. The code size grew as well. I think this is because of different libraries and drivers for the ADC. Now it becomes easier to see the issue with comparing compilers… there are just too many variables in the equation!
What are your thoughts on the IAR Embedded Workbench? Leave a comment here to provide useful feedback for other readers looking for information.
Arrow Embedded Connect Blog - Registration Guidelines