Amazon has released in the past week the FreeRTOS version V10.4.0. Time to upgrade, actually the most recent version 10.4.1! The same time the SEGGER SystemView V3.12 was released back in April this year. No surprise: with the FreeRTOS changes they don’t work out of the box: but no worries, I have you covered and applied all the needed patches and changes to have them working again together: the latest FreeRTOS v10.4.x with Segger SystemView v3.12:
Friday this week NXP has released a new version of their flagship IDE: the MCUXpresso IDE V10.3.0. The version number indicates an incremental update from the earlier V10.2.1, but there are many exciting features and new features which make me switch my lecture material to this new IDE for the next semester.
The McuOnEclipse GitHub repository hosts many Processor Expert projects and is very popular (cloned more than 1000 times, thank you!). Processor Expert is a powerful framework which generates driver and configuration code, simplifying application development for a wide range of microcontroller and families. But Processor Expert won’t be developed further by NXP and is not part of MCUXpresso IDE. While it is possible to install Processor Expert into MCUXpresso IDE 10.2, how can these projects used ini an IDE *without* Processor Expert? This article describes how to port an existing Processor Expert project into the NXP MCUXpresso IDE.
Ported Project with FRDM-K64F using Adafruit SSD1351 and Processor Expert
NXP not only sells general purpose microcontroller, but as well a portfolio of automotive devices which includes the S32K which is ARM Cortex based. For this device family, they offer the S32 Design Studio (or S32DS) with its own Eclipse distribution and SDK. The interesting part is that the S32DS includes Processor Expert (which is a bit different from the ‘mainstream’ Processor Expert). It comes with its own components for the S32K SDK which includes a component for FreeRTOS. But that component in S32DS 2018.R1 comes with an old V8.2.1 FreeRTOS component:
FreeRTOS 8.2.1 in S32DS 2018.R1
So what to do if I want to use the latest FreeRTOS (currently 10.0.1) with all the bells and whistles?
When using the FreeRTOS Task List in the Eclipse based MCUXpresso IDE, it shows the list of tasks with their stack size used. But with the default FreeRTOS settings it is not able to determine the correct stack size and shows a warning icon:
Using IP (Ethernet) based debug probes is a very handy thing: I don’t have to be directly connected to the debug probe (e.g. with the USB cable). This article explains how to use an IP-based Segger or P&E probe with the Eclipse based MCUXpresso IDE.
Windows 8 and 10 have added a ‘feature’ to scan and index devices attached to the host machine. This means that bootloaders or MSD (Mass Storage Device) programming implementations on evaluation boards developed in the Windows 7 age might not be prepared for that. Up to the point that it can impact the bootloader as outlined in “Bricking and Recovering OpenSDA Boards in Windows 8 and 10“. So far one of the easiest way to get out that situation was to use a Windows 7 machine. But if you only have a Windows 10 machine available, this article describes the needed steps to update the bootloader with Windows 10 host machines.
It’s April Fool’s Day, but be assured this is not a joke ;-): I’m pleased to announce that a new release of the McuOnEclipse components is available in SourceForge. This release includes several smaller bug fixes and components have been upgraded for FreeRTOS V10.0.1.
I’m pleased to announce that a new release of the McuOnEclipse components is available in SourceForge., which is supposed to be the last release for 2017 :-). This release features several smaller bug fixes, the new FreeRTOS V10.0.0 and extended device support.
“Amazon FreeRTOS – IoT operating system for microcontrollers”: The announcement of FreeRTOS V10.0.0 was one of the biggest news last week for me. Not only is there now a Version 10, the bigger news is that FreeRTOS is now part of Amazon. Wow! Now this explains why Richard Barry (the founder behind FreeRTOS) was kind of hiding away for about a year: he joined Amazon as a principal engineer about a year ago. I think we all have to wait and see what it means for FreeRTOS.
The NXP Freedom boards are very popular. Many of them are inexpensive (less than $20), include a debug interface and can be easily extended with extra shields or boards. Especially the FRDM-KL25Z is very popular: I’m getting told because of Processor Expert and tutorials available on web sites like this one ;-).
Unfortunately there are no small or breadboard friendly Kinetis boards available. There is the NXP LPC800-DIP but with no onboard debugger and without Processor Expert support. We have the tinyK20, but projects tend to use more CPU power, FLASH and RAM space than what the tinyK20 board (50 MHz, 128 KByte FLASH, 16 KByte RAM) can provide. So we ended up designing the big brother of the first tinyK20: the tinyK22 with 120 MHz, 512 KByte of FLASH and 128 KByte of RAM.
ARM Cortex-M microcontrollers can have multiple memory controllers. This is a good thing as it allows the hardware to do multiple parallel memory read/writes. However this makes the memory map more complicated for the software: it divides the memory into different regions and memory segments. This article is about how to enable FreeRTOS to use multiple memory blocks for a virtual combined memory heap:
Many of the NXP OpenSDA boot loaders are vulnerable to Windows 8.x or Windows 10: write accesses of Windows can confuse the factory bootloader and make the debug firmware and bootloader useless. In this post I show how to recover the bootloader using MCUXpresso IDE and the P&E Universal Multilink.
Using P&E Multilink Universal to restore the OpenSDA Bootloader on NXP FRDM-K22F Board
A bootloader on a microcontroller is a very useful thing. It allows me to update the firmware in the field if necessary. There are many ways to use and make a bootloader (see “Serial Bootloader for the Freedom Board with Processor Expert“). But such a bootloader needs some space in FLASH, plus it needs to be programmed first on a blank device, so a JTAG programmer is needed. That’s why vendors have started including a ROM bootloader into their devices: the microcontroller comes out of the factory with a bootloader in FLASH. So instead writing my bootloader, I can use the one in the ROM.
FRDM-KL03Z with ROM Bootloader
And as with everything, there are pros and cons of that approach.
For reliable applications, I avoid using functions of the standard libraries. They are banned for most safety related applications anyway. I do not use or avoid malloc(), printf() and all the other variants, for many reasons including the ones listed in “Why I don’t like printf()“. Instead, I’m using smaller variants (see “XFormat“). Or I’m using only the thread-safe FreeRTOS heap memory allocation which exist for many good reasons.
For many projects it would be cool to build a custom USB Joystick device, either as custom game controller for Windows or any USB host which can be used with a USB Joystick. Instead buying one, why not build my version? All what I need is a USB capable board, some kind of input (potentiometer, push buttons) and some software, and I have my USB Joystick:
Eclipse for C/C++ (CDT) offers two different ways to get out of a debug session: Terminate and Disconnect:
Terminate and Disconnect
The terminate and disconnect behaviour is not standardized, and varies between Eclipse distributions and debug connection. This article is about how things are handled in MCUXpresso IDE, and how I can influence the behaviour.