Engineering Joke of the Week: The Pet Shop

A tourist walked into a pet shop and was looking at the animals on display. While he was there, another customer walked in and said to the shopkeeper: “I’ll  have a C-monkey please”.

The shopkeeper nodded, went over to a cage at the side of the shop, and took out a monkey. He fit a collar and leash and handed it to the customer, saying “That’ll be $5000”.

The customer paid and walked out with his monkey.

Startled, the tourist went over to the shopkeeper and said: “That was a very expensive monkey, most of them are only a few hundred dollars. Why did it cost so much?”
Continue reading

Advertisements

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

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

Engineering Joke of the Week: The Tunnel

I’m a believer that engineers not only need to act in a professional and ethical way, but they have to have some sense of humor too. For that reason I have the tradition to tell the class (almost) every semester week a joke or fun story with an engineering background :-). And to make it stick, at the exams there is always one bonus questions about these engineering jokes. Some of the jokes or fun stories came from my daughters, some from my former students, and some I have found myself. I have asked to share the fun story from this week, so here we go….

Continue reading

McuOnEclipse Releases on SourceForge

When I started the McuOnEclipse project back in 2012, I did not expect that it would create that much of attention :-). So far I’m sharing the project files on GitHub (see “McuOnEclipse goes Git“). GitHub is excellent for sharing sources, but not a good way to share release (binary) files. It is somewhat ok for small/few files, and initially that worked well for the few Processor Expert files (see “Processor Expert Component *.PEupd Files on GitHub“). However, with the amount of components and binary releases, the GitHub repository gets bloated. So I’m performing some maintenance work, and so I’m moving binary releases to a new McuOnEclipse SourceForge site.

McuOnEclipse On SourceForge

McuOnEclipse On SourceForge

Continue reading

Cheap and Simple WiFi with ESP8266 for the FRDM Board

How cool would it be to add WiFi support to any projects or IoT? Why not using WiFi with a microcontroller which has only few KBytes of RAM and FLASH. For less than US$5? Dreams came true, and intrigued by an article at Hack-A-Day, I searched a supplier for that ESP8266 module. And this evening I have found the four ESP8266 modules I have ordered for $4.50 each from ElectroDragon in my mailbox. Of course I did not want to wait for the week-end, so I hooked it up to my FRDM-KL25Z board.

ESP8266 Module

ESP8266 Module for US$ 4.50

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

My First DIY Smoked Beef Brisket: Day 2 – the Way and the Result

Sunday morning started at 7am in a good way: I think the sun guessed already that I want fire up my smoker today.

Morning Ready to Smoke

Morning Ready to Smoke

❗ And no, that’s not the smoker in that picture! That’s ground fog in the morning (see “Inversion“).

Ready to continue my week-end project: DIY Smoked Beef Brisked!

Continue reading

User Interrupt on NMI Pin with Kinetis and ExtInt Component

While my beef brisket (see “My First DIY Smoked Beef Brisket: Day 1“) is smoking on ;-), I have time to investigate a problem I was running on in my lecture on Friday: For the Joystick shield (see “JoyStick Shield with the FRDM Board“) on the FRDM-KL25Z board, I wanted to use an interrupt if I press the green button:

No Interrupts for Button C

No Interrupts for Button C

However, that did not work :-(.

Continue reading

My First DIY Smoked Beef Brisket: Day 1 – Preparation

Ahhhh, I truly love the Texas BBQ (see “BBQ Smoker Monitoring Robot“)! And what I love the most is Beef Brisket. Unfortunately, I cannot travel each time to the US to get some brisket. So good or bad, I have to make the brisket myself :-). The challenge is that outside of Texas, ‘Brisket’ probably is an unknown thing, especially in my area. In the usual grocery stores and supermarket, if I ask for a brisket, they they just shake their heads and ask “brisket what?”. Of course, my local butcher (Messerli, Metzger meines Vertrauens!) in Steinen knew exactly what I need for a Brisket :-): a special cut of beef from the lower chest of beef.

On Tuesday, I sent my wife to pre-order my cut of beef, and this morning we picked it up in the butcher’s store. An excellent piece, already trimmed, 1.662 kg:

Raw Beef Brisket

Raw Beef Brisket

Continue reading

Failed to Debug with GDB: Breakpoints or Expressions on non-existing Locations

Sometimes, there are ugly bugs in tools, and without knowing about them, it is likely to spend hours and hours, and of course to be frustrated. Knowing about these issues does not remove the issue, but at least helps to cut time to deal with it. And here is one which was nagging on me for a while with the GNU GDB debugger in Eclipse…..

💡 I have used the Q4 2014 GNU ARM Embedded (launchpad) toolsuite/gdb (4.9-2014-q4-major), and I have found that with that gdb version the issue described is fixed. If you are using Kinetis Design Studio, see “Switching ARM GNU Tool Chain and Libraries in Kinetis Design Studio” how to upgrade the tool chain.

I was happily debugging my project, making some changes, and suddenly I cannot debug it any more. What happens is that I can download the binary with GDB, but it immediately terminates and disconnects:

Terminating Gracefully Target Disconnected

Terminating Gracefully Target Disconnected

After digging and doing some trial and errors, I have found what is causing this.

Initializing.
Target has been RESET and is active.
Disconnected from "127.0.0.1" via 127.0.0.1
Terminating Gracefully...
Target Disconnected.

Continue reading

Putting Code of Files into Special Section with the GNU Linker

The GNU Linker (ld) is very, very powerful. This time I wanted to put all my Processor Expert generated code into its own dedicated section. This is useful for example to have a bootloader or a library inside a special area in FLASH. It was not obvious to me how to do this with the linker, with some search on the internet and some trial and errors, I finally managed that. And as always with exploring things, I have learnt something :-). So here is how I’m able to put the code of arbitrary files into its own dedicated section.

Code Section for Generated Code

Code Section for Generated Code

Continue reading

Unlocking and Erasing FLASH with Segger J-Link

When using a bootloader (see “Serial Bootloader for the Freedom Board with Processor Expert“), then I usually protect the bootloader FLASH areas, so it does not get accidentally erased by the application ;-). When programming my boards with the P&E Multilink, then the P&E firmware will automatically unlock and erase the chip. That’s not the same if working with the Segger J-Link, as it but requires extra steps.

Protected FLASH Pages with Processor Expert

Protected FLASH Pages with Processor Expert

Continue reading