Our friend Jacob Beningo is a well-known lecturer in the embedded space. This month he will host a webinar sharing his experiences on designing secure bootloaders for MCUs. He will use an STM32 Nucleo board and Atollic TrueSTUDIO develoment tools.
Most software developers are used to execution time profiling, where the execution time of different C functions are measured and visualized - usually as bar graphs with timing information added to the bars. But what if you want to measure the execution time of a code-block that is not exactly one complete function - and one function only?
Say, you want to measure the execution time of a block of code (for example, 15 lines of C code) somewhere deep within a function, or the time it takes from a push-button is clicked to some result is achieved. In the first example, you only want to measure the execution time of a small part of a C function, and in the latter example, you want to measure the execution time between two events across many functions. In neither of these cases, traditional execution time profiling is of any help. Luckily, you can easily do this using SWV/ITM tracing on Cortex-M microcontrollers. This free video tutorial show you how!
In terms of ARM development, many software developers spend a major part of the work week in front of their ARM development tools; primarily the IDE with its integrated C/C++ compiler and debugger. How does a modern ARM IDE compare to what embedded developers were using a few years ago?
Old habits can prevent you from making progress. It is often said that even after a long time, you only use the features of a software product you tried when you first installed the product. And so, many ARM Cortex developers still use only basic methodologies like single-stepping, running to breakpoints, and printf() debugging - despite having much more powerful capabilities already installed in their tools.
Make sure you don't fall behind other embedded developers - read this whitepaper to find out what great time-saving and quality-improving capabilities smart developers enjoy!
The embedded industry has been incredibly fragmented for decades, resulting in inefficiencies and vast duplication of efforts. Small processor core ecosystems had to duplicate commodity "me-too" functionality instead of providing differentiation and innovation. With a plethora of competing CPU cores, the market was full of isolated islands with proprietary microcontroller architectures and their incompatible tool and middleware ecosystems. But finally, the embedded industry is coming of age. In fact, it now standardises on AGE!
Supporting a new MCU target with Atollic TrueSTUDIO is much easier if you can import a working project. Did you know that NXP lets you build a customized Kinetis SDK ready to use in TrueSTUDIO?
Kinetis SDK is a collection of comprehensive software enablement for NXP Kinetis Microcontrollers that includes system startup, peripheral drivers, USB and TCP/IP stacks, middleware, and real-time operating system (RTOS) kernels. The Kinetis SDK also includes getting started and API documentation along with usage examples and demo applications designed to simplify and accelerate application development on Kinetis MCUs.
Embedded debugging has undergone a revolution thanks to innovations in the hardware and development tools. Gone are the days when you were forced to use command line debug and when you had to rely on blinking LEDs and printf() statements. Today's developers can take advantage of new data visualization and analysis tools that can help you quickly diagnose system problems in real time.
If you are developing for a Cortex-M target we'd like to introduce you to some ways to help you take your debugging to another level: find bugs more easily, and get new insights into the behavior of your system. Over the past year we have written a series of blog articles that will give you a good introduction to some of these easy-to-use tools and techniques.
Creating an optimized system is not always easy; there are so many places bottlenecks can occur, and understanding how the different parts of the system behaves are not always trivial.
The solution is called execution time profiling, that helps you measure how long time different parts of the system executes. Most Cortex-M devices enables execution time profiling without any expensive debug hardware, thanks to Serial Wire Viewer (SWV) event tracing.
Embedded development is difficult, and embedded debugging may be even more so. Thus it is important to use the best tools in your toolbox. It appears to me that many Cortex-M developers are not fully aware of the powerful debug capabilities included in their Cortex-M based microcontrollers, like STM32, Kinetis, LPC or EFM32. This is valid for the super-useful Serial Wire Viewer (SWV) real-time event and data tracing capabilities, but perhaps even more so, the hard fault crash analyzis capabilities integrated in the Cortex-M core.
For example, our Atollic TrueSTUDIO debugger includes a hard fault crash analyzer, which detects hard-to-find runtime errors during full-speed target execution. Perhaps your system crashes a couple of times every week due to a sensor reading out-of-range values, causing a pointer error to bring the CPU to a hard fault due to accessing illegal memory or on misaligned address boundaries. Or your code performs a division by zero, once a week. These types of problems can be really hard to find and solve.
Despite the summer holidays being in full swing, our development team have today launched a new version of Atollic TrueSTUDIO, v5.3.1, which is a first-class C/C++ compiler and debugger IDE for professional ARM Cortex developers.
In particular STM32 and Kinetis developers will benefit from this new release, thanks to the improved integration with Freescale's ProcessorExpert software configuration tool, as well as extended target support for STM32 and Kinetis families. The new release includes improved support for Cortex-M7 targets too.
ARM Cortex-M processors like STM32, Kinetis or EFM32 support live variable watch, a debugger feature that update the variables in a watch view in (almost) real-time as the target system executes at full speed. This feature is incredibly useful and can quickly help identify many bugs. Still, it appears many Cortex-M developers are not aware of this important debug capability.
I wrote another blog post on this topic some months ago, but I keep getting questions on the subject so I will cover live "real-time" variable watch once more. I would argue this capability is so useful and important, that professional embedded developers should not use an IDE without this ability. Let’s see how live variable watch debugger windows can be useful.