Software and Hardware Breakpoints

Using breakpoints is central part of debugging. I’m usually debugging my applications in flash memory. Because nearly all the microcontrollers I use have on-chip flash memory, and have more flash than RAM. With debugging in flash I limited by the number of hardware breakpoints. And here is the advantage with debugging code in RAM: availability of ‘unlimited’ software breakpoints. But how does this all works, and how to make efficient usage of hardware breakpoints?

Continue reading

Watching Static Variables

Debugging static variables, especially ‘static locals’ is sometimes challenging. Especially ‘static local’ debugging depends on the compiler capability how they are encoded in to the object file. I have found out that at least with CodeWarrior for MCU and ARM/Kinetis this works straight forward. Only ‘Watch Expressions’ need special attention.

Continue reading

FreeRTOS with GCC, Cortex-M0+ and Kinetis KL25Z Freedom Board

Yesterday was my ‘lucky day’: My Kinetis-L Freedom board arrived :-). This board is really nice and features the KL25Z from the recently announced Kinetis L Family. And guess what is the first thing I want to flash on that processor? Yep: some FreeRTOS tasks. But to get there, a few important things have to be sorted out:

Continue reading

There is an ARM to Trace

When I added ‘support for ARM/Kinetis‘ to my bucket list in my Percepio+Trace post, I knew it will not be straight forward. But it was a lot harder than I thought. I had to burn many week-end hours. But finally I have Percepio Trace with FreeRTOS up and running for Kinetis and ARM Cortex-M4 with CodeWarrior for MCU10.2 :-).

Continue reading

Breakpoints with Special Effects

As promised back in Percepio, I want to have it ported and working with the Freescale Cortex-M4/Kinetis in CodeWarrior. That’s what I’m working on now, deep into the night. While doing this, I had to generate a lot of trace data, and I used the script I presented in that earlier post: Setting a breakpoint in the trace buffer wrapper event and then export the data. But there has to be an even better way, and indeed there is one: Breakpoints with Special Effects!

Continue reading

Debugging Global Variables

If I’m debugging my application in Eclipse or CodeWarrior, it shows in the Variables view the local and global variables of the current Thread and stack frame only:

Debug View with Variables View

Debug View with Variables View

This makes sense as this is usually where my focus is. And this is good from a performance point of view: The debugger does not need to read a lot of other variables from the target which I’m not interested in. But the question is: how to show the variables which are in other files if I really need to look at them?

Continue reading

Percepio FreeRTOS+Trace V2.2.2 released

Percepio has released a new V2.2.2 library of FreeRTOS+Trace (see Tracing with FreeRTOS+Trace from Percepio). The new release comes with many improvements. The trace recording is optimized for more efficient recording and longer trace with the same amount of memory.

Note: Because the trace data structure is changed and optimized, I need the latest tool on the PC/host from http://www.percepio.com.

I have updated the Percepio Processor Expert component to generate and use the new trace library V2.2.2. This includes the new settings in the component properties as shown below:
Continue reading

Killing Me Softly: Zombies and Debugger Engines

I’m stressing the CodeWarrior debugger a lot: having multiple boards attached, debugging things in parallel, switching and unplugging boards all the time. I have my eclipse IDE running for several days and nights (up to a week or more), with constantly suspending and resuming and switching networks. And sometimes it is my fault (see Device is Secure?). But well, sometimes the CodeWarrior debugger has a problem too. Luckily, a simple trick gets things back on track.

Continue reading