14
A cross platform approach to Embedded Development How to simplify your embedded development project and get the results you really want.

A cross platform approach to Embedded Developmentpages.silabs.com/rs/silabs/images/E-Book - Embedded... · The final item to consider is then cross platform support in the development

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: A cross platform approach to Embedded Developmentpages.silabs.com/rs/silabs/images/E-Book - Embedded... · The final item to consider is then cross platform support in the development

A cross platform approach to

Embedded DevelopmentHow to simplify your embedded development project and get the results you really want.

Page 2: A cross platform approach to Embedded Developmentpages.silabs.com/rs/silabs/images/E-Book - Embedded... · The final item to consider is then cross platform support in the development

Table of Contents

Introduction

Chapter 1 –The Helpful Design Environment

Chapter 2– Streamlined Search

Chapter 3– Code Optimization

Chapter 4 – Simplifying Embedded Development

Conclusion

Page 3: A cross platform approach to Embedded Developmentpages.silabs.com/rs/silabs/images/E-Book - Embedded... · The final item to consider is then cross platform support in the development

IntroductionTwo of the biggest challenges encountered when undertaking a new embedded development project are:

Selecting the right microcontroller (MCU) that meets all of the application requirements

Implementing the design by writing the necessary firmware for that target MCU.

These challenges are further complicated by considerations for energy-conscious applications that must meet strict power-budget requirements - normally requiring extensive knowledge of the intricate inner workings of an MCU.

In the current embedded market, learning to use and configure a new MCU can take more time than allowed for in a routine project plan. Added to which, configuring an MCU to achieve data sheet performance specifications, especially headline power numbers, can be tedious and often seems to make embedded development more complicated than it ought to be.

The solution is a comprehensive development ecosystem.

In this e-book, we’ll take a look at some cross platform tools that run on major operating systems like Microsoft Windows, Mac OS X and Linux, that can really simplify some of the challenges when undertaking a new embedded development project.

12

Page 4: A cross platform approach to Embedded Developmentpages.silabs.com/rs/silabs/images/E-Book - Embedded... · The final item to consider is then cross platform support in the development

Helpful Design EnvironmentAs we mentioned in the beginning, you have two tasks going at this stage: the MCU selection process and the actual code implementation.

Due to the complicated inner workings of MCU structure, configuring an MCU to meet advertised data sheet specifications can be an extremely tedious and complex task. In fact, MCU vendors advertise power numbers that are often not easily reproducible since they use corner cases to optimize the presented numbers.

Using a low-power MCU as an example, you should be able to easily configure it to achieve the lowest power operation, enabling the longest battery life for our application. With a longer lasting battery, you can reduce the size of the battery and hence the end product costs, in addition to also give the product an edge over the competition.

The best way to accomplish such tasks is to use a comprehensive development platform, not just an integrated development environment (IDE).

Chapter 1

Page 5: A cross platform approach to Embedded Developmentpages.silabs.com/rs/silabs/images/E-Book - Embedded... · The final item to consider is then cross platform support in the development

“Software tools that provide solutions to the criteria above can simplify the development

process and reduce time to market.”

A comprehensive development platform should provide: A complete and educational view of available products

A quick and easy way to order or sample a device or kit

The ability to configure, develop, analyze and optimize code for a target MCU

Technical resources for development hiccups

Automatic updates to provide the most up-to-date documentation, software, and examples

Page 6: A cross platform approach to Embedded Developmentpages.silabs.com/rs/silabs/images/E-Book - Embedded... · The final item to consider is then cross platform support in the development

Streamlined SearchThe enormous selection of MCU products available in today’s market can seem overwhelming, and finding the ideal MCU can be a tough task. When searching for a target device, you typically have several design requirements for a system that can help guide their search.

Chapter 2

In this example, one could narrow the search to ARM® Cortex®-M3 MCUs that are optimized for ultra-low-power operation. This narrows the search to a handful of vendors, but still leaves questions open for which specific device to use.

To help you quickly narrow your search, a comprehensive development platform should include a search tool or educational resources to help educate you on a given MCU portfolio.

For example, a battery-powered application may require an energy-friendly MCU that can extend the battery life as much as possible while also providing a fast and efficient core that can handle computationally intensive operations.

A battery-powered smart watch is a good example of this type of power-sensitive application.

Misfit Shine Smart watch

Page 7: A cross platform approach to Embedded Developmentpages.silabs.com/rs/silabs/images/E-Book - Embedded... · The final item to consider is then cross platform support in the development

Today’s leading MCU suppliers offer extensive portfolios, making it challenging to identify the optimal MCU product for an embedded application. A searchable MCU development tool can help developers narrow their search to 10 to 20 MCUs after a few clicks of a mouse.

After you’ve identified the ideal MCU solution, you must consider the development cost and development time associated with the new MCU.

Obviously, using a legacy or known MCU requires less development resources, however, the latest MCUs may be able to achieve significantly higher performance or less power consumption.

A proper software platform should be able abstract the complexities and instead provide you with a portal to configure the device via checkboxes, drop-down menus and text fields.

Although this seems like a simple concept on the surface, development tools with this capability can significantly streamline design time, reducing time to market.

In addition to providing guidance, these software tools can provide error checking and intelligence through calculators that further ease the development process.

Chapter 2 – Streamlined Search

Ideally, your development tools should provide a graphical interface that doesn’t require you to

tediously read data sheets or application notes to determine how to correctly use a device.

Page 8: A cross platform approach to Embedded Developmentpages.silabs.com/rs/silabs/images/E-Book - Embedded... · The final item to consider is then cross platform support in the development

Graphical configuration tools should be able to resolve errors associated with pin configurations (pin out conflicts or mode settings), clock gating (if a peripheral is configured without enabling a clock to the module), or peripheral configurations. In addition to checking and resolving errors, calculators can also make development easier.

For example, configuring a baud rate field on a universal asynchronous receiver/transmitter (UART) may depend on the system clock and other register settings. Intelligent software tools will abstract that computation, allowing developers to enter the desired baud rate without consulting a data sheet or reference manual.

Chapter 2 – Streamlined Search

Figure 1. A graphical configuration tool

Page 9: A cross platform approach to Embedded Developmentpages.silabs.com/rs/silabs/images/E-Book - Embedded... · The final item to consider is then cross platform support in the development

Code OptimizationMajor concerns when developing MCU software are typically related to reducing memory usage and having the smallest possible code size. But for applications with a tight energy budget there are other software dependent factors that enter into the equation.

To achieve energy friendliness, aiming to spend the longest time in sleep mode is a very typical scenario, but it is not the only way to save energy. Energy-efficient MCUs are often packed with other functions that enable even lower energy consumption. In addition to the sleep modes available on these MCUs, efficient use of their functions is the real secret for energy sensitive applications.

As the development process moves forward, the code gets larger and optimizing for energy efficiency becomes a hard and time-consuming task. Without proper tools, identifying errors, such as avoidable wait cycles that could be replaced by interrupt service routines, or peripheral misusage, becomes increasingly difficult. If these "energy bugs" are not spotted and solved during the development stage it is virtually impossible to detect them in field or burn-in tests.

Chapter 3

Page 10: A cross platform approach to Embedded Developmentpages.silabs.com/rs/silabs/images/E-Book - Embedded... · The final item to consider is then cross platform support in the development

The most common way to track how much energy a system draws is by sampling the current over a certain period followed by averaging and extrapolation to longer time periods. This kind of measurement can be done using a multimeter or oscilloscope, but it is not possible to relate the results to code routines. On the other hand, a logic analyzer can be used to keep track of the routines but cannot relate that to the energy consumption. For battery life estimation purposes, the results obtained with extrapolation should not be too far away from a real-case usage scenario, but when you optimize the code for energy efficiency you really want to relate code with energy consumption using development tools.

For example, the ability to view a graphical output of current consumption quickly shows if there are any significant increases in consumption. Taking this a step further, having the ability to click on a point in the graph and profile the application (Figure 3) to show the corresponding line of C code associated with that current consumption is extremely valuable when you develop low-power applications. This means that a developer can trace spikes in the current consumption down to the specific lines of code that caused the spike, and then perform optimizations. Again, this “energy-aware” capability can be especially critical in battery-powered applications where every micro amp and even nano amp counts.

Chapter 3 – Code Optimization

Page 11: A cross platform approach to Embedded Developmentpages.silabs.com/rs/silabs/images/E-Book - Embedded... · The final item to consider is then cross platform support in the development

Graphical configuration tools should be able to resolve errors associated with pin configurations (pin out conflicts or mode settings), clock gating (if a peripheral is configured without enabling a clock to the module), or peripheral configurations. In addition to checking and resolving errors, calculators can also make development easier.

For example, configuring a baud rate field on a universal asynchronous receiver/transmitter (UART) may depend on the system clock and other register settings. Intelligent software tools will abstract that computation, allowing developers to enter the desired baud rate without consulting a data sheet or reference manual.

Chapter 3 – Code Optimization

Figure 3. A profiler associates system performance with the corresponding code

Page 12: A cross platform approach to Embedded Developmentpages.silabs.com/rs/silabs/images/E-Book - Embedded... · The final item to consider is then cross platform support in the development

When driving toward creating a final code image, developers will surely need some form of technical support or design resources. Comprehensive development ecosystems have integrated resource portals that allow developers to reach technical support, community forums, knowledge bases and applications notes within a single click.

This may seem like a minor point, but when your final code image is due the next week or day and you hit a design issue, quickly finding design support is absolutely critical. You do not want to waste time trying to find the correct support portal. In addition to support channels, providing developers with the most up-to-date information is key to make embedded development simpler.

This means that developers will always have the latest code examples, technical documentations, and software at all times. Ideally, a software development tool will provide with all the required support in one location. After solving these issues, developers move on to production-related questions, and this is covered in part 4 here.

Chapter 3 – Code Optimization

Page 13: A cross platform approach to Embedded Developmentpages.silabs.com/rs/silabs/images/E-Book - Embedded... · The final item to consider is then cross platform support in the development

Simplifying Embedded Development

In chapters 1, 2 and 3 we covered how we can select the “perfect MCU” for our application, and then initialization and optimization of our application code. We also looked at the benefits of having our development tool automatically show us relevant information and give us documentation and code updates.

The final item to consider is then cross platform support in the development tools we choose. A comprehensive development ecosystem can abstract complexities associated with firmware development, and at the same time enable the design team to use their favorite operating system. Maybe it’s a personal choice, but this little detail can help maintaining already established, as well as boosting the speed of the design team.

Although most developers only look at MCU specifications, we now know that the software development tools should not be overlooked. After all, an MCU’s performance is ultimately limited by us as developers, how well we utilize the feature set and how well the code we write performs.

If a developer does not know how to configure a device for the most efficient mode of operation, the capabilities of today´s MCU are potentially under-utilized. In addition, development costs can quickly balloon and impact the overall schedule and costs of a project. As designers, we should look for vendors that provide everything we need in a single software cross platform suite, that can simplify the design cycle, reduce development time, development costs and time to market.

Chapter 4

Page 14: A cross platform approach to Embedded Developmentpages.silabs.com/rs/silabs/images/E-Book - Embedded... · The final item to consider is then cross platform support in the development

Simplicity Studio

Silicon Labs offers a complimentary development ecosystem a that provides instant, one-click access to all your tools, software, news,

documents and resources. The software is now available on for Windows, Mac and Linux operating systems.

DOWNLOAD