TruePERSPECTIVES_logo.png

Top reasons why the embedded industry standardize on ARM processors, the GNU compiler and the Eclipse IDE

Posted by Magnus Unemyr on Apr 14, 2015 3:05:00 PM

It is currently a very strong trend in the embedded industry to standardize on ARM Cortex devices, the GNU gcc compiler (with its accompanying gdb debugger), and the Eclipse IDE. I call the ARM, GNU and ECLIPSE combo “AGE”.

What are the driving factors for this strong trend? And what are the benefits for embedded developers to jump on the ARM Cortex, GNU gcc/gdb and Eclipse train? In my opinion, there are many benefits that provide embedded developers with great advantages.

Read More

Topics: ECLIPSE, ARM Cortex, GNU tools (GCC/GDB), Debugging, Atollic TrueSTUDIO, Embedded Software Development, Project migration

Meet STM32F7 – The new Cortex-M7 based STM32 family

Posted by Magnus Unemyr on Apr 10, 2015 11:49:00 AM

The new ARM Cortex-M7 processor core is the most recent and highest performance of the different microcontroller cores in the ARM Cortex-M family. And as such, it outperforms for example the Cortex-M3 and Cortex-M4 on performance, while maintaining backwards compatibility.

Many semiconductor manufacturers have announced new Cortex-M7 devices, and one of the first out is STMicroelectronics, adding new Cortex-M7 devices to their STM32 family. The Cortex-M7 version of STM32 is called STM32F7, runs at 200MHz and initially coming with 512KB or 1MB of Flash memory and 320KB of RAM. And so, what can STM32 developers expect, when equipping their coming designs with the more powerful STM32F7?

Read More

Topics: ECLIPSE, ARM Cortex, GNU tools (GCC/GDB), Atollic TrueSTUDIO, SEGGER J-Link, ST-LINK

Cortex-M debugging: Measure execution time using SWV/ITM

Posted by Magnus Unemyr on Apr 10, 2015 10:22:00 AM

By now, I have written a large number of blog articles highlighting the advanced debugger capabilities offered by the Serial Wire Viewer (SWV) real-time event- and data tracing, available in Cortex-M devices, such as STM32 from STMicroelectronics, Kinetis from Freescale, LPC from NXP, etc. In this blog article, I will mention how the Instrumentation Trace Macrocell (ITM), which is part of SWV, can be used to measure the execution time of any-sized and any-partitioned blocks of code.

For example, you may want to know what the execution time is of a while{} loop. Or how long it takes from the user press the “Heat” button until the oven reaches a certain temperature in the code (perhaps detected by an if{} statement code line), or how long time it takes to execute 15 sequential lines  of code in a function. All these time measurement use cases, and more, can easily be accommodated using SWV/ITM in Cortex-M based devices, such as the widely popular STM32 or Kinetis microcontroller families.

Read More

Topics: ECLIPSE, ARM Cortex, GNU tools (GCC/GDB), Debugging, Atollic TrueSTUDIO, SEGGER J-Link, ST-LINK

STM32 debugging using the ST-LINK debug probe from STMicroelectronics

Posted by Magnus Unemyr on Apr 9, 2015 9:40:00 AM

Many STM32 developers use ST-LINK as their JTAG/debug probe. In particular, it is soldered onto many STM32 starter kits and evaluation boards, including the STM32 Discovery Kits and Nucleo boards. But it is also offered as a low-cost stand-alone JTAG/debugger probe as well.

So what debugging capabilities can you expect when hooking up the C/C++ debugger in your IDE to your STM32 board using the ST-LINK JTAG/debug probe? Considering its price, it is a very useful and convenient debug solution, but it also doesn’t offer the performance or all of the more advanced capabilities of for example the SEGGER J-Link or J-Trace debug probes.

Read More

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

Using GNU gcc/gdb and ECLIPSE with ARM Cortex devices: Is free tools right for you?

Posted by Magnus Unemyr on Apr 8, 2015 11:59:00 AM

As the embedded industry now standardize on the GNU C/C++ tools (gcc compiler and gdb debugger) and the ECLIPSE IDE, more tool options have become available in the last year or two. In particular, free or low-cost Eclipse/GNU tools are widely available on the market for Cortex-M devices like STM32, Kinetis and LPC. Also available are high-end Eclipse/GNU tools like Atollic TrueSTUDIO, supporting the same devices with many commercial add-ons. And so, which one to choose?

A question is if the free tools really are free, and if they offer what you need? Factors to consider are out-of-the-box experience, quality and support options, as well as productivity and functionality, and managing project risks. Different development teams may well have different priorities and answer to these questions. Let’s see what factors there are to consider.

Read More

Topics: ECLIPSE, ARM Cortex, GNU tools (GCC/GDB), Debugging, Atollic TrueSTUDIO, SEGGER J-Link, RTOS, ST-LINK

Cortex-M debugging: Performance optimization using SWV statistical profiling

Posted by Magnus Unemyr on Apr 8, 2015 8:00:00 AM

So, where do you hang out? Or rather, where do you spend your time? While this question may appear a bit personal, it is a valid question in terms of embedded software. Knowing where your application spends most time executing is the first step in efficient speed optimizations. Profiling your application to understand where it spends most of the time, is the best way to optimize performance the most, with the least efforts.

Say for example that your application spends 95% of the time in 3 C-functions, and the remaining 5% in another 125 C-functions. Then it is quite obvious you should spend your optimization efforts in the 3 functions that use most of the CPU time. While this 95% in 3 functions/5% in 125 functions ratio may appear to be a rigged and fairly extreme example, it really isn’t that uncommon. Usually, only a few C-functions use most of the CPU cycles. By analyzing what C-functions steal most of the CPU cycles, you know where to optimize for best results.

Read More

Topics: ECLIPSE, ARM Cortex, GNU tools (GCC/GDB), Debugging, Atollic TrueSTUDIO, SEGGER J-Link, ST-LINK

What is the best tool for professional STM32 development?

Posted by Magnus Unemyr on Apr 7, 2015 12:58:00 PM

I often get questions on what tool to choose for embedded development; and after a number of years in this industry I have learnt that no tool fits all, and that many developers have very different opinions on what is important. Additionally, different developers have different needs and skill levels too.

Having said that, I have also seen a large number of development projects and learnt what is important for most embedded developers, and how to approach the tool selection process. Last week, I again got the question on what embedded tools are best from a company looking for STM32 development tools. That triggered me to take a step back and think about how to select the right tools (for STM32, or any other ARM Cortex device like Freescale Kinetis or NXP LPC for that matter) from a slightly more philosophical point of view.

Read More

Topics: ECLIPSE, ARM Cortex, GNU tools (GCC/GDB), Software quality, Debugging, RTOS, Embedded Software Development

Cortex-M debugging: Oscilloscope style graphical data plot in real-time

Posted by Magnus Unemyr on Apr 7, 2015 9:35:00 AM

In my previous blog articles on Cortex-M Serial Wire Viewer data tracing, I have outlined how you can exploit real-time variable watch and Memory access history trace log capabilities in popular Cortex-M devices like STM32, Kinetis or LPC.

This blog article will extend upon this and show how you can visualize variable values graphically in real-time, using an “oscilloscope style” data plot graph as the Cortex-M target system executes at full speed.This gives developers instant and highly visual feedback, non-intrusively, from running target systems.

Read More

Topics: ECLIPSE, ARM Cortex, GNU tools (GCC/GDB), Debugging, SEGGER J-Link, ST-LINK

Cortex-M debugging: Memory access history trace log using SWV/SWO

Posted by Magnus Unemyr on Mar 31, 2015 11:35:00 AM

In my previous blog post on real-time variable watch using Serial Wire Viewer (SWV/SWO) tracing, I outlined how Cortex-M devices can feed advanced debuggers with real-time updates on variable vales as the target system executes at full speed. This is implemented using a hardware supported real-time data access trace capability, not using polling, and thus all variable reads or writes are truly detected (provided buffer overflows don’t happen due to bandwidth problems).

In this blog article, I will extend upon this and explain how this capability can also be used to provide a true memory/variable access history trace log; showing you exactly which reads or writes have been made to a memory location or variable. This is incredibly useful, if for example a variable is inadvertently getting an illegal value and you cannot understand where this value is written to the variable, or why.

Read More

Topics: ECLIPSE, ARM Cortex, GNU tools (GCC/GDB), Debugging, Atollic TrueSTUDIO, SEGGER J-Link, ST-LINK

Migrating from Eclipse/GCC to Atollic TrueSTUDIO

Posted by Mattias Norlander on Mar 25, 2015 6:46:00 PM

We get lots of questions from developers who are using "home-made" Eclipse / GCC development tools. They want to know if there is a simple way to migrate their legacy code into Atollic TrueSTUDIO. The answer is, 'Yes,' but there are several factors to consider.

This article highlights the major reasons to why many engineers eventually moves towards a commercial tool. It also suggest an easy migration path from an "home-made" Eclipse / GCC development tool to Atollic TrueSTUDIO.

Read More

Topics: ECLIPSE, GNU tools (GCC/GDB), Project migration

Cortex-M debugging: printf() redirection to a debugger console using SWV/ITM (part 2)

Posted by Magnus Unemyr on Mar 9, 2015 3:15:00 PM

In this third blog post on Serial Wire Viewer (SWV) real-time tracing, I will cover how the instrumentation trace macrocell (ITM) in Cortex-M devices (such as STM32, Kinetis, LPC, EFM32, etc.) can be used for multichannel console output re-direction such that the output goes to several different console windows in the debugger using the JTAG cable, offering separate console views for different parts of your S/W.

Before reading this article on multichannel console output using SWV/ITM, I recommend you first read the previous blog post on singlechannel printf() redirection using ITM, and perhaps also the general overview of SWV event- and data- tracing available in Cortex-M devices.

Read More

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

Cortex-M debugging: printf() redirection to a debugger console using SWV/ITM (part 1)

Posted by Magnus Unemyr on Feb 25, 2015 7:11:00 AM

 

In this second blog post on Serial Wire Viewer (SWV) real-time tracing, I will cover how the instrumentation trace macrocell (ITM) in Cortex-M devices (such as STM32, Kinetis, LPC, EFM32, etc.) can be used for printf() re-direction such that the output goes to a console window in the debugger using the JTAG cable, removing the need for any USB or UART cable.

My first blog post in this article series was a basic background and introduction to Serial Wire Viewer tracing, and starting with this article, I will cover the specific debugger capabilities that are enabled by SWV and its related technologies SWD, SWO and ITM. First out is this article on how to use ITM.

Read More

Topics: ECLIPSE, ARM Cortex, GNU tools (GCC/GDB), Debugging, Atollic TrueSTUDIO, SEGGER J-Link, ST-LINK