Software development is perhaps the most expensive endeavor undertaken by mankind. The simplest applications can cost as little as $15 per line of code (LOC) or for safety critical software as much as $1000 per LOC. Despite these steep costs, developers are often reluctant to invest in tools that would make development easier, more efficient and more robust! Instead, developers often choose to use open source environments and tool chains such as Eclipse and GCC that typically provide a basic tool set when compared to a professional tool such as the IAR Embedded Workbench® for Renesas Synergy™ which is now included in the Renesas Synergy™ Platform.

 

Developers using the Synergy Platform now have the choice to use E2 studio, an Eclipse based Integrated Solution Development Environment using GCC for ARM®, or IAR EW for Synergy with the IAR C/C++ compiler for Cortex®-M which comes with all the bells and whistles for a professional development tool. Both are included in the Synergy Platform and require no additional licensing fees or costs. Now that the cost playing field has been leveled and is no longer a factor, there are four important compiler features that should be taken into account that may just swing a developer to the IAR EW for Synergy compiler. Keep in mind that both development tools share the same level of guidance and assistance to create a Synergy Platform project such as configurators, pin mappers, and thread assignment utilities.

 

First, there is a noticeable performance difference between the resultant compiled code when using GCC versus the IAR EW for Synergy. In the SSP 1.1.0 datasheet, located here, in Chapter 15 there is an interesting MCU level performance test that was performed on MCUs from the  S1, S3 and S7 series using the two compilers. The test results, given in CoreMarks, represent the execution performance for the MCU and software with the higher the CoreMark® rating, the better the performance. Looking through and comparing GCC and IAR EW for Synergy using the same chip and clock frequency, the IAR compiler results in a performance improvement as much as 1.5 times that for GCC! That means a developer using the IAR EW for Synergy could get 1.5 times the performance from the exact same microcontroller! If you don’t believe me, check-out the warranted test results from Chapter 15 below:

 

 

Second, IAR EW for Synergy comes with code analysis tools that can be used to find bugs, verify performance and potentially even decrease development time. A few examples include C-STAT and C-RUN which are the static and dynamic code analyzers. C-STAT will discover potential issues as such dead code, missing break statements, implicit type conversions, lexical and syntactic issues with constructs from the C programming language that could result in buggy code. C-RUN will perform run-time checks on the code such as monitoring the heap for fragmentation issues, checking pointer boundaries and even checking for integer overflows, conversions and division by zero. The end result is application firmware that is more robust and less likely to have bugs.

 

 

Third, enhanced debugging capabilities. IAR EW for Synergy introduces developers to the opportunity to use development tools such as the IAR I-Jet®. The I-Jet can be used to perform tracing which allows us to see the instructions that are being executed on the microcontroller at the assembly level. There are even some cool tricks that can be performed such as measuring the current being drawn by the microcontroller and correlating it to the program counter. A developer with this information can relate current draw to a program area that allows energy optimization to be performed on the application.

 

Finally, and perhaps the most interesting aspect for using IAR EW for Synergy is that developers will be able to download a version for functional safety. The functional safety toolchain version is certified by TUV SUD according to IEC 61508 in addition to ISO 26262. Developers looking to develop safety critical applications will definitely want to use the IAR EW for Synergy over the GCC based tools. Stay tuned for further integration of functional safety capability with the SSP in future releases.

 

At this point you may be wondering how you can started using IAR EW for Synergy. Well, it’s quite simple and there is even a video that you can follow along with to make the process that much easier. The video is located at https://www.youtube.com/watch?v=u2b44JsLq4A.

 

Next week we will dive into Threads, drivers and frameworks.

 

Live long and profit!

 

Professor_IoT

 

 

Hot Tip of the Week?

 

IAR Resources for learning how to master the IAR Embedded Workbench

https://www.iar.com/support/#!?tab=resources