Eclipse provides in the Editor view great tool tips (called ‘hovers’) which shows what is behind a macro: I can move my mouse over it, and it shows me the content behind it:
A Library with ARM gcc and Eclipse
When I create a new bare-board project with the Eclipse based CodeWarrior 10.3 for my FRDM-KL25Z board and GNU gcc, then the ‘Library’ option is grayed out:
This does *not* mean that libraries cannot be built :-). In fact it is very easy to do this with the GNU tools and Eclipse, and here is how….
Tutorial: USB CDC with the KL25Z Freedom Board
Question: What to do on a rainy Sunday?
Answer: Having fun with USB and the KL25Z Freedom board! :-).
In “A shell for the Freedom board” I used the UART-to-USB OpenSDA capability of the KL25Z Freedom board: The KL25Z processor uses the OpenSDA K20 microprocessor as Serial-to-USB converter. But this only works because of the P&E OpenSDA USB CDC (Communication Device Class) implementation. If I create my board without OpenSDA, I need a different approach: I want to do USB CDC with the KL25Z :twisted:.
Compiler Defines and Eclipse Editor Highlighting
In this post I have found settings for Eclipse Indexer to show the state if defines correctly. Usually I have something like this in my projects:
So I define the macro DEBUG_ME on the compiler command line. And it is cool to see that the Eclipse editor correctly grays out the code which is not enabled. But for this the Eclipse Editor view needs to know about the macro, but how does this work?
Processor Expert, gcc C++ and Kinetis-L with MQXLite
The Kinetis-L is a 32bit microprocessor family, based on ARM Cortex M0+. It comes with ARM gcc in CodeWarrior. Although the Kinetis-L does not have much RAM, it is very possible to use gcc with C++, especially as a programmer I keep the limited RAM amount in mind. So I thought I try C++ and Processor Expert for my Kinetis-L KL25Z Freedom board.
If I select C++ as language in the New Bareboard Project Wizard of CodeWarrior, then I cannot select Processor Expert or Device Initialization:
That makes somewhat sense, as Processor Expert creates normal C code and C files, but no C++. Still, what if I need C++? This is doable, but with anything advanced, I need to know exactly what I want and what I do. Here is the ‘How to use C++ with Processor Expert’.
Forcing/Checking Kinetis Compiler Optimization Level
As noted in my post on gcc and FreeRTOS, some code might be very sensitive to compiler optimizations. While porting code from the Freescale ARM/Kinetis compiler to the gcc compiler as in MCU10.3, I have found way how to force compiler optimization levels in my source code.
Debugging Variables in Hexadecimal with Eclipse
There are always hidden treasures in Eclipse, and here is one: By default, variables might look like which is not always what I want:
How to change the format to hexadecimal (or any other format)?
Tutorial: Touching the Freedom KL25Z Board
I have covered several aspects of the Freescale KL25Z Freedom board with a tutorial: LED, Accelerometer and RTOS. One peripheral on the board is missing so far: the touch slider area:
White Space or not, that’s the question
There are times when I want to know *exactly* what is inside my source files. In my article on EHEP explains how to get down to the hex bytes of a source file. But in many cases I’m interested to see the non printable/white characters only. Showing white spaces in the sources is easy in Eclipse: I use the ‘Show Whitespace Characters‘ toolbar icon:
Tutorial: Freedom with FreeRTOS and Kinetis-L
In my earlier tutorials “Enlightning the Freedom KL25Z Board” and “Accelerating the KL25Z Freedom Board” I have not used an RTOS. In this one I’m creating a project from scratch and run it with the open source FreeRTOS operating system, using the FRDM-KL25Z Freedom board. MCU10.3 comes with gcc, and is nicely integrated with Eclipse and CodeWarrior. With this tutorial, it is possible to get an RTOS up and running on a Kinetis device very quickly.
I have a KL25Z which has 128 KByte FLASH and 16 KByte of RAM. What I want to explore is if things could fit as well to the KL0 family where the smallest device has only 8 KByte of FLASH and 1 KByte of RAM. Can this work?







