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.
One of the great things with the FreeRTOS operating system is that it comes with free performance analysis: It shows me how much time is spent in each task. Best of all: it shows it in a graphical way inside Eclipse too:
Three years ago I published “Debugging Failure: Check List and Hints” and unfortunately this article is one of the most popular ones: obviously debugging problems are very common. Debugging with GDB works usually fine, but if things are failing, then it can be hard to find the cause for it. Recently I have been asked to check some failures, so here are two more hints about what could go wrong…
Error while launching command: arm-none-eabi-gdb –version
Binary files are just a binary blob without debug information. Most debug tools and flashers are able to deal (raw) binary (see “S-Record, Intel Hex and Binary Files“). But GDB or the P&E GDB server really needs a ELF/Dwarf file which usually has all the debug information in it. This is a problem if all what I have is a binary file.
This post is about transforming a raw binary (.bin) file into an ELF/Dwarf file with adding a header to it:
The Teensy boards are great, but as they are they are not really useful for real development, as they lack proper SWD debugging. In “Modifying the Teensy 3.5 and 3.6 for ARM SWD Debugging” I have found a way to get SWD debugging working, at that time with Kinetis Design Studio and the Segger J-Link. This article is about how debug the Teensy with free MCUXpresso IDE and the $20 NXP LPC-Link2 debug probe:
“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.
Back in March 2017, NXP had rolled the MCUXpresso IDE starting with Version 10.0.0. With the intent to unify the SDK, LPCXpresso, CodeWarrior, Kinetis Design Studio and Processor Expert into one unified and integrated set of tools. V10.0.0 was a good start. The MCUXpresso IDE V10.0.2 in July was more of a smaller update, and the Pin and Clock configuration tools were not integrated, no added tool for peripheral configuration.
A week ago the MCUXpresso V10.1.0 has been released which shows where the journey is going: an free-of-charge and code size unlimited Eclipse based integrated set of tools to configure, build and debug Cortex-M (Kinetis, LPC and i.MX RT) microcontroller/processor based applications.
Clock Tool inside MCUXpresso IDE
I have used it for a week, and although many things are still new, I thought I’m able to give an overview about what is new.
I’m using many microcontroller in my projects. And a lot more are available out there in the ecosystem. Like many others, I tend to select what I am familiar with. But is this the correct approach to select the hardware and tools for a next project?
The ARM mbed USB MSD bootloader which is used on many silicon vendor boards has a big problem: it is vulnerable to operating systems like Windows 10 which can brick your board (see “Bricking and Recovering OpenSDA Boards in Windows 8 and 10“). To recover the board, typically a JTAG/SWD programmer has to be used. I have described in articles (see links section) how to recover from that situation, including using an inofficial new bootloader which (mostly) solves the problem. The good news is that ARM (mbed) has released an official and fixed bootloader. The bad news is that this bootloader does not work on every board because of a timing issue: the bootloader mostly enters bootloader mode instated executing the application.
Kinetis Design Studio by default uses an older version of EmbSysRegView. This article explains how to upgrade to the latest and greatest version 0.2.6. And how it is possible to use the latest NXP update for the 0.2.4 version:
Most of the time I’m using a dedicated terminal program like Termite or PuTTY to connect to a board using virtual or non-virtual COM port. Another way is to use the Eclipse built-in Terminal view: that way no extra program is needed to communicate with a real or virtual COM port to my target device:
I’m pleased to announce that a new release of the McuOnEclipse components is available in SourceForge. In this release more ARM Cortex devices/vendors are supported with different SDKs, plus it comes with several FreeRTOS enhancements for debugging highly optimized code.
I love the Arduino ecosystem, and it is great for getting something up and running quickly for a ‘proof of concept’. But it stops at that point.
I think it should be obvious why Arduino (code and libraries) should not be used for professional work. Especially the lack of proper debugging support makes it nearly impossible to solve the problems of the real world.’printf()’ style of debugging is simple, but it is a huge waste of time. I have seen too many student projects failing because the inability to properly debug the system and solve the problems.
Even equally important for professional work is the topic of IP and licensing. Be aware of the licensing terms and conditions as pointed out by above article. If not, your product easily get GPL’d which might not want you want.
Last month (June 2017), the latest version of Eclipse “Oxygen” has been released, and I have successfully used it in several embedded projects. Time to write a tutorial how to use it to build a custom Do-It-Yourself IDE for ARM Cortex-M development: simple, easy, unlimited and free of charge. While the DIY approach takes a few minutes more to install, it has the advantage that I have full control and I actually know what I have.