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

Templates and Stationeries with MCU10.2

Classic CodeWarrior used the concept of ‘Stationeries’ or ‘Project Templates’: If I have a project which you want to use as a starting point for ‘Create new project’, then I moved that project into the ‘Stationery’ sub-folder of my classic CodeWarrior. When I did a File > New Project…, it showed up in the project wizard:

My own stationery project in the classic new project wizard

My own stationery project in the classic new project wizard

This is very useful if I have my corporate template or using projects in a classroom environment. How can I do this in eclipse and CodeWarrior for MCU10.2?

Continue reading

Using Parallel Builds: what is optimal?

One of the new features in CodeWarrior for MCU10.2 is the ability to build in parallel. Does not sound exciting? Well, when I tried this the first time in MCU10.2, I noticed immediately the reduction in build time: twice as fast compared to MCU10.1!!!. Wow! This improvement is based on using a make utility which can spawn multiple jobs on multicore host machines. CodeWarrior tries to use an optimized setting to make the build as fast as possible using parallel builds. The question is: is it really optimal?

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

FSL_USB_Stack updated: sending 16 or 32 byte blocks

The FSL_USB_Stack Embedded Component presented in “USB CDC, reloaded” has been updated to V1.004 and is available here. I was running into issues if the USB CDC stack had to send out either 16 or 32 bytes of data in the App_Task() function. In that case the data is not sent until the next USB_Class_CDC_Interface_DIC_Send_Data() request.

Continue reading