In the area of IoT (Internet of Things), one obvious need is to have a way to send and receive data with an internet protocol. MQTT (or Message Queue Telemetry Transport) is exactly like that: a light-weight Machine-to-Machine communication protocol. With the MQTT protocol a microcontroller (or ‘client’) can send data and/or subscribe to data. For example to the Adafruit.IO:
In “MCUXpresso IDE: Importing Kinetis Design Studio Projects” I explained how Kinetis Design Studio projects can be imported and used inside the MCUXpresso IDE. Processor Expert projects can be used, but no new components added, modified or new Processor Expert projects created. To fully use Processor Expert, two plugins need to installed, and this is what this article is about.
The Eclipse CDT build system automatically scans the files in my project folders and adds them to the list of files to be built. That works great if files are added through Eclipse and its plugins: That way Eclipse is notified and aware, and has the files added. But what if I have added files externally (outside of Eclipse)? how can I make Eclipse aware of it?
Many of my currently active projects are using Kinetis Design Studio (KDS) V3.2.0 from NXP (I have published many of my projects on GitHub). Now with the advent of the MCUXpresso IDE (see “MCUXpresso IDE: Unified Eclipse IDE for NXPs ARM Cortex-M Microcontrollers“), I have migrated several projects from KDS to MCUXpresso. This post is about how to easily get KDS projects ported and running in MCUXpresso IDE.
One great thing with Eclipse compared to proprietary IDEs are the thousands of available plugins. Yes, not every plugin is probably on the ‘must have’ list (I have listed some in a series starting with “5 Best Eclipse Plugins: #1 (Eclox with Doxygen, Graphviz and Mscgen)“).
The ‘traditional’ approach to install Eclipse plugins is using the menu Help > Install New Software. Using that approach, I have to use or enter an Eclipse update site. An easier way is to use the Eclipse Marketplace plugin which allows me to search and browse for plugins and simplifies installation of it. But as this one does not come installed by default with MCUXpresso. But it is my preferred way to browse and install plugins into Eclipse:
This is another article about the NXP MCUXpresso IDE (see “MCUXPresso IDE: Unified Eclipse IDE for NXPs ARM Cortex-M Microcontrollers“), this time it is about Post-build steps. Post-build steps are custom actions which can be executed after the build (or link phase), and are typically used to generate S-Record, Binary or Intel Hex files (see “S-Record, Intel Hex and Binary Files“).
To me, software and tools are by far more important than the microcontroller. Because the silicon is a ‘one time kind of thing’, where the software has to be maintained and working over a longer time. And at least my software usually needs to be ported to a new device, so portability and available software and tools are critical to me.
The combination of MCUXpresso SDK (formerly Kinetis SDK) and Processor Expert is unfortunately not supported by NXP. But I have found a way to get them work together in a nice way, and this article is about making that combination possible :-).
With debugging FreeRTOS applications in Eclipse, it is a big to have views available showing all the threads, queues, timers and heap memory allocation. One of the best Eclipse plugins are the one NXP provides for FreeRTOS: they are free of charge and give me pretty much everything I need. However, if you are not that familiar with FreeRTOS itself, here are a few tips to get more out of the plugins.
Questions from students or readers of my articles are a great source for all kind of articles. And here is the ‘question of this week’: “What is realtime debugging”?
It’s a good question because the topic of ‘realtime’ and ‘debugging’ was a topic in the lectures this week. So this question gives me the opportunity to combine the two things of ‘realtime’ and ‘debugging’, I love it :-).
Coming out of a project meeting Friday evening, the following wisdom came to my mind:
“The major difference between a thing that might go wrong and a thing that cannot possibly go wrong is that when a thing that cannot possibly go wrong goes wrong it usually turns out to be impossible to get at or repair.” – Anonymous
Instead creating a new project from scratch, often it is simpler to copy an existing Eclipse CDT project, then change it and go on. To copy-past the a project in Eclipse:
- Select the project in the Project Explorer View (CTRL-C on Windows)
- Then paste it in the Project Explorer View (CTRL-V on Windows), and I can specify the new name:
However, to make that process simpler, a few things have to be done right in the ‘source’ project first.
I’m a big fan of ‘low-and-slow’ cooking, and that’s why I love my BBQ Smoker. That smoker is great for Ribs, Brisket or Pulled Pork. But it is not ideal for other pieces of meat. After doing some research, this weekend I tried something differently: “Sous-Vide”. The result is delicious: this is by far the best steak I’ve ever cooked :-).
When working and debugging a bootloader, debugging can be a challenge: During debugging the bootloader, a new binary gets loaded into the microcontroller address space which is unknown to the debugger. As soon as I step into the newly loaded binary, I only see assembly code, with that ugly “No source available” in Eclipse:
But wait: GDB is able to do pretty much everything you can imagine, so here is how to debug multiple binaries with GDB and Eclipse, and to turn the above into something which is easy to debug:
To me, one of the most frustrating things working with ARM Cortex-M cores are the hard fault exceptions. I have lost several hours this week debugging and tracking an instance of a hard fault on an ARM Cortex-M0+ device.
One of the biggest road blocks (beside of closed source) using the BLE (Bluetooth Low Energy) stack from NXP is that it requires expensive tools to compile and build the stack. The good news is that I have now the NXP BLE stack for the Mikroelektronika Hexiwear ported to Eclipse and GNU gcc build tools for ARM 🙂
Now I can use the data on the Hexiwear over BLE with the gatttool (see “Tutorial: Hexiwear Bluetooth Low Energy Packet Sniffing with Wireshark” and “Tutorial: BLE Pairing the Raspberry Pi 3 Model B with Hexiwear“). This article is taking things a step further and uses a Python script on Linux to access the sensor data on the BLE device: