McuOnEclipse Components: 26-Dec-2021 Release

I’m pleased to announce a new release of the McuOnEclipse components, available on SourceForge. This release includes several bug fixes, support for more devices, and updated components like FreeRTOS, MinINI, Percepio Tracealyzer and SEGGER SystemView.

SourceForge

SourceForge

Continue reading

Touch & Build: Auto-Update of Firmware Date and Time

It is very valuable to have a date and time information in the binary. That way for example using a shell I can check the version of the firmware running on a device, or it can be printed on a console or UART as needed.

Firmware Date and Time

Firmware Date and Time

Continue reading

Tutorial: GNU Coverage with MCUXpresso IDE

If you are developing Linux or desktop applications with GNU tools, you  very likely are familiar with gcov: the GNU coverage tool. It collects data what parts of the code gets executed and represents that in different formats, great to check what is really used in the application code or what has been covered during multiple test runs.

Coverage Information with gcov

Coverage Information with gcov

line never executed

line never executed

GNU coverage is possible for resource constraint embedded systems too: it still needs some extra RAM and code space, but very well spent for gathering metrics and improves the firmware quality. As I wrote in “MCUXpresso IDE V11.3.0 for 2021” things are now easier to use, so here is a short tutorial how to use it.

Continue reading

NXP published MCUXpresso SDK 2.9.0 on GitHub

There are many different aspects of Open Source projects: It is not only about the fact if the sources are available (‘open’). It is about the licensing terms (how permissible is it, what can I do with it), maintenance and continuous development (what has changed between releases), how and where is it delivered (Sourceforge, dedicated distribution, packaging) up to collaboration (how can I contribute or submit issues).

NXP has now published the MCUXpresso SDK on Github:

MCUXpresso SDK on GitHub

MCUXpresso SDK on GitHub

Something I was waiting for a long time.

Continue reading

assert(), __FILE__, Path and other cool GNU gcc Tricks to be aware of

It is always good to have a close look what ends up in a microcontroller FLASH memory. For example using EHEP Eclipse plugin to inspect the binary file:

Source File Name in Binary Image

Source File Name in Binary Image

Obviously it has path and source file information in it. Why is that? And is this really needed?

What about:

  • Privacy: the path or file name might expose information (secret project name?) or might be used for reverse engineering?
  • Size: The strings add up to the final data/FLASH size, so this increases the need for ROM space?

So let’s have a look what is the reason for this and how it could be avoided or at least reduced.

Continue reading

MCUXpresso IDE V11.3.0 for 2021

I’m in the middle of the university exam season: means writing exams and do grading. The same time the new semester is approaching too and I need to prepare the new course material. For the classes using NXP parts I’m using the Eclipse based MCUXpresso IDE, and I just received the announcement that a new version V11.3.0 is available: time to check out what is new.

MCUXpresso IDE v11.3.0 (Build 5222)

MCUXpresso IDE v11.3.0 (Build 5222)

Continue reading

Eclipse CODAN (Static Code Analysis) for C/C++

The Eclipse CODAN (Code Analysis) plugin is part of CDT and is a powerful static analysis tool finding all kind of possible bugs and issues. Still to my surprise not many C/C++ developers take advantage of it maybe because they are not aware that it exists?

ups! Programming error catched by CODAN

ups! Programming error detected by CODAN

In this article I show a few tips how to effectively use it, especially with the NXP MCUXpresso SDK.

Continue reading

New MetaClockClock V3 finished with 60 Clocks

The holiday break at the end of the year is always a good time to finish projects started during the year. This one is about my ‘MetaClockClock’ Version 3.

Red Hands on Blue

2020 with Red Hands on Blue

Continue reading

OpenOCD with MCU-Link

The NXP MCU-Link is a powerful $10 debug probe for ARM Cortex-M devices and works with the NXP LinkServer for debugging. The LinkServer does not an implement a gdb server, so it limits its usage e.g. for scripting or command line debugging. But as MCU-Link is also a CMSIS-DAP compatible debug probe, I can use it with OpenOCD which is open source and implements a GDB server. This article shows how I can use it with the MCU-Link.

Debugging FRDM-KL25Z with MCU-Link

Debugging FRDM-KL25Z with MCU-Link

Continue reading

Steps to use FreeRTOS with newlib reentrant Memory Allocation

Reentrancy is an attribute of a piece of code and basically means it can re-entered by another execution flow, for example by an interrupt or by another task or thread. This is an important concept and still a lot of code ‘in the wild’ does violate reentrancy. As a result the application crashes immediately in the best case. Worse it crashes randomly or even worse it behaves incorrectly 😦 .

Reentrancy is always a concern if using standard library functions, including printf() or malloc(). FreeRTOS offers a reentrant wrapper to the standard malloc() and free() (Memory Scheme 3)

Running FreeRTOS with reentrant newlib

Running FreeRTOS with reentrant newlib

Continue reading