In the C programming language it is good practice to pass values by reference (using a pointer), especially for large set of data. For example the following function takes a message string and pointer to integer data which then is printed to the console:
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?
I’m pleased to announce that a new release of the McuOnEclipse components is available on SourceForge. This release includes several smaller bug fixes and initial component support for the NXP S32 Design Studio and SDK.
By default, the FreeRTOS threads do not show up with the SEGGER J-Link debug connection in the Eclipse based NXP S32 Design Studio IDE. But don’t worry: Here is how to get it working with SEGGER J-Link debug connection:
The ARM DWT (Data Watchpoint and Trace) is an optional feature of the ARM-Cortex-M, and many Cortex-M3, M4 and M7 devices have it implemented. With it comes a cycle counter which counts the cycles spent. In Cycle Counting on ARM Cortex-M with DWT I described an approach how the application on the target can access the cycle counter.
The MCUXpresso IDE shows that cycle counter in the Eclipse Registers view:
This article is about a project I have started back in January 2018. As for many of my projects, it took longer than anticipated.But now it is working, and the result is looking very good: a DIY automated pick and place machine to place parts on circuit boards. In the age of cheap PCBs, that machine closes the gap for small series of boards which have to be populated in a time consuming way otherwise.
Is BLACK the color of the season? My students really seem to love these ‘dark’ Eclipse themes. Well, I tried ‘dark’ themes in the past, but I have not been vey excited about it. Somehow I preferred more the ‘black on white background’ thing. But: I have now managed to install the ‘Darkest Dark’ Eclipse theme into the NXP MCUXpresso 10.2 IDE for my daily work, and I feel it hurts my eyes less? Maybe I’m getting older? Or could it really be that ‘dark’ look and feel?
By default, the GNU compiler (gcc) optimizes each compilation unit (source file) separately. This is effective, but misses the opportunity to optimize across compilation units. Here is where the Link Time Optimization (LTO, option -flto) can help out: with a global view it can optimize one step further.
The other positive side effect is that the linker can flag possible issues like the one below which are not visible to the compiler alone:
type of '__SP_INIT' does not match original declaration [enabled by default]
Hardware Timers are essential to most embedded applications: I use them mostly for triggering actions at a given frequency, such as acquiring data from a sensor. With using an RTOS I can do a similar thing using a task: the task will run with a given frequency and I can periodic work in it. However, using a task might be too much overhead doing this. The good news is that there is a much more efficient way to do this in FreeRTOS with Software Timers. And this is what this tutorial is about: how to use Software Timers with FreeRTOS.
We in Switzerland are proud about the fact that our country has four official languages: Italian, French, German and Romansh. Most of Swiss people speak at least two of them, plus the inofficial fifth language (English).
Eclipse is even better than that and speaks 46 different languages. If you are not happy with the default language, try out Babel! And yes, Eclipse has a language pack for Klingon too:
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:
I apologize: I have not been blogging much in the past weeks :-(. One reason is that I’m working on a DIY SMT/SMD Pick&Place machine which keeps me busy most of my spare time :-). I admit that this project is not finished yet, but now is the time I can give a sneak preview: a SMD/SMT pick and place machine:
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.
The map file produced by the GNU linker includes lots of information, however it is very cryptic to read. In “Listing Code and Data Size for each Source File with GNU and Eclipse” I showed how the GNU size utility can be used to report the code and data size for each object file. The Eclipse based MCUXpresso IDE comes with another nice view which shows detailed information about code and data allocation:
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.