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.
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 detected by CODAN
In this article I show a few tips how to effectively use it, especially with the NXP MCUXpresso SDK.
The MCU-Link is a $10 CMSIS-DAP capable debug probe which works out-of-the box with the MCUXpresso Eclipse based IDE. This is great for development, but how can I programming with the push of a button or a script? The answer is no: there is an easy way to use the debug probe outside Eclipse from a shell script, and you can use that MCU-Link probe to do the job. This is especially useful as with the example below where I have to program 60 boards this week-end :-).
The NXP Kinetis devices implement a UID (Unique ID) for each device, using the ‘Unique Identification Register) which is part of the SIM (System Integration Module):
SIM Unique ID (NXP K22P144M120SF5RM.pdf Reference Manual)
While this number should be unique, I was wondering last week why students in the labs reported the same UID for multiple robots in the lab. So maybe this number is not so unique as it should be? Continue reading →
Having visibility and insights into a running system is highly valuable or critical: not only for optimizations but as well to verify the system design and behavior. In Getting Started with Microsoft Azure RTOS (aka ThreadX) I showed how to quickly run Azure RTOS. This article is about getting trace out of an ThreadX application and show it in TraceX.
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)
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.