On Friday, Freescale has updated CodeWarrior for MCU10 from V10.4 to V10.5, available on http://www.freescale.com/cwmcu10. I have not had much time to use it over the week-end, but here is a list of the things which in my view will make me switch my projects over to 10.5 and use it in my university classes:
Smaller: smaller setup and less disk space
Faster: faster debugging and flashing
Features: Eclipse Juno, detachable editor views, ‘unlimited’ breakpoints, simplified debugger attach/connect/download, and more.
Summer finally has arrived in Switzerland. Yes, I live in a moderate climate zone, but if the outside temperature goes above 28-30° Celsius as these days, then sleeping at night is not that comfortable as it should be in my view. Luckily, I’m in a good constructed house with good insulation, so it takes a few days until it heats up. But I love to keep the temperature below 25° Celsius, especially at night. I do have a heating system which combines geothermal and solar heating. The question is: how can I use it for cooling during hot summer days? The solution: some extra plumbing, a Freescale Tower system and the Freescale FRDM-KL25Z board
FRDM-KL25Z with Arduino Data Logger Shield controlling Heating/Cooling System
It took me a while to find the time to upgrade to FreeRTOS V7.4.2, but finally it is done :-). What caused me to move from V7.2 to V7.4 is a low power application on the FRDM-KL25Z board. V7.4 comes with two major new features: Queue Sets and Tickles Idle Mode (see this article). The last one if of interest here.
FreeRTOS runs an IDLE task. This one runs when there is no other active task. That task calls an optional Idle task hook which is a perfect place to put the microcontroller into low power mode:
I’m working now on a lecture robot project using my Freedom Board. And for this I need a wireless communication. I already have IEEE802.15.4 (SMAC) working, but I wanted to add Bluetooth as a low-cost option. I have found an inexpensive Bluetooth module which is available for only around $4-8 which we use in another university class project. The module is an AT command module: that means the microcontroller communicates with AT serial commands with the module, and the Bluetooth stack itself runs on the module. In a minimal configuration I only need 3.3V, GND, TX and RX plus a CMD (Command) pin:
I’m working with the I2C bus recently a lot. I’m using it in a project to reverse-engineering skimming (credit card fraud) devices. I needed to improve one of my applications for the lecture classes where a MCF52259 is communicating with a TWR-LCD display over I2C. And I want to add RTC (Real-Time-Clock) capabilities to my Arduino Data Logger Shield which requires I2C.
The same time I want to have things working with ARM Cortex-M4 and M0+ devices. And here the challenge started: using the I2C_LDD (Logical Device Driver) Processor Expert components for the ARM Kinetis devices is definitely not simple and easy. I want to use my software compatible for both the ARM cores and say for S08 and ColdFire cores. So what I ended up is to write a ‘generic’ I2C driver on top of the low level Processor Expert components: named GenericI2C.
It has been a while I presented that universal USB CDC component in this blog. The component has received a larger re-architecture, I wanted to support more than just USB CDC. For this, the CDC part is now present in a separate sub-component:
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?
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.
Freescale offers a free wireless SMAC stack for their ZigBee and IEEE802.15.4 transceivers as found in the MC1321x (SRB and NCB) wireless kits, or as used on the MC13201 daughter card. The ‘S’ in SMAC stands for ‘Simple’. But it is not that simple to use that stack. So that’s why I’m using it transformed into a Processor Expert components. I have received recently requests and questions about it, and finally it is available on this site. If you are wondering for what it can be used, then read this post.
Created Tower Radio Card with MC13201 daughter board, SD card and Realtime Clock
The stack is using the Freescale SMAC stack as base, and consists of four components: MC13192, SSEC, SPHY and SMAC. This post provides hopefully an entry point how to use them.
I have an example project with Processor Expert and CodeWarrior. The problem I have is that I want to use it for another CPU derivative. So how can I migrate the project?
There are three different approaches:
Change Wizard: In MCU10.2 there is the menu Project > Change Device/Connection. While this sounds promising, it only works for the very simple projects. And it does not change the project in-place: it simply creates a copy of the project and applies some (many times wrong) settings. So I do not recommend to use that option.
New Project Wizard: For me in most cases this is the best way: this creates a new project for the new device, with everything set up correctly. In a second step I copy my source files and compiler settings (if I have changed them). The Processor Expert component I can transfer with using drag&drop.
Changing the CPU: With Processor Expert, I can change the CPU. For this I add a new CPU to the project and change other settings (debugger, build tools settings) as needed.
The 2012 London Olympics are over. And I had my own special sports event last weekend. Although not part of the Olympics, it is part of the Switzerland Central Mountain Race Championship. This is a series of mountain running challenges. And no, I did not run the race. I love the mountains, and I love hiking in the mountains, but this is definitely for the greatest athletes. Instead to run the race, I have chosen to implement and run the timing system :-).
The good thing with many vendors is: they offer development tools free of charge. And the limitations are typically reasonable for many projects. The Eclipse based CodeWarrior for MCU10 is not an exception: it comes in a free (‘Special’) Edition which allows up to 128 KByte of code to download for my ARM/Kinetis projects.
But, when I tried to debug an Example I have downloaded from the web, I get this dialog:
“Download size limit has been exceeded. Please check your license.”
Many new notebooks do not have a serial port any more: everything is USB. This can lead to problems (see USB or not: CDC with Processor Expert) as many embedded targets use normal RS-232. In my classes I’m using the Tower boards: some Tower boards have an on-board 2 pin RS-232 header, e.g. the Tower TWR-MCF52259. Others like the TWR-K60N512 use the added TWR-SER board. The Tower boards have as well a USB capable S08JM60 which is used for debugging (OSBDM/OSJTAG), so why not using the OSBDM microcontroller as Serial-to-USB gateway?
In Scripting, the Debugger Shell and Debugger Shell: Test Automation I was exploring how to use the Debugger Shell for automation. For my lectures at the university I need to program multiple boards with the same application. I don’t want (and need) a debugger for this: all what I need is a ‘Standalone Flash Programmer’: the ability to flash one or multiple boards without debugging.