How to stay focused on your code

As developers, we are often faced with many distractions which can include tasks such as writing documentation, reading documentation and overcoming learning curves on new technologies. In this article, we will share some views on how you can avoid some of these distractions and how IAR Systems can help you stay focused on your code.

Few would argue against the notion that embedded systems development is quite difficult. When faced with a difficult task, it is important to stay focused on what you're doing. Keeping your focus on the task at hand is the best way to avoid bugs in your code that can be time-consuming to locate and very costly to fix.

It’s challenging to stay focused with a myriad of things competing for your attention: limited CPU resources, unique architectures and silicon errata. These things and others make embedded systems development more difficult to say nothing of issues like standards compliance. The way to stay focused through this gauntlet of issues is to have great tools that come with helpful support.

Learn how to benefit from documentation

User manuals for tools can be a source of time-wasting frustration. A common platitude is that “documentation is written for the people who already know how to use the tool”. In our opinion, that is not true and our global support team are here to help you quickly locate the information that you need. In addition to the well-organized documentation that comes with IAR Embedded Workbench, our website has a host of articles, tutorial videos, and recorded webinars. Additional information is available in our technical notes. Here you will find concise notes on topics such as architecture-specific compiler extensions, pointer syntax, how to integrate with revision control systems, how to interpret the linker map files etc. Other useful topics are about mixing C/C++, something that can be very useful in embedded systems; a list of diagnostic messages the tools can produce which is often handy to have as reference; how to remove startup code, a good thing to do when combining a bootloader and main application; how to create a library with an absolute location which is often necessary in safety critical systems; binary notation in C, there isn’t one but we do have an alternative; and many more.

When it comes to complying with standards, one of the hardest parts is putting together documentation of compliance for all the tools used to make your embedded design. The functional safety versions of IAR Embedded Workbench (available for ARM and Renesas RX) help by providing the development tools-related documentation required by standards such as IEC 61508 and ISO 26262.

Get help if trouble with the learning curve

Starting a new project can be difficult, especially if you're trying to learn both a new architecture and new tools at the same time. IAR Embedded Workbench comes with over 4000 examples which can not only help you get started quickly but can be used as a base around which to build your application.

One of the ways we can help in this area is to offer you to take advantage of IAR Systems’ support team. Our technical support engineers come from a variety of hardware and software backgrounds. Several of them have over 10 years of experience in the embedded design industry and some of them have been working on a consulting basis with embedded projects. So we know what you are going through when learning to fight new problems. Whether it’s an urgent issue or a small bug, they are always there to help you. Located in 10 different offices in Europe, Asia and the Americas, you always have a professional support team just a phone call or an email away.

Another way this can be ameliorated is through training. IAR Systems have several courses available on a multiplicity of topics including how to avoid common pitfalls in your development projects, troubleshoot complicated bugs and master the full functionality of our tools. Also available are courses in understanding the basics of embedded software design and how to design and develop projects on your own or as a part of a development team. All courses provide lectures given by experienced engineers and are complemented by practical exercises.

Get a high-performance development tool

One of the most important things a development tool can do for you is to produce efficient code. Efficiency can mean size optimizations to one engineer and speed optimizations to another, but either way, by using IAR Embedded Workbench, you have access to a highly optimizing C/C++ compiler that makes you produce more compact code. Our compilers allow you to tune optimization for size, speed or a balance between the two. By allowing the compiler to optimize your code for you, it is possible to save development time, since you don’t have to hand-optimize the code, and have a more efficient application in terms of code size and execution speed.

Another way to stay focused on your code is to have feature-rich debugging tools. Our debuggers support all the industry standard hardware debug probes to help you analyze your code as it runs on your hardware. RTOS-awareness plugins help you analyze your RTOS-based application for its use of common RTOS features such as timers, mailboxes, semaphores and tasks. Other analysis tools include stack usage analysis to help you estimate the amount of stack your application needs. Debugger features such as code coverage and function profiling aid you in determining what your code spends most of its time doing and where you need to focus your testing efforts.

Conclusion

At first, always stay focused on what you are doing. High quality products based on embedded microcontrollers can be achieved if the developer stays focused on the task at hand: writing the application. Another thing is to use good, high-performance tools so you are not inundated with unnecessary problems such as build-time errors, run-time errors and searching for knowledge of tools and architecture. Also, concise and well-organized documentation helps you find the information you need to be an effective product developer. And if you need further help or guidance with workarounds and other things, our support team is just a phone call away.

© IAR Systems 1995-2016 - All rights reserved.