I’m using FreeRTOS in most of my applications. There were only a few exceptions where an RTOS has to be used in safety critical systems: there usually it is not permitted to use any dynamic memory allocation because this adds the risk that a memory allocation could fail at runtime because of memory fragmentation or memory leak. And FreeRTOS uses a dynamic memory (heap) for the task stacks and the RTOS resources including semaphore, mutex and queues.
This is now a thing of the past. This week a new FreeRTOS Version 9 was released which does not need any dynamic memory allocation anymore: it is possible now to build completely statically allocated systems with FreeRTOS :-).
Dynamic and Static Memory Allocation in FreeRTOS V9.0.0
Time is passing fast, and many components have been updated to make the compatible with the NXP Kinetis SDK V2.0. As a highlight, besides of FreeRTOS the following components are now usable with the NXP Kinetis SDK:
In “Overview: From Snippets to Code Generation” I discussed several tools used in my development process. On tool which helps me a lot to get things done is Processor Expert. In this post I’ll give an overview about this tool and reasoning for the pros and cons of using it.
In “CodeWarrior Flash Programming from a DOS Shell” I showed how to program a device from the DOS shell. Because that example was for ColdFire and CodeWarrior for MCU10.2, here is the same for a Kinetis (FRDM-KL25Z) and CodeWarrior for MCU10.6. In my workspace (c:\tmp\wsp_10.6) I have a project folder (FRDM-KL25Z).
I’m using the ‘Flash Programmer’ to sneak the needed commands:
To build an application for a modern microcontroller today is not a simple thing. Well, it depends what ‘simple’ means. But compared to the ‘old days of 8bit micro controllers’ (which are still in use!) developing for a complex 32bit device is definitely a different thing. Not only the complexity has changed, but as well the breath of tools and helpers. In my view, the only constant is ‘change’, and I have changed the way how to develop several times in my career. In this post I present several different techniques I’m using in my development.
I noticed that especially working with several projects in my workspace, Eclipse got sluggish and slowly responding. I have in Eclipse the Heap Monitor/Status enabled (see “Show Heap Status in Eclipse“):
Heap Status at the Limit
So the used heap of the Java VM is hitting a limit of about 500 MByte, and seems to be trashing around? How to increase that heap size?
In Eclipse, the usual way to add new plugins or extend the IDE is using the menu Help > Install New Software. Same thing for the newly released Freescale Kinetis Design Studio V3.0.0: I add the support for new devices in the Freescale Kinetis SDK from the SDK Eclipse update:
Installing Kinetis SDK v1.2 update in Eclipse
One thing I noticed with this (and all others updates I do) is that they take much time to install. That’s expected if the update needs to be downloaded from the web. But I was wondering why it takes so long even if the files are local?
Thanks to a tip (thank you, Marek!), there is a setting to cut the installation time :-). Continue reading →
There is a really annoying issue with using command line tools on Windows: the maximum length of the command line passed to cmd.exe is 8192 characters (see http://blogs.msdn.com/b/oldnewthing/archive/2003/12/10/56028.aspx). So you think this is not a problem for you, as you would not pass such a long command line to cmd.exe (the DOS shell under Windows)? Well, if you are using Eclipse (as I do) which generates make files (which is the normal way), then the cmd.exe very likely is involved to call the compiler/linker/etc, indirectly with the usage of make.exe. Compiling files is usually not a problem as it does not hit that 8192 limit. However, it is likely that link phase will end up with an error:
Error in the Problems View
If you have such a problem, there is a solution ….
In Eclipse and CDT, I need to tell the compiler where it has to search for the header files. The normal way is to go to the compiler settings (menu Project > Properties > C/C++ Build > Settings) and then add the include paths, one by one, using the ‘+’ icon:
Adding Include Path (shown using the GNU ARM Eclipse plugin)
But for many include paths, this is a time-consuming process. But there is another way.