Export and Import Processor Expert Component Settings


When I create a new Processor Expert project for a board I already have the components configured, then an easy way to transfer components from one project to another is to copy-paste the components. In the ‘source’ project I select the components I want to use, choose Copy (or CTRL+C shortcut on Windows):

Copy of Processor Expert Components

Copy of Processor Expert Components

Continue reading

Eclipse Performance Improvement Tip: Close Unused Projects


Eclipse is not the fastest and snappiest IDE of the world, but in my view the most versatile and open one. And as with any tool: using it the wrong way does not make it better. Sometimes I have students in my classes which complain that Eclipse is slow, even on a decent machine. Looking at their notebook screens and Eclipse workspace usually tells me right away what they are doing ‘wrong’: there are many, many projects open in the workspace, the most I have seen was more than 50 projects (yikes!!!)!

Many many projects open

Many many projects open

Continue reading

Printing Code Size Information in Eclipse


For the GNU ARM tools it is easy to print out the code and date size information, see

But this is all for ARM cores. What if I use other architectures like S08 or ColdFire in Eclipse?

Code Size Information in Build Console

Code Size Information in Build Console

Continue reading

Using the FRDM-K64F with CodeWarrior


The new flagship of FRDM boards is the FRDM-K64F board. After FTF I have explored different ways debugging the board, and received many comments and questions about it (thanks!). Freescale announced the supports with the new Eclipse based Kinetis Design Studio (KDS). But until KDS is out, how can I use the FRDM-K64F board with CodeWarrior?

Debugging FRDM-K64F Board with CodeWarrior for MCU v10.6

Debugging FRDM-K64F Board with CodeWarrior for MCU v10.6

Continue reading

Tutorial: Thermal Printer, Part 1: Hardware Setup with FRDM Board


One of my embedded projects is to measure the running time in a sports event (see “Sports Timing System in a Lunch Box“). The recorded time is stored in an EEPROM plus sent over USB or wireless connection to the host. It would be great if I could print out the time and ranking directly, so if there is no PC, the system can be small and tiny. So here is my next project and tutorial: Printing with the Freedom board!

Hello World on the Printer with FRDM-KL25Z

Hello World on the Printer with FRDM-KL25Z

Continue reading

Generating Static FreeRTOS Source Code


Using Processor Expert is an awesome tool: it generates source code for me, and I can can ‘dynamically’ tune my projects to my needs. Still, sometimes it is better or desirable to have a ‘normal’ or ‘static’ project. This is very well possible with Processor Expert (see “Sneaking from Processor Expert” or “Disable my Code Generation“): I can generate the code one time, and then use it without Processor Expert.

To make this even easier, I have added an option to the FreeRTOS Processor Expert component to generate ‘static’ code I can copy-paste to projects and tool chains which are either not supported by Processor Expert, or just for ‘static’ projects.

FreeRTOS Custom Port Settings

FreeRTOS Custom Port Settings

Continue reading

First Steps with the Freescale TWR-K64F120M


Naturally, I have several project ideas lingering around. No time to make them all (for now). One of it is interfacing the Raspberry Pi camera with a microcontroller. To store the images, I need plenty of RAM on the device, and so far the Kinetis microcontroller did not have that. Finally, Freescale announced the K64F120 a few months back, and my ordered TWR-K64F120M board arrived on my desk, waiting to be used: Finally I get an ARM Cortex-M4F with 1 MByte of FLASH and 256 KByte of RAM :-).

TWR-K64F120M Box

TWR-K64F120M Box

Continue reading

CriticalSection Component


I have created and published on GitHub a new component ‘CriticalSection’:

Critical Section Component Methods

Critical Section Component Methods

This component is a wrapper between my components and the problematic current implementation in Processor Expert (see EnterCritical() and ExitCritical(): Why Things are Failing Badly). It uses a flexible approach and uses macros to either use my modified version of EnterCritical() and ExitCritical(), or simply defaults to the original implementation.

Continue reading

FRDM with Arduino Ethernet Shield R3, Part 3: Embedded Web Server


This is Part 3 of an ongoing tutorial to use the Arduino Ethernet Shield R3 with a Freescale FRDM-KL25Z board (or any other board you like).

In Part 1 I worked on the SD card, in Part 2 I have added basic network connection. Now time to run a web server with my FRDM-KL25Z :-). With this, I can get access to my board through the network, and the board will host a web page where I can do pretty much everything: showing status, or adding functions to turn on things like an LED 🙂

Web Server with W5100 on FRDM-KL25Z

Web Server with W5100 on FRDM-KL25Z

Continue reading

RNet: optional ACK, Dynamic Payload and Extended nRF24L01+ Driver


Time to write an update about the RNet Wireless Stack. The stack has been successfully used for the Sumo Robots as wireless controller. In the last week, there has been a lot smaller and larger extensions for it. And because the nRF24L01+ modules are so inexpensive, I bunkered more than 50, with 20 still left to be deployed:

nRF24L01+ Transceiver Modules

nRF24L01+ Transceiver Modules

Continue reading

FreeRTOS for the Freescale DSC 56F8400 Core


Yes, I have been busy with all the different ARM Cortex Mx cores I’m using in my projects. But beside of the ‘ARM domination of the world’, there are other interesting processors out there. While the ARM cores have added DSP (Digital Signal Processing) capabilities blurring the boundaries between pure MCU and DSP processors, there is still a place (or niche?) for specialized DSP processors. The power of such processors is in the domain of fast signal processing, e.g. for intelligent power switches or for advanced motor control.

TWR-56F8400 Board and Box

TWR-56F8400 Board and Box

Continue reading

Workaround for Processor Expert ‘Components’ View Synchronization


CodeWarrior for MCU10.5 comes with a new Eclipse and new Processor Expert. Things are working very well so far. But I have spotted an issue which seems to be related to the new Eclipse Juno used: sometimes the Processor Expert ‘Components’ view is not correctly showing the current project used.

Continue reading

S-Record Manipulation with GNU objcopy and Burner Utility


In my earlier post “S-Record Generation with gcc for ARM/Kinetis” I documented how to have the ARM GNU gcc toolchain to produce a S19 (Motorola (or now Freescale) S-Record) file. Here are a few more tips on that subject:

  1. Changing length of S-Records
  2. Only using 32bit addresses
  3. Combining S19 files

Continue reading

First Set of nRF24L01+ Wireless Sensor Nodes with FRDM-KL25Z


If you were wondering why I am pushing the FRDM-KL25Z boards hard to the micro-amps, then have a look at this:

nRF24L01+ Network Nodes

nRF24L01+ Network Nodes

The five boards are the first set of prototypes with a FRDM-KL25Z for a battery operated wireless sensor network based on the nRF24L01+ 2.4GHz transceiver.

Continue reading

Eclipse Command Line Code Generation with Processor Expert


Eclipse based IDE’s have typically one limitation: the IDE has not much scripting capabilities. Yes, I can use things like JUnit for testing, but if it comes to build and debug C/C++ applications, then support gets really rare. An exception to this is CodeWarrior for MCU which features a command line version of the IDE which can be used for test automation as I used it in one of my tutorials. What I missed so far is to have a command line interface for Processor Expert to generate code. This is now possible with CodeWarrior for MCU10.5 :-).

Continue reading

USB for the Freescale ARM Kinetis KL46Z and K21D50M


As I was so pleased with the FRDM-KL46Z board, that I have ordered the Tower version of it, the TWR-KL46Z48M:

FRDM-KL46Z with TWR-KL46Z48M

FRDM-KL46Z with TWR-KL46Z48M

What I missed so far was USB support for the KL46Z. So time to have a quick look at board(s) and to add USB support for it.

Continue reading

Driver for Microchip 24xx Serial EEPROM


For many projects I need to store configuration or sensor data. For this I’m using either an SD card or program the internal flash memory of the microcontroller. Using the internal flash is a good thing as it does not need an external component. However, the typical number of programming cycles is limited to 10k-50k which is a limiting factor if data has to be recorded over a long time or very often. That’s why I’m using the very popular external 24xx external EEPROM devices from Microchip.

24LC512 connected to FRDM-KL25Z

24LC512 connected to FRDM-KL25Z

Continue reading

Using the FRDM-KL25Z as a USB Mouse Device


I finally completed my project turning the FRDM-KL25Z board into a USB mouse device :-). The form factor and the capabilities of the Freedom board makes it a great board for implementing it as a ‘custom mouse’. All what I need is the USB stack running on it and have it acting as USB HID Mouse device.

FRDM-KL25Z enumerated as USB HID Mouse Device

FRDM-KL25Z enumerated as USB HID Mouse Device

Continue reading

Tutorial: Ultra Low Cost 2.4 GHz Wireless Transceiver with the FRDM Board


For my embedded systems lecture I need a wireless connection to the robot we will develop during that course. So far I have SMAC (IEEE802.15.4) and Bluetooth worked out. But that IEEE802.15.4 (ZigBee) is expensive, and the cheap Bluetooth modules are great for robot-to-host connection, but not for swarm robots which need to communicate to each other. Alex Vecchio (see this post) pointed me to a $2.75 (!) wireless module featuring the Nordic Semiconductor nRF24L01+. Exactly what I needed, with an incredible low price :-).

nRF24L01+ Module Detail

nRF24L01+ Module Detail

Continue reading

Hacking the Heating System for Cooling – Geothermal Drilling with extra Benefits


Summer finally has arrived in Switzerland. Yes, I live in a moderate climate zone, but if the outside temperature goes above 28-30° Celsius as these days, then sleeping at night is not that comfortable as it should be in my view. Luckily, I’m in a good constructed house with good insulation, so it takes a few days until it heats up. But I love to keep the temperature below 25° Celsius, especially at night. I do have a heating system which combines geothermal and solar heating. The question is: how can I use it for cooling during hot summer days? The solution: some extra plumbing, a Freescale Tower system and the Freescale FRDM-KL25Z board 🙂

FRDM-KL25Z with Arduino Data Logger Shield

FRDM-KL25Z with Arduino Data Logger Shield controlling Heating/Cooling System

Continue reading