C++ with Kinetis Design Studio

Unlike CodeWarrior, the Kinetis Design Studio (at least in V1.1.1) does not offer a choice between C and C++ projects. That makes sense with the GNU ARM Eclipse plugins, other than the CodeWarrior gcc integration, there is no need for setting up a special tool chain for C++ (see “Compiling C Files with GNU ARM G++“). While this is great, things are not perfect yet, so I’m providing in this post the information needed to properly setup a C++ project with Kinetis Design Studio V1.1.1.

Debug View of Startup Code Calling C++ Constructors

Debug View of Startup Code Calling C++ Constructors

Continue reading

USB CDC with the FRDM-K64F, finally!

Sometimes I think that a problem should be solvable in a few minutes, and then it turns out that it lingers around for months. Very, very frustrating! Such a thing is getting the USB 4.1.1 stack running on the FRDM-K64F board. I have that board since April 2014, and it took me 7 months to get the FSL USB stack running on it :-(.

FRDM-K64F Board

FRDM-K64F Board

Continue reading

How NOT to Solder Headers on a Board

There are two basic strategies in teaching:

  1. Teach and show how things should be done.
  2. Teach and show how things should NOT be done.

I usually do the first method. But there is a lot of value in the second method too!

When I asked all student groups to solder the headers on the Freescale FRDM-KL25Z board, I received one report that the board does not work any more. A quick inspection of the board showed this:

Soldering the FRDM Board Headers

How NOT to Solder the FRDM Board Headers

Continue reading

Enabling/Disabling FXOS8700CQ Device Needs a Delay

Found an interesting behaviour with the Freescale FXOS8700CQ on the new Sumo Robots (see “Sensor and Communication Shield for Sumo Robot“): when enabling the accelerometer/magnetometer, it actually did not work:

Failed to Enable FXOS8700 Accelerometer

Failed to Enable FXOS8700 Accelerometer

Continue reading

Emulating Eclipse ‘Run’ with ‘Debug’ Configuration

Student: “Professor, my application does not work!”
Professor: “What is the problem?”
Student: “I don’t know, but the LED on my board is not blinking.”
Professor: “Can you step through the port initialization sequence and check if the clocks are initialized correctly?”
Student: “I have pressed the ‘Run’ button, I’m not debugging”.
Professor: “Why are you not debugging?”
Student: “I always do a ‘Run’, and I do ‘Debug’ only if needed.”
Professor: “Ahhhhhhrrrrgggg!”

Run and Debug in Eclipse

Run and Debug in Eclipse

Clearly, I’m not immune to the ‘déformation professionelle‘. I very rarely use ‘Run’, because it simply does not offer much value compared to ‘Debug’ during development. If using ‘Run’ and then there is a problem, I have to ‘Debug’ anyway, why not ‘Debug’ from the beginning? It is simply not an efficient way to work for me. Or I’m missing something?

Continue reading

Comparing CodeWarrior with Kinetis Design Studio

At FTF 2014, Freescale made the announcement that CodeWarrior won’t support all the new ARM Kinetis devices coming out in the future: they will be supported with the free-of-charge Kinetis Design Studio (KDS) instead. As for myself, this is a big shift from a well established CodeWarrior toolchain to something new. A question which came up recently several times in the forums and in other posts is: how do CodeWarrior and KDS compare with each other?

CW vs KDS

CW vs KDS

Continue reading

BBQ Smoker Monitoring Robot

I have to admit: I’m not a vegetarian. I love BBQ, and no offense to vegetarians! Today is perfect day for another BBQ session, and this time I plan to enhance it with electronics. No, not eating electronics, but doing BBQ with a little DIY electronic helper. There are different ways to cook meat on an open fire pit, and each region of the world has its own way to do it. Traditionally, in my area we are ‘grilling’ the meat: high temperature, for a few minutes, done! I like that ‘fast food way’ too, but there is an even better version: Slow food smoking!

I’m gifted that I had the opportunity to experience the Texas BBQ culture: slowly cooking the meat, at low temperature, and ‘smoking’ it: Cooking the meat around 80°C prevents that it gets dry (because the water does not vaporize, see this article on Wikipedia). There are different ways how to do this, but I love the way how it is done at the Salt Lick in Austin/TX with an open fire pit:

BBQ Pit in Austin Texas

BBQ Pit in Austin Texas

Continue reading