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?
Tag Archives: Tips&Tricks
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.
Switching Source Files in the Eclipse Editor (CTRL+TAB)
Ever wondering what could be a keyboard shortcut for something in Eclipse? In my post on 10 Best Eclipse Shortcuts the question came up how to traverse through all the open files in the editor. Finding a shortcut is easy if you know the The Mother of all Eclipse Shortcuts :-). I press CTRL+3 and enter a search term like ‘switch’, and it shows me all shortcuts with ‘switch’ in the description:
Filter my Problems
In CodeWarrior and Eclipse, the Problems view shows all kind of messages, from all open projects in the workspace. That way I have especially all the build messages in one view. The Problems view keeps the messages listed, until I have them resolved. By default, if I have multiple projects open in my workspace, it will show all the messages of all projects:
With many messages and many projects, that might be overwhelming, as messages can be mixed for different projects and files, especially with parallel build enabled. How to change the settings to have the messages listed just for a single project?
Customize my Workspace Perspectives
Eclipse and CodeWarrior are great. But as with most great things, they get even better if I can customize it for my needs. As outlined in my earlier posts (Eclipse Full Screen Plugin, Hide and Show Eclipse Toolbar, Maximize Eclipse Views) there is already great flexibility.
Eclipse Full Screen Mode Plugin
The great thing with blogging is: I receive great comments, questions and ideas. The great thing with Eclipse/CodeWarrior is that the extensions are almost unlimited :-). For my earlier post on hiding the toolbar I received a tip for another way which even is better: a plugin to switch Eclipse into full screen mode. Here is how to install it and how it looks…
Maximize Eclipse Views
As outlined in my earlier post about hiding the toolbar: it is important to me that I have a flexible way to use my screen real estate. There is another thing I need frequently: I’m using a small Eclipse window like this one:
Hide and Show Eclipse Toolbar
Screen real estate is important to me. Especially working on a small notebook screen I want to get the most out of it. And I know: all the cool (and fancy) UI items in Eclipse have a price.
So how to get more space for important things like my source files? Eclipse has feature to hide the toolbar completely. For this I simply use the context menu and select ‘Hide Toolbar’: Continue reading
CDE Hacking: Components with Multiple Files
Typically a Processor Expert component creates two files: a header file and a source file. That’s fine for normal drivers. But this does not work well for more complicated things like an RTOS or communication stacks: these are built from a whole set of source files. So how can I generate multiple files with a Processor Expert Component?
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!

