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

Advertisements

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

Please Check Your License

The good thing with many vendors is: they offer development tools free of charge. And the limitations are typically reasonable for many projects. The Eclipse based CodeWarrior for MCU10 is not an exception: it comes in a free (‘Special’) Edition which allows up to 128 KByte of code to download for my ARM/Kinetis projects.

But, when I tried to debug an Example I have downloaded from the web, I get this dialog:

“Download size limit has been exceeded. Please check your license.”

Download Size Limit Has Been Exceeded

Download Size Limit Has Been Exceeded

Continue reading

A Shell for the Freedom KL25Z Board

I’m a big fan of physical UART/RS-232 ports on boards. So I was somewhat disappointed not to see a serial 9pin connector on the Freedom KL25Z board. But it is perfectly understood that for this price costs are critical, and a serial header or connector is pushing the budget for that board very likely out of the water. Still, I want serial connectivity for my applications.

Freedom Board with RGB LED

Freedom Board with RGB LED

Continue reading

Virtual COM/USB CDC for OSBDM/OSJTAG

Many new notebooks do not have a serial port any more: everything is USB. This can lead to problems (see USB or not: CDC with Processor Expert) as many embedded targets  use normal RS-232. In my classes I’m using the Tower boards: some Tower boards have an on-board 2 pin RS-232 header, e.g. the Tower TWR-MCF52259. Others like the TWR-K60N512 use the added TWR-SER board. The Tower boards have as well a USB capable S08JM60 which is used for debugging (OSBDM/OSJTAG), so why not using the OSBDM microcontroller as Serial-to-USB gateway?

Continue reading

CodeWarrior Flash Programming from a DOS Shell

I can do test automation or standalone flash programming using the Debugger Shell. But this requires me to use a view inside of Eclipse. What would be nice is to do such things from a lower level: from a Windows Command window (CMD or DOS Shell). This is possible with usage of Eclipse/CodeWarrior in command line mode.

Continue reading

Standalone Flash Programmer

In Scripting, the Debugger Shell and Debugger Shell: Test Automation I was exploring how to use the Debugger Shell for automation. For my lectures at the university I need to program multiple boards with the same application. I don’t want (and need) a debugger for this: all what I need is a ‘Standalone Flash Programmer’: the ability to flash one or multiple boards without debugging.

Continue reading

Show Workspace Location in the Title Bar

A central concept of the Eclipse framework is the concept of a workspace. The workspace holds project and project references, among with other settings. I’m using multiple workspaces all the time, and in parallel. How to know which workspace I’m using? By default, the CodeWarrior Eclipse IDE main window comes up like this:

Default CodeWarrior Eclipse Main Frame

Default CodeWarrior Eclipse Main Frame

Continue reading