XFormat, a Lightweight printf() and sprintf() Alternative

Frequent readers of this blog know that I do not like printf (see “Why I don’t like printf()“), because the standard printf() adds a lot of overhead and only causes troubles. But like small kids, engineers somehow get attracted by troubles ;-). Yes, printf() and especially sprintf() are handy for quick and dirty coding. The good news is that I have added a lightweight printf() and sprintf() implementation to my set of components: the XFormat component. And best of all: it supports floating point formatting :-).

XFormat Component

XFormat Component

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

USB with the TWR-KL25Z48M Board: Check Jumper J18!

When I ordered my first Freedom FRDM-KL25Z board, I placed an order the Tower TWR-KL25Z48M shortly afterwards. But I was so happy with the FRDM-KL25Z, and because the FRDM board is much less expensive and easier to handle, that Tower board was sitting in my board shelf, waiting for a maybe a student project or to get any other use of it. Well, I can tell that my students wanted the FRDM board, not the Tower board ;-). But when I saw this week in the Freescale forum a user asking for a USB example for that Tower board, I thought that now I could at least use that board to help someone out.

MKL25Z128VLK4 on the TWR-KL25Z Board

MKL25Z128VLK4 on the TWR-KL25Z48M Board

Continue reading

Multi-Drive Support with FatFS

I admit: I’m sometimes a lazy person. In my projects, I only needed one ‘disk drive’ with the FatFS Processor Expert component: either a SD card or a USB MSD drive. But a reader of this blog wanted to use FatFS with multiple drives: using it with an SD card and a USB MSD drive. And actually FatFS does support this, I just had no need for it, thus I did not add anything special for it. But that reader let me think that I better add Multi-Drive support. Even if I do not need it now, that could be very handy in the future 🙂

FatFS Drive System (Source http://elm-chan.org/fsw/ff/en/appnote.html)

FatFS Drive System (Source http://elm-chan.org/fsw/ff/en/appnote.html)

Continue reading

printf() and scanf() with GNU ARM Libraries

In “Semihosting with Kinetis Design Studio” I’m using the debugger with semihosting to output text with printf(). But how to use a physical serial connection instead?

printf() and scanf() in action

printf() and scanf() in action

This post is about how to enable and use printf() and scanf() with GNU ARM libraries. I show it both for the Freescale Kinetis Design Studio (KDS) and for stock Eclipse Kepler with the GNU GCC ARM Embedded (launchpad) toolchain and libraries. The principles are the same, just the details are different ;-).

Continue reading

Showcase of Student Project Exhibition 2014 in Horw

Yesterday Friday afternoon, the students at the Lucerne University of Applied Sciences and Arts in Horw showcased their last semester project work to the public at the university. There were many, many interesting projects, so here are a few to give an idea what has been accomplished …

Part of the Exhibition Area

Part of the Exhibition Area

Continue reading

Tutorial: Nordic Semiconductor nRF24L01+ with the Freescale FRDM-K64F Board

For some time I’m using the Nordic Semiconductor nRF24L01+ transceiver successfully in many projects (see “Tutorial: Ultra Low Cost 2.4 GHz Wireless Transceiver with the FRDM Board“). Since that tutorial things evolved a lot with the introduced RNet Stack. To honor the popularity of the Nordic Semiconductor nRF24L01+, Freescale has put a socket on the FRDM-K64F board. So time to make a new step-by-step tutorial how to use the nRF24L01+ with the FRDM-K64F.

Two FRDM-K64F Boards with nRF24L01+ Transceiver

Two FRDM-K64F Boards with nRF24L01+ Transceiver

Continue reading

Finding Settings in Processor Expert Components

Processor Expert components are making things very easy to configure: go a component, use the component inspector and change a setting. However, with the devices getting more and more complex, the list of settings or properties get longer and longer. To the point that it is hard to find a setting.

For example, where are the settings for the PLL in the CPU component?

Component with Settings

Component with Settings

Continue reading

Preventing Reverse Engineering: Enabling Flash Security

Now I have invested a lot of time into my application, ready to be flashed on the devices and shipped. But wait: I don’t want that someone can read out the code from my device and have it reverse engineered. For this, I can ‘secure’ the device.

Flash Security Settings

Flash Security Settings

Continue reading