Device is secure?

It is one of these long weekends which allow to catch up on many things. One thing I finally completed was the move to FreeRTOS V7.1.1. With this I did some tests using the Tower boards, including the Kinetis one. So I have rebuild my Kinetis K60 application and was ready to flash the device. But then to my surprise I got this dialog:

Device is secure. Erase to unsecure?

Device is secure. Erase to unsecure?

Continue reading

Dump my Device Memory

Maybe this situation is familiar to you: My embedded software stopped in the field. I am in front of it, hooked up with my laptop and debugger. And I see: indeed, it has a problem. Maybe just a one-time-thing? Maybe I do a reset and things will work as expected? Not really, according to Debugging Rules.

The thing is this: I’m in a situation which requires some deep investigation. But I do not have the time now. Or my boss, the boss-boss or the customer are standing behind me asking all the good questions for which I don’t have an answer. So in this situation it would be great if you could take a dump of the device memory, reset that board, move on and investigate what happened offline? Here are several ways how to do this…

Continue reading

Flashing with a Button (and a Magic Wand)

In eclipse and CodeWarrior for MCU10 the usual thing I do is:

  1. I have a project in my eclipse workspace
  2. I compile and build it
  3. I download and flash it to the target for debugging

If I need to program another board with the same binary, then I download it to that board too. Fine. But what if I want to skip point 1 and 2? What if I do not have or want a project? All what I have (and need) is a binary file, and I want is to flash that file to my boar. By pressing a button.

Continue reading

Watchpoints: Data Breakpoints

Sometimes my embedded application is not doing what I want it to do. I can solve many problems with normal ‘step/stop mode debugging‘: setting breakpoints, step, stop, inspect data, and so on. But not always. If a piece of code is changing a global variable unintentionally, I do not know where to set my breakpoint. Something is changing my variable, and I have no clue from where. It could be a dangling pointer, a stack overflow or something similar which I cannot track down with code breakpoints. What I need is a breakpoint on data: watchpoints!

Continue reading

Programming part of flash

In many cases I do a full erase-flash-debug cycle: I get my embedded microcontroller flash completely erased and then programmed with my application. Well, that does not work that way if I program with a bootloader. Yes, I can flash the bootloader and then load my target application with the bootloader, but that’s not the scenario I want to use in the development phase. I want to flash my application and keep the bootloader on the target. This means: I need to do erase and program a part of the memory. But how to do this?

Continue reading

Traps&Pitfalls: Overlapping Interrupt Priorities

It happens to me that I run into a really, really nasty problem. I spend hours (if not weeks) to get it resolved. Strong coffee and the problem keeps me up at long nights. I think every embedded system engineer knows what I’m talking about. Yeah, most of the time it is my fault or an oversight. But once in a while I’m convinced that I have found a real bug. Then I report it back to the vendor to fix it. I hope my report will prevent another engineers to run into the same problem. Or that I learn something else as a by-product. Oh yes….

Continue reading

MCU10.2 Update 1.0.0 released

The update 1.0.0 for the MCU10.2 release has been published on the Freescale CW MCU V10.2 Updates & Patches web site. Downloading the 500 MByte zip file and installing the update will take a while. After downloading I select Help > Install New Software … and specify the archive file.

Note: In general uninstalling an eclipse update is not possible. If you want to keep our original MCU10.2 on the side, then follow this trick: Copy your existing MCU10.2 installation folder and rename it (say to ‘MCU10.2_without_update’). Then apply the update to the normal MCU10.2. If you want to revert to the version without the update, simple delete the updated installation and rename the one without the update again. No need to reinstall things again. And you can use both the updated version and the normal version in parallel too: simply launch the eclipse\cwide you want 🙂

Time to read the release notes and dig into what has been changed and improved.

Continue reading

Scripting: The Debugger Shell, Getting started…

(This is the first in an occasional series around the scripting in eclipse and CodeWarrior. Post a comment – let me know what you think!)

Writing code should be fun, and debugging it is just a necessity because I rarely get it right the first time. Eclipse with its GUI is a great thing, and so is a command line interface. Luckily the CodeWarrior eclipse engineers have added that kind of tool for the CodeWarrior debugger: the Debugger Shell as command line debugger using the TCL scripting language. This gives me a powerful way to deal with the embedded target board: from basic access to memory, to stepping and controlling the execution up to programming the flash memory.

Continue reading

Offline Registers

The eclipse based CodeWarrior for MCU10.2 comes with many unique extensions of the eclipse platform, implemented by Freescale. One of these featured mentioned in my post is the ability to inspect the registers in an offline mode: The Offline Register view. How is this different from the Registers view?

Continue reading

Problem Occurred: Flash programming with overlapping memory

My post in “An error occurred…”: Applied Debugging Rules gives some hints about how to isolate and solve some debugging problems. But here is a case where the tips did not help: I had this dialog with “Failed to resume target process” for my HCS08 project again:

Problem occurred
Problem occurred

Continue reading