Looking for a small, inexpensive ($25-30) ARM development board (say 120-180 MHz ARM Cortex-M4 with FPU, 512kB-1MB of FLASH and 256 KByte of RAM? Then have a look at the Teensy 3.5 and Teensy 3.6 by PJRC/Paul Stoffregen:
Teensy 3.5 with NXP K64F ARM Cortex-M4F
The only problem? it is not possible to debug it :-(. At least not in the traditional sense. This article is about how to change the board to use it with any normal SWD debugging tool e.g. Eclipse and the Segger J-Link :-).
I love to commute by train, and I use three different Swiss train companies for my daily work commute to the Lucerne University of Applied Sciences in Horw, near Lucerne. Returning this evening, I enjoyed a beautiful view to the snow-covered mountains from my home destination. I’m lucky, and this is yet another reason why I love my commute:
One of the most important aspects of the ‘IoT’ world is having a secure communication. Running MQTT on lwip (see “MQTT with lwip and NXP FRDM-K64F Board“) is no exception. Despite of the popularity of MQTT and lwip, I have not been able to find an example using a secure TLS connection over raw/native lwip TCP :-(. Could it be that such an example exists, and I have not found it? Or that someone implemented it, but has not published it? Only what I have found on the internet are many others asking for the same kind of thing “running MQTT on lwip with TLS”, but there was no answer? So I have to answer my question, which seems to be a good thing anyway: I can learn new things the hard way :-).
Block diagram MQTT Application with TLS using lwip
IoT (Internet of Things) is all about connecting to the internet. And even more it is about security. Without security and without encrypted communication, everyone possibly can see what I send or receive. And this is especially bad if passwords or user names are sent in an unencrypted way. So encryption and secure communication is key. The solution to that is to use a connection which uses the TLS (Transport Layer Security) protocol.
I want to use TLS for my MQTT communication (see “MQTT with lwip and NXP FRDM-K64F Board“). I’m still learning MQTT, and I’m even more learning about the fundamentals of security and security protocols. So this article is about what I have learned recently, and what I can use to make my data communication secure: Network stack architecture, symmetric and asymmetric encryption and certificates.
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.
For me, the available software and tools are the primary key decision factor why I select a particular silicon vendor. Without good software and tools, a microcontroller only ‘sand in plastic case’, even if it is the best microcontroller in the world. I do have several probably excellent microcontroller boards, and they are only getting touched by more durst over the months and years.
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:
Eclipse Marketplace under Eclipse Neon and MCUXpresso IDE
There are many mergers going on in the industry, and one of the largest one was in 2016 the integration of Freescale Semiconductor with NXP Semiconductors, with both providing Eclipse based IDE’s to their customer base. Consequently, the company merger triggered a merger of the IDE’s, and last week NXP has released the result: the MCUXpresso IDE.
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 :-).
SDKv2 Project with Processor Expert which is supposed not to work together
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.