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

New MCU-Link Debug Probe from NXP

The NXP MCUXpressso IDE Release V11.2.1 gave a hint about a coming new debug probe, the MCU-Link which is available now:

MCU-Link debugging the LPC845-BRK Board

MCU-Link in 3D printed enclosure debugging the LPC845-BRK Board

Continue reading

Getting Started with Microsoft Azure RTOS (aka ThreadX)

If you are a regular reader of my articles, you probably know that I’m using FreeRTOS in most of my applications, for obvious reasons. But clearly this is not the only RTOS out there. After Microsoft had acquired Express Logic back in April 2019 things kept quite for a while. To me the crown jewel of Express Logic is the ThreadX RTOS. But recently Microsoft is pushing more and more the ‘Azure Sphere’ and trying to monetize the ‘IoT’ (I apologize for mentioning that overused acronym) application space and providing it now free for devices from selected partners which includes NXP now.

Debugging with ThreadX in MCUXpresso IDE

Debugging with ThreadX in MCUXpresso IDE

Continue reading

tinyK22 Board Rev 1.3 released

The tinyK22 board is a tiny micro controller board we use at the Lucerne University of Applied Sciences and Arts. It is used in many research project, used in lectures and labs and used in most student projects. Because there was no small and breadboard friendly NXP Kinetis board with a debug interface available, we developed one featuring the NXP K22FN512, named the ‘tinyK22‘. Because of the success and high demand we stated a new large production run and used this to upgrade the board to the new Rev 1.3: you might notice already the color change :-).

tinyK22

tinyK22

Continue reading

MCUXpresso IDE V11.2.1

I have started the semester and labs using the MCUXpresso IDE V11.2.0 which has been available from July this year. The past week I received the notification that the update V11.2.1 is available: time to check it out….

MCUXpresso IDE V11.2.1

MCUXpresso IDE V11.2.1

Continue reading

FreeRTOS V10.4.1 with SEGGER SystemView V3.12

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:

Segger SystemView 3.12 with FreeRTOS 10.4.2

Segger SystemView 3.12 with FreeRTOS 10.4.2

Continue reading