TruePERSPECTIVES_logo.png

Does history matter to embedded developers - and what do ETM have to do with it anyway? [whitepaper series]

Posted by Magnus Unemyr on Aug 19, 2016 8:30:00 AM

Have you too spent days trying to find the bug that just can't happen, but still do? And found no evidence whatsoever as to why it happened? By using the methods and tools outlined in our free ETM/ETB tracing whitepaper, you can easily record and analyze execution history, and solve that "million dollar bug" in popular Cortex-M microcontrollers such as STM32, Kinetis, LPC, EFM32, XMC, etc.

Our free whitepaper on ETM/ETB instruction tracing describes how to record and analyze execution history using Cortex-M microcontrollers, using trace-enabled debugger probes like SEGGER J-Trace for ETM or any debugger probe for ETB on compatible devices. Read the whitepaper now!

 

Read More

Topics: Debugging

Don't be blind: Learn real-time system analysis [whitepaper series]

Posted by Magnus Unemyr on Aug 18, 2016 9:05:49 AM

Our free whitepaper on Serial Wire Viewer (SWV) describes how to perform real-time event- and data tracing using Cortex-M microcontrollers, by exploiting the SWD/SWV/SWO/ITM technologies supported by popular Cortex-M devices, and JTAG probes like SEGGER J-Link and ST-LINK.

By using the methods and tools outlined in this whitepaper, you can easily analyze performance bottlenecks, interrupt and exception behaviour etc. in popular Cortex-M microcontrollers such as STM32, Kinetis, LPC, EFM32, etc. Additionally you will learn how to watch variable values in real-time, analyze problems using the data access history log capabilities, as well as redirecting printf() output to the debugger using a JTAG cable. Read the whitepaper now!

Read More

Topics: Debugging

Don't be clueless when your embedded system crashes [whitepaper series]

Posted by Magnus Unemyr on Aug 17, 2016 11:10:42 AM

We have all been in the same situation. Your excellent code crash the CPU under mysterious circumstances. You have spent days trying to find the bug, until your eyes are bleeding. Still no joy. And you write perfect code anyway, so nothing could be wrong with the code. Right? Still, your system sometimes crash. How annoying.

Single-stepping may not reveal the bug; perhaps a sensor sometimes returns an out-of-range error, or a pointer error somewhere else overwrite memory, thus causing a corrupt runtime environment. Don't spend days trying to find the cause! Learn to use the Cortex-M hardfault crash analyzis capabilities - learn how in this free whitepaper!

 

Read More

Topics: Debugging

Are you aware of the most powerful weapon in your debug arsenal?

Posted by Magnus Unemyr on Aug 1, 2016 11:28:12 AM

Most ARM Cortex-M devices include a debug technology called Serial Wire Viewer, or SWV. This technology enables very advanced and super-useful debug capabilities at low additional hardware cost (in the microcontroller itself). In fact, you probably already have it.

However, many embedded developers are unaware SWV exist, or don’t know how to use it. If you are a Cortex-M developer, and don’t yet use the SWV capabilities in your debugging, you really ought to read this blog post!

Read More

Topics: Debugging, Atollic TrueSTUDIO

Why embedded developers need to understand Special Function Registers (SFRs)

Posted by Magnus Unemyr on Jul 25, 2016 10:36:45 AM

What is the difference between PC/web developers and embedded developers? Both categories have their unique challenges. But - I would argue (and I am sure someone will react strongly to this) that embedded developers need to have a much more detailed knowledge than developers targeting PC's. PC and web developers on the other hand, often have other concerns - like user load scalability.

Coming from a PC development background into the embedded space about 25 years ago, I had to face "strange" concepts like bootloaders, interrupt vector tables and interrupt handlers, linker configuration files, special function registers, flash programming, and a whole set of offer magic stuff I had never heard about during my earlier years as a PC developer.

Not to mention it wasn't possible to debug the system in a way that was nearly as convenient as it was on a PC (at the time, Borland had just introduced a debugger in its Turbo Pascal IDE, providing a modern debugger experience at an affordable price for "the masses" for the first time).

One of the key concepts any embedded developer needs to grasp, is the Special Function Registers (SFR's) mentioned above. What are they, how do you use them, and why do every embedded developer need to master them perfectly?

Read More

Topics: Debugging

New Tools and Techniques for Cortex-M Debugging

Posted by Stephen Martin on Feb 29, 2016 11:31:50 PM

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.

Read More

Topics: ARM Cortex, Debugging, Embedded Software Development

Use profiling to avoid system bottlenecks [advanced Cortex-M debugging]

Posted by Magnus Unemyr on Jan 18, 2016 1:46:06 PM

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. 

Read More

Topics: ARM Cortex, Debugging, Atollic TrueSTUDIO

How to perform runtime error checking on Cortex-M devices

Posted by Magnus Unemyr on Dec 18, 2015 9:17:47 AM

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.

Read More

Topics: ARM Cortex, Debugging, Atollic TrueSTUDIO, SEGGER J-Link, ST-LINK

What is an RTOS and why should I use one? [free eBook]

Posted by Magnus Unemyr on Aug 26, 2015 11:20:00 AM

Many embedded developers use a real-time operating system in their Cortex-M designs. But what do an RTOS do and why do you need one in your product?

In our new free RTOS eBook, you will learn more about what a real-time operating system is, the benefits and components of an RTOS, including explanations of key concepts like tasks, scheduling models, context switching, latency and more.

Read More

Topics: Debugging, RTOS

Atollic TrueSTUDIO v5.3.1 has been released!

Posted by Magnus Unemyr on Aug 11, 2015 2:12:07 PM

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.

Read More

Topics: ECLIPSE, ARM Cortex, GNU tools (GCC/GDB), Debugging, Atollic TrueSTUDIO, RTOS

Real-time "live" variable watch on Cortex-M processors [debugger tips]

Posted by Magnus Unemyr on Jul 28, 2015 11:38:00 AM

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.

Read More

Topics: ARM Cortex, Debugging, Atollic TrueSTUDIO, SEGGER J-Link, ST-LINK

ARM Cortex devices are increasingly becoming dual-core: Are you ready?

Posted by Magnus Unemyr on Jul 20, 2015 1:16:00 PM

More and more ARM Cortex devices are dual-core, such as NXP’s LPC4300 with its Cortex-M4 and Cortex-M0 combo, or Freescale’s Vybrid equipped with Cortex-A5 and Cortex-M4 cores. Embedded systems using dual-core devices are typically fairly sophisticated, with an increased application complexity, which increases debugging difficulties compared to single-core systems as well.

Embedded systems developers moving from single-core to dual-core devices then ask: How do you develop and debug an embedded system using a dual-core processor? From a code development point of view, it is fairly easy. Just create two different projects in your ARM Cortex C/C++ IDE, and create each application project as if the device was a single-core processor. But how to debug asymmetric dual-core devices where the cores are not even using the same CPU core?

Read More

Topics: ARM Cortex, Debugging, Atollic TrueSTUDIO, SEGGER J-Link