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:

Freedom KL25Z Board Touch Slider Area

Freedom KL25Z Board Touch Slider Area

Continue reading

Advertisements

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:

Show Whitespace Characters

Show Whitespace Characters

Continue reading

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?

Continue reading

S-Record, Intel Hex and Binary Files

My earlier posts were around the Kinetis gcc compiler which comes with CodeWarrior for MCU10.3. MCU10.3 comes as well with the Freescale Kinetis compiler as in MCU10.2. In “S-Record Generation with gcc for ARM/Kinetis” I explored how to generate S19 or other output files with gcc. However, you only can produce one file format at a time. What if I need multiple formats or a different format. What if I need to do the same with non-gcc build tools? S-Records are usually easy as supported in the linker. Other formats need a bit more plumbing. So this post is how I can create and manipulate the different output formats, so I can use it with a bootloader.

Continue reading

A Seminar, and Freedom with it

Today I attended the regional ‘Design with Freescale’ seminar. It had a part with a hands-on training using PEG for the Tower K60 + TWR-LCD board. It was the first time I had my hands on PEG which is a good learning experience. I learned that it is possible to fill more than 200 KByte of Flash with a simple LCD Touchscreen application which only has two screens, two buttons, a static text and two small bitmaps ;-).

Continue reading

CodeWarrior for MCU10.3 beta is now available

Today is the ‘L Day’ for Freescale: After the announcement of the Cortex-M0+ family (Kinetis-L) earlier this year, it has been launched on the Freescale web site. Given the positive echo on my post around the KL25Z Freedom board (which has a Kinetis Cortex-M0+ KL25 on it) and the fact that production board is shipping these days, a lot of engineers were waiting for the CodeWarrior for MCU10.3 as it is in my view the development tool of choice as well for ARM Kinetis-L. And right on time, the MCU10.3 beta is available for download on http://www.freescale.com/cwmcu10. Time to show what I have noticed as new and noteworthy…

Continue reading

Code Size Information with gcc for ARM/Kinetis

Working with the Freescale S08 and S12 build tools, there is something I really appreciated: that the linker reports on the console the code size of the application:

S08 Linker reporting the code size

S08 Linker in Eclipse reporting the code size

This is especially handy as it allows you to see the impact on code size immediately e.g. if I change a compiler option or do a source code change. Simple and easy. Yes, I could get that kind of information from the linker map file too. But this means I need to open that file, scroll down/etc: many steps just to find out the code size.

Continue reading

Tutorial: Accelerating the KL25Z Freedom Board

In “Tutorial: Enlightning the Freedom KL25Z Board” I used the RGB LED on the FRDM-KL25Z board. This tutorial extends it to use the MMA8451Q inertial sensor on the board which is connected through I2C to the KL25Z processor:

Freedom Board Block Diagram

Freedom Board Block Diagram with MMA8451Q (lower right corner)

The goal is show the accelerometer x, y and z-axis on the RGB LED.

Continue reading

OpenSDA on the Freedom KL25Z Board

P&E has released information and firmware instructions for using the OpenSDA, see pemicro.com/opensda. Future has posted a very useful article about using OpenSDA here. So time to upgrade OpenSDA bootloader and firmware v10.1. My FRDM-KL25Z board is a pre-production board, and I assume the production boards expected next week will have the new firmware on it. But it is always useful to know how to change/upgrade the firmware, as I expect there will be new versions of it in the future.

Continue reading

Spaces vs. Tabs in Eclipse

I admit: I’m a ‘space’ person. What I mean is that I prefer ‘spaces’ over ‘tabs’ in my source code. Why? Because I don’t want to relay on the tab width, and I prefer to use ‘two spaces for an intention level’.

I would assume that maybe half of the world is for spaces, and half of the world is for tabs. I don’t want to cause a religious war here. I’m for freedom of choice, and this is what Eclipse and CodeWarrior for MCU (which is Eclipse based) offers. Now as I have outed myself as a ‘spacer’, and given the fact that CodeWarrior comes as ‘tabser’ by default, this is something I have to change as a setting for my workspace. Here is what I do….

Continue reading

S-Record Generation with gcc for ARM/Kinetis

With my Freedom KL25Z board I’m using the GNU/gcc build tools and Eclipse/CodeWarrior. When I wanted to create an S19 file of my application using the GNU tools, this was not that easy to find out. So here are the steps to do this:

I open the project setting using the menu Project > Properties and go to C/C++ Build > Settings > Additional Tools and enable’Create Flash Image‘:

Additional Tools gcc Settings

Additional Tools gcc Settings

Continue reading

Tutorial: Enlightning the Freedom KL25Z Board

The schematics for the Freedom board is now available on the element14 Freedom Board site (you need to log into the element14 community first) as FRDM-KL25Z Schematics (SPF-27556_D).pdf (314.7 K)). So time to write a tutorial how to use the LED on that board.

❗ Note: since this tutorial, the LED component has been simplified. So some of the steps below are much simpler and easer. Please see LED’s for Kinetis, simplified | MCU on Eclipse. I have updated this post with the new instructions and images.

In “FreeRTOS with GCC, Cortex-M0+ and Kinetis KL25Z Freedom Board” and “A Shell for the KL25Z Freedom Board” I have used that board with an RTOS: FreeRTOS. But it is really easy to use that board without an RTOS (‘bare metal’) too. In this tutorial I’m providing step by step instructions to use the RGB LED on the Freedom KL25Z board with Processor Expert and the open source LED component.

Continue reading