Automate your ARM Cortex-M debug sessions [advanced GDB development and debugging]

Posted by Magnus Unemyr on Mar 3, 2017 1:56:37 PM

Debuggers are obviously created to help developers look inside the application as it executes in the target system. The whole point is to create an interactive, or semi-interactive, execution environment where the developer largely control the execution. But what if you want to completely automate the debugger? There are many use-cases where that is convenient.

In fact, this is possible using Atollic TrueSTUDIO. You can write script files that completely control the execution of the debugger. In effect, you can completely automate certain repetitive debugger tasks.

Read More

Topics: GNU tools (GCC/GDB), Debugging, Atollic TrueSTUDIO

Find Tricky Bugs With a Stack-Depth Analyzer [Cortex-M development with GCC]

Posted by Magnus Unemyr on Feb 2, 2017 10:48:17 AM

Embedded systems often include bugs developers have a hard time to find. One common cause of such tricky bugs are stacks that grow beyond their dedicated memory area, thus causing unpredictable behavior and a malfunctioning system. 

This is because the stack can overwrite important variable values, that thus inadvertently get the wrong value. Alternatively, a variable overwrite the stack, as the stack has expanded into the memory area dedicated to that variable. Upon the next function call return, the software crashes as it returns to the wrong location (the return address is stored on the overwritten stack and execution continues on a random location). Due to these reasons, stack related bugs often appear to be completely random, in most cases making them incredibly difficult to find.

If you use an RTOS running parallel tasks, these problems can multiply. Each task has its own stack, and with more tasks, you get more stacks that can cause stack related bugs. The stack depth analyzer in TrueSTUDIO Pro can help resolve such problems and help develop more robust systems. Read this blog post to learn more on analyzing the stack usage on Cortex-M systems developed with the GNU GCC compiler in TrueSTUDIO!

Read More

Topics: GNU tools (GCC/GDB), Software quality, Atollic TrueSTUDIO, Embedded Software Development

How To Debug the GNU LD Linker Configuration File [ARM Cortex-M Development]

Posted by Magnus Unemyr on Jan 11, 2017 9:00:00 AM

One of the most confusing things in embedded development can be the linker configuration files. Their grammar looks like something from the dark ages, and tends to genuinely confuse even seasoned software developers.

This is a bad thing since the linker configuration file is a common source of problems. To understand what the linker did to your code, you can study the MAP file, which is also hard to understand and cumbersome to use, so few developers do it. A build analyzer tool can come to your rescue and make you a more efficient developer!

Read More

Topics: GNU tools (GCC/GDB), Atollic TrueSTUDIO, Embedded Software Development

The Ultimate Guide to Reducing Code-size With GNU GCC for ARM Cortex-M

Posted by Magnus Unemyr on Nov 10, 2016 11:43:30 AM

The embedded industry has been talking about code size for decades. In particular, this discussion has applied to microcontroller compilers. Nowadays, more or less every C/C++ compiler on the market is very good at optimizations, and differences in code-size are pretty minimal in most cases.

Additionally, different compilers produce different results dependent on what source code you feed into it. And so, one compiler that beats the competition for one set of source code files may see itself beaten by another compiler for another set of source code files. But even so, there might be times when you want to optimize the code-size as much as possible. Read this blog post to learn how to do this with the GNU GCC C/C++ compiler for ARM Cortex-M!

Read More

Topics: GNU tools (GCC/GDB)

How to instrument the memory manager of your embedded system

Posted by Magnus Unemyr on Nov 3, 2016 8:30:00 AM

Many embedded developers do not use dynamic memory allocation; i.e. malloc() and free(). While there might be many reasons to use only statically allocated data structures - or your own memory manager, for that matter - there are still embedded developers using dynamic memory management. Some runtime library functions, like the full-blown printf(), use dynamic memory allocation internally too.

Part of the problem is malloc() and free() are pretty much black boxes – you don’t really have a lot of insights into how the memory is being used. A small hack can improve the situation. In this blog post, you will learn how to get analytics data out of the dynamic memory manager that comes with the GNU C/C++ compiler of Atollic TrueSTUDIO.

Read More

Topics: GNU tools (GCC/GDB)

ARM GCC: The ARM compiler for embedded developers

Posted by Magnus Unemyr on Sep 22, 2016 11:07:48 AM

In the past decade, there has been an unmistakable trend in the embedded industry towards the use of GNU build tools and open-source build management tools, such as the Eclipse IDE. The GNU ARM compiler and Eclipse also break development teams away from expensive vendor lock-in.

The ARM GCC compiler with its associated tools and the Eclipse IDE are freely available, of high quality, and are becoming the de-facto standard development environment in the software industry. This blog post will touch upon considerations of using the GNU GCC C/C++ compiler and associated tools for embedded systems development, for ARM-based projects and together with the ECLIPSE integrated development environment.

Read More

Topics: GNU tools (GCC/GDB)

ARM development: what do Cortex developers want from a modern IDE?

Posted by Magnus Unemyr on Sep 21, 2016 11:46:28 AM

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?

In this blog post, I will highlight some of the advances the embedded market has made in terms of the C/C++ IDE (including the compiler and debugger itself) – and in particular, what tool features are now available for ARM Cortex developers specifically.
Read More

Topics: ECLIPSE, ARM Cortex, GNU tools (GCC/GDB), Debugging, Embedded Software Development, Project migration, version control, issue management, editing

The embedded industry standardize on AGE

Posted by Magnus Unemyr on Aug 2, 2016 10:39:50 AM

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!

Read More

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

Interview with Richard Barry, the founder of FreeRTOS

Posted by Magnus Unemyr on Sep 2, 2015 1:37:00 PM

In my interview with Richard Barry, the founder of the FreeRTOS project, we get interesting insights into the history and future of FreeRTOS, along with his personal thoughts on where we are heading.

Additionally, Richard elaborates on IoT, real-time operating systems, embedded tools, and the challenges and future of the embedded industry in general.

Read More

Topics: ECLIPSE, GNU tools (GCC/GDB), RTOS, Embedded Software Development

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

Read our free eBook on how to develop interrupt handlers for Cortex-M devices

Posted by Magnus Unemyr on May 27, 2015 11:42:01 AM

Embedded development is a lot more complicated than PC development; the main reason being the low abstraction level and the tight relation to the hardware implementation. One particular pain point for new or inexperienced embedded developers is interrupt handling.

Interrupts are events generated by the hardware. Common causes for interrupts being triggered may be timers that expire, communications interfaces that receive data bytes, DMA transfers being completed, and so on.  The question then becomes how to develop interrupt handlers using the GNU/GCC compiler for popular Cortex-M devices like STM32, Kinetis, LPC or EFM32? Read our free eBook to learn more!

Read More

Topics: ARM Cortex, GNU tools (GCC/GDB), Embedded Software Development

7 steps to reduce GNU GCC code-size [checklist]

Posted by Magnus Unemyr on May 25, 2015 1:28:57 PM

The GNU GCC compiler and associated tools are of very high quality nowadays, in particular for the ARM Cortex cores. If you are a Cortex-M developer using popular device families like STM32, Kinetis, EFM32 or LPC, you are in a good position to use the GNU tools as your primary toolchain, as the GCC compiler and its various commercial distributions have excellent target support.

But what about code size optimizations? The GNU compiler for ARM produces highly optimized machine code these days. Still many developers report poor code size results with the GNU compiler. Why is that? In almost all cases, the reason is ARM developers new to the GNU GCC compiler do not know how to configure it correctly. Our free checklist 7 steps to reduce GNU GCC code-size show you how to do it right.

Read More

Topics: GNU tools (GCC/GDB)