In the last post, we started to examine how we could use the ThreadX trace capabilities to generate trace data that can be viewed using Percepio’s Tracealyzer. Tracealyzer visualizes the events that occur while the software is executing which provides developers with the ability to peer into the silicon and see how their software is actually running. Tracealyzer could be described as the oscilloscope for software developers…
Over the last several posts, we have been examining how to use the ETM to retrieve trace information that can be used to debug and verify application behavior. The fact is, the ETM is only available on the Arm Cortex-M4 parts. The Cortex-M0+ parts do not support ETM. How can a developer trace their application code then? Developers can use the trace facilities that are built into ThreadX to record important application…
In the last post, we setup our SEGGER J-Trace debug probe on the DK-S7G2 and setup a Blinky project using IAR Embedded Workbench (EW) for Synergy. We discussed a few potential warning messages that a developer might encounter when getting the ETM up and running. In today’s post, we will examine what information we can retrieve and how that can be useful to us when we want to debug our application or just verify that it…
In the last post, we started to examine the Embedded Trace Macrocell (ETM) that is included on the Renesas Synergy™ Cortex-M microcontrollers. In today’s post, I will show you how to setup and use the ETM to trace the Blinky with ThreadX application on a DK-S7G2 development board. I will be using the IAR Embedded Workbench (IAR EW) for Synergy to receive the trace information.
For this example, I am going…
There comes a time during the debugging process when a developer needs to pull out the “big guns” to debug and verify their embedded application. This can occur when a complex problem is encountered or when a developer wants to perform an in-depth analysis to understand how their software is functioning. When these situations arise, it may be time to consider using the Embedded Trace Macrocell (ETM).
The ETM…
Real-time operating systems (RTOS) are a great tool for developers that are looking to decrease complexity associated with timing requirements in a real-time application. They provide developers with
Sometimes though understanding the resources that are being allocated to an RTOS…
Debugging an embedded system can sometimes be really tough, especially if that system is a real-time system that cannot be halted. There are many methods that can be used to trace application data but two simple and easy to setup techniques are built right into e2 studio; the Real-time chart and the Visual Expression tool. In this post, we will explore how to use these tools and a few common pitfalls that should save…
In the last post, we saw how we could setup the Renesas Synergy™ toolchain to transmit character data over the ITM. This is useful but it would be far more effective if a developer could redirect printf to output directly to the ARM CoreSight ITM Live Trace Console. In this post, we will do exactly that!
The first step to redirecting printf is to decide the best way to go about doing so. In an Eclipse based IDE…
There are so many different advanced debugging techniques that are available to developers today that it is nearly impossible to select a good starting point. A great jumping off point though is to discuss the Instruction Trace Macrocell (ITM) since it can bridge the gap between traditional debugging techniques and more advanced techniques. As we discussed in the last post, the ITM is a hardware module that allows a developer…
In this series so far, we’ve been examining fundamental debugging techniques such as breakpoints, printf and assertions. The debugging capabilities available to developers in a modern microcontroller typically go far beyond these fundamental capabilities. The very toolchain that is being used and the microcontroller itself can determine the capabilities that are available to a developer. In this post, we are going to…
In the last post, we looked at assertion fundamentals. As you might recall, an assertion is a boolean (true/false) expression at a specific point in a program that will be true unless there is a bug in the program. In today’s post, we are going to setup assertions and use the Renesas Debug Console to monitor for a failed assertion.
The first step to setting up assertions is to enable printf capabilities. Several…
In the last several posts, we have been exploring debug capabilities related to setting up and using printf along with the real-time issues associated with it. There may be times in our software where we want to verify that conditions in the software are what we expect them to be. If the conditions are different, then a bug may exist in our software. In these instances, developers can use assertions. In today’s post,…
In the previous post, we discussed how the pros and cons of using printf in an embedded system and how it could be used to provide information to help debug software. During that post, we saw that a printf statement to the debug terminal in e2 Studio was taking a little more than 60 milliseconds. The reader may be wondering why a simple statement could be taking so much time to execute on a real-time processor running…
In the last post, we discussed how a developer can use advanced breakpoints to improve their debugging efficiency. We saw that there are different breakpoint types (hardware, software and flash) in addition to how we can trigger a breakpoint based on evaluating an expression. In today’s post, we will explore how to setup and use printf and discuss the advantages and disadvantages that come with it.
The printf statement…
The first line of defense used by embedded systems developers when debugging their software is to use breakpoints. Every developer knows how to create a breakpoint and step through code, but in many cases, developers don’t realize what’s happening behind scenes or that there may be more efficient methods available to them. In this post, we will examine how to use and manage breakpoints in the Renesas Synergy™ Tools environment…
Perhaps the greatest challenge facing embedded system developers today is debugging their software. Embedded systems have become complex and I’m not just talking about the software! Microcontrollers today are 32-bit processors, running upwards of 200 MHz with megabytes of flash and on-chip RAM. These chips have as much power and capability as full-fledged microprocessor systems that PC’s had back in the late 90’s. To…
In the last post on Transitioning to ThreadX®, we looked at several different techniques that can be used to minimize an ThreadX® based application for memory usage. In today’s post, we will examine several different techniques that developers can use to maximize their applications for performance.
First, a developer needs to recognize that a good RTOS will only use approximately two to four percent available…
In the last post, we started to examine the module guides by using the AGT module guide as an example. We saw that each module guides provides developers with important information such as:
This basic information helps a developer to understand the module and the pieces necessary…
At some point, after a painless and great experiencing developing a product based on the Renesas Synergy™ platform, it will be time to pass the product on to production and start the next big project. However, before that next project starts, developers need to put in place a way to program the production image into their product. There are several different ways this can be done such as
In the last post, we started to look at the Renesas Flash Programmer and how we could use it to connect to a Renesas Synergy™ microcontroller. We successfully connected the flash programmer, but now we need to use the utility to load our software onto the microcontroller. In this post, we will examine how we can go about loading our code through the flash programmer.
Before our application can be loaded onto the…
Nearly every embedded system requires that a developer dive into the linker file to parse out space for calibration data, look-up tables or even bootloader and application spaces. Despite modifying the linker file in most applications, developers are generally apprehensive and even intimidated by the linker file contents! All linker files are not created equal and the commands and structure for one compiler will rarely…
At one point or another, every developer has struggled to get a software module to work the way that they expect it to. Modern microcontrollers have graduated from the simple little 8-bitters into complex, feature rich 32-bit devices. We’ve all seen microcontroller datasheets that easily top two-thousand pages and are just warming up. Digging through and finding what is needed to initialize a peripheral can be daunting…
Improving Software Quality using the C-Stat Static Code Analysis Tool
The excuse that I hear the most from embedded software engineers about why they do not use a static code analyzer is that they are too expensive! The company doesn’t have the budget to purchase the static analyzer and if they do or if they do, they are too time consuming to setup and use. But first, what is a static code analysis tool? Simply put it…
Debugging a real-time application can be a daunting task for embedded software developers. In the good old days, systems were simple and bare-metal. A single developer could easily write every line of code for the application and still get the project delivered on-time. Embedded systems have changed. Products have become extraordinarily complex not just in their feature sets but in their timing and connectivity requirements…
A horrible moment that every developer has encountered at one time or another is when they compile their application only to discover that it doesn’t fit on their microcontroller. The application may have reached its RAM limits or maybe even its code size. One thing is certain, the developer is in for an optimization session. The question is where to begin? For the Renesas Synergy™ Platform, there are several different…