Removing Blank Lines in Eclipse

Many times I end up using source files from somebody else. And such files might have a lot of empty lines in it I want to get removed. The question is: how to get rid of empty or blank lines in the Eclipse Editor view? Or even better: how to merge multiple empty lines into one?

Continue reading

Escaping the Heat Wave

The summer is showing off, and a heat wave is rolling over Europe and Switzerland with temperatures above 30 degree Celsius. Knowing physics, a way to escape the heat is: going up. And this is what we did. The downside of this is: I postponed my exploration of the Freedom KL25Z board. So instead of a tech post, this is a picture post :grin:…

To Hochflue from Gätterli

To Hochflue from Gätterli

Continue reading

SMAC with Processor Expert

Freescale offers a free wireless SMAC stack  for their ZigBee and IEEE802.15.4 transceivers as found in the MC1321x (SRB and NCB) wireless kits, or as used on the MC13201 daughter card. The ‘S’ in SMAC stands for ‘Simple’. But it is not that simple to use that stack. So that’s why I’m using it transformed into a Processor Expert components. I have received recently requests and questions about it, and finally it is available on this site. If you are wondering for what it can be used, then read this post.

Created Tower Radio Card with MC13201 daughter board, SD card and Realtime Clock

Created Tower Radio Card with MC13201 daughter board, SD card and Realtime Clock

The stack is using the Freescale SMAC stack as base, and consists of four components: MC13192, SSEC, SPHY and SMAC. This post provides hopefully an entry point how to use them.

Continue reading

Changing the CPU with Processor Expert

I have an example project with Processor Expert and CodeWarrior. The problem I have is that I want to use it for another CPU derivative. So how can I migrate the project?

There are three different approaches:

  1. Change Wizard: In MCU10.2 there is the menu Project > Change Device/Connection. While this sounds promising, it only works for the very simple projects. And it does not change the project in-place: it simply creates a copy of the project and applies some (many times wrong) settings. So I do not recommend to use that option.
  2. New Project Wizard: For me in most cases this is the best way: this creates a new project for the new device, with everything set up correctly. In a second step I copy my source files and compiler settings (if I have changed them). The Processor Expert component I can transfer with using drag&drop.
  3. Changing the CPU: With Processor Expert, I can change the CPU. For this I add a new CPU to the project and change other settings (debugger, build tools settings) as needed.

Continue reading

Multitasking, or not?

This post by patoid just hit my (multitasking?) mind. It is about multitasking, and NO, not about RTOS scheduler and multitasking. Things are related, but not that much.

The problem is: how to be productive in today’s world? The world is running in parallel: many things happen at the same time. And I’m in the middle of it: phone calls, emails, meetings, somebody stepping into the room, discussions, multiple roles and jobs, piles and queues of things to, hard deadline for deliverables, changing priorities and a lot of things at the same (or no) priority, and interruptions on top of it. You name it.

Continue reading

Sports Timing System in a Lunch Box

The 2012 London Olympics are over. And I had my own special sports event last weekend. Although not part of the Olympics, it is part of the Switzerland Central Mountain Race Championship. This is a series of mountain running challenges. And no, I did not run the race. I love the mountains, and I love hiking in the mountains, but this is definitely for the greatest athletes. Instead to run the race, I have chosen to implement and run the timing system :-).

Athletes approaching the finish line

Athletes approaching the finish line

Continue reading

Tutorial: Timer (LED) with Processor Expert for Kinetis

In the ‘Pre-LDD age’, setting up a periodic timer event with Processor was really easy. With the concept of LED’s (see “There is a Time and Date for both Worlds”) things are a bit different. But once things are clear, it is not that hard. So here I’m doing a very exciting thing: blinking an LED using a timer! 😎

So I’m going to have an LED blinking every second. I’m using the TWR-K60N512 with an ARM Cortex-M4 and the Eclipse based CodeWarrior for MCU10.2. But it is easy to adopt it to any other Kinetis board.

Continue reading

Eclipse Debugging with Strings – Part 2

Maybe a better title for this post would be “Eclipse Debugging with Strings Attached’? Digging a bit more into the domain of string debugging, things are not always the way I wish they are.

I’m using here CodeWarrior for MCU10.2, which is based on Eclipse 3.6. Let’s use the following piece of code with the ARM Cortex-M4 Kinetis K60 core and the Freescale ARM compiler:

char buf[] = "abcd";
char *p = &buf[0];

unsigned char ubuf[]="ABCD";
unsigned char *up = &ubuf[0];

signed char sbuf[]="1234";
signed char *sp = &sbuf[0];

Continue reading

Eclipse Debugging with Strings

Here I am: past midnight, and debugging why my Kinetis ARM Cortex-M4 K60N512 application. So now you know what keeps me up at night :-). Stepping through some code which is using all kind of strings:

Debugging the K60 with Eclipse and CodeWarrior

Debugging the K60 with Eclipse and CodeWarrior

The challenge is: how to debug my strings?

Continue reading