It is one thing to create something ‘cool’ or technically interesting. But it is a completely different story to convince your girlfriend, partner, wife, family (or whatever you can name it) to hang something on a wall in our house or office. Then it is not about technology: it is more about design and art. So here is my attempt to solve that challenge:
I’m using the NXP Kinetis K22FN512 in many projects, either with the FRDM-K22F or on the tinyK22: with 120 MHz, 512 KByte FLASH and 128 KByte it has plenty of horsepower for many projects. The other positive thing is that it is supported by the NXP MCUXpresso IDE and SDK. I have now created an example which can be used as base for your own project, featuring FreeRTOS, FatFS, MinIni and a command line shell.
FreeRTOS has many cool features, and one is that it can report the CPU percentage spent in each task. The downside is that to get this kind of information some extra work is needed. In this article I show how to do this for the NXP i.MX1064.
Especially in a lab or classroom environment it is convenient to start with a template project, and then explore different ways to shape the project for different needs. As for any IDE of this world, this requires an understanding of the inner workings to get it right. So in this article I show how to copy, clone or rename properly an Eclipse ‘template’ project in the MCUXpresso IDE.
Right before Christmas 2019, NXP has released a new version of the MCUXpresso IDE, the version 11.1.0. This gave me time to explore it over the Christmas/New-Year break and evaluate it for the next university semester. There are several new features which will make my labs using it easier, so I plan to get the course material updated for it.
After the break you will find the highlights …
When using an RTOS like FreeRTOS, sooner or later you have to ask the question: how much time is spent in each task? The Eclipse based MCUXpresso IDE has a nice view showing exactly this kind of information:
For FreeRTOS (or that Task List view) to show that very useful information, the developer has to provide a helping hand so the RTOS can collect this information. This article shows how this can be done on an ARM Cortex-M.
Human since 1982 claims
“Human since 1982 have the copyright to works displaying digital time using a grid arrangement of analog clocks…”
I’m not a lawyer, but without obligations (imho) I have removed the content.
Thanks for understanding,
Stack overflows are probably the number 1 enemy of embedded applications: a call to a a printf() monster likely will use too much stack space, resulting in overwritten memory and crashing applications. But stack memory is limited and expensive on these devices, so you don’t want to spend too much space for it. But for sure not to little too. Or bad things will happen.
The Eclipse based MCUXpresso IDE has a ‘Heap and Stack Usage’ view which can be used to monitor the stack usage and shows that a stack overflow happened:
But this is using the help of the debugger: how to catch stack overflows at runtime without the need of a debugger? There is an option in the GNU gcc compiler to help with this kind of situation, even if it was not originally intended for something different. Continue reading
NXP has released an update of the Eclipse based V11 IDE. This is right on time for the new semester starting mid of September where this IDE will be used in several labs.
The Espressif ESP32 devices are getting everywhere: they are inexpensive, readily available and Espressif IDF environment and build system actually is pretty good and working well for me including Eclipse (see “Building and Flashing ESP32 Applications with Eclipse“). The default way to program an ESP32 is to a) enter UART bootloader by pressing some push buttons and b) flash the application with ESP-IDF using a USB cable.
That works fine if the ESP32 is directly connected to the host PC. But in my case it is is behind an NXP Kinetis K22FX512 ARM Cortex-M4F microcontroller and not directly accessible by the host PC. So I had to find a way how to allow boot loading the ESP32 through the ARM Cortex-M which is the topic of this article.
The new semester is approaching in a very fast way, and so is the new lecture and lab module ‘Advanced Distributed Systems’ at the Lucerne University. For that module we are going to build a new ‘Sumo’ style robot with WLAN capabilities using the ESP32 chip. It will be a new robot PCB, and below is the current robot (based on NXP K22FX512) with the WLAN module connected to it:
It is great if vendors provide a starting point for my own projects. A working ‘blinky’ is always a great starter. Convenience always has a price, and with a ‘blinky’ it is that the code size for just ‘toggling a GPIO pin’ is exaggerated. For a device with a tiny amount of RAM and FLASH this can be concerning: will my application ever fit to that device if a ‘blinky’ takes that much? Don’t worry: a blinky (or any other project) can be easily trimmed down.
I use a ‘blinky’ project here just as an example: the trimming tips can apply to any other kind of projects too.
Many of you are aware of that DIY Pick&Place machine build documented in “Building a DIY SMT Pick&Place Machine with OpenPnP and Smoothieboard (NXP LPC1769)“.
That machine has now been modified to dispense solder paste. I did not had time yet to describe the build, but as I have received recently many questions: here are some pre-information about the build:
In my previous article “Seeed Studio Arch Mix NXP i.MX RT1052 Board” I described how I can use and debug the Seeed Arch Mix Board. But so far I only had things running in RAM. Ultimately I want to use the QSPI FLASH memory on the device with my firmware and running code on it. This article shows how to get from RAM execution to SPI FLASH in-place execution (XiP).
The Seeed Studio ‘Arch Mix’ board is a small and versatile development board with an NXP i.MX RT1052 on it, and it costs only $29.90. So I was not able to resist and just have ordered one so I can explore it.
The ‘standard’ binary files for many tools are S19, binary or Intel Hex files. Especially for S19 and Intel Hex it can be useful to control the amount of data per line. By default, the GNU objcopy creates files with a line length of 44 characters:
But it is possible to have Intel Hex files with an custom line length using the SRecord utility, and this is what this article is about.
The ‘Black Magic Probe’ (or in short: BMP) is a very small and open source JTAG/SWD debug probe with a build-in GDB Server. I saw that probe referenced in different places, so I thought I try it out with a few of my NXP LPC and Kinetis boards:
A few days ago NXP has released a new version of their Eclipse IDE flagship: the MCUXpresso IDE v11.0.
The previous v10.3.1 was released back in Feb 2019, and the 11.0 now in June this year matches up with the Fall university semester. I appreciate that the releases are about every 6 months, so this gives me time to use it in my university lecture material and lab work. I had the weekend for trying it out, and I’m very pleased.