This tutorial was extracted from Erich Styger blog http://mcuoneclipse.wordpress.com with his agreement.
Freescale has released in May 2013 an updated version of CodeWarrior: version 10.4. I’m usually not switching a tools version in the middle of a university semester. Unless I see a real benefit, and the risk is low. Well, I have used it now for a few days, and I have decided to move my projects from 10.3 to 10.4. Why? Read on…
To switch or not, that’s the question…
As with any new software or new versions, it is always a judgement call between ‘never change a running system’ and ‘make a move to something new’. Or to answer the questions: is it worth the risk? Or is there anything new I despertaly need?
That new release comes with support for new microcontroller (new Kinetis and S12Z cores), 64bit floating point for S12Z, C++ support for DSC (Digital Signal Controllers), and many more. But in my context and with the projects I have at the university, the following things are by far more interesting:
- New ARM gcc 4.7.3: new updated GNU tool chain from ARM Inc.
- Component Development Environment (CDE) comes with free Community Edition license: Now everyone can create new Processor Expert components!
- Ease-of-Use: many smaller things which makes it easier to use: exporting register values in CSV format, easier to read registers view, renaming Processor Expert folders and components, …
- Improved performance: the release note lists IDE and debugger, both for startup and debugging.
Especially the last item is of big interest: I have tight schedules too (not only the students with their assignments
).
Installation
I admit: the installation is not new to 10.3, but I received several questions and requests for tips around CodeWarrior installation, so here we go….
MCU10.4 is not an update, it is a full installer. It does not need a license upgrade, as earlier 10.3 licenses work with the 10.4.
10.3 license files work, but as for 10.3: existing 10.x licenses prior 10.3 need an upgrade.
As the earlier V10.3 version, it can be downloaded from here in two versions:
- Online Installer: here the download is half of the size (670 MB file size), and the needed other packages are downloaded during installation
- Offline Installer: Here the download is twice as big (1.2 GB file size), and includes all architectures supported.
I prefer the ‘offline’ version. Yes, that’s a huge file. But too many times I have run into network connection problems, so at the end I saved time to just get the full stuff.
It comes either as ‘Evaluation’ or ‘Special Edition’:
- Evaluation: it installs a 30 day professional license, time bombed.
- Special Edition: same software, it just does not install that 30 day professional license. The free limits apply, e.g. 64 KByte code size for Kinetis ARM Cortex-M0+ or 128KB for Kinetis ARM Cortex-M4 derivatives.
So the ‘Evaluation’ is really the same as ‘Special Edition’. So no real sense to download the Special Edition at all. I can download the Evaluation, and then I get a 30 day full license (it does not work to re-install the product to get again a 30 day license
). If I’m annoyed by the ‘your license will expire in x days’ dialog, I simply can rename/remove the MCU\license.dat file, and I’m at special edition level
![]()
Launching the ‘offline’ version will extract the files into a sub-folder, because the .exe downloaded is a self-extracting executable:
Extracting Offline Version
After unpacking, all the files are that sub-folder, where the Setup.exe ist the installer:
Unpacked MCU10.4 Files
For my classroom installation, I only need to pass the Setup.exe plus the .zip files for the architectures I want to support/install. E.g. for Kinetis I only need the setup.exe plus the com.freescale.mcu10_4.kinetis.updatesite.zip: which then makes 850 MByte which is easier to distribute in the class. And if needed, the other .zip files can be installed with ‘Add new software’ inside Eclipse.
There is no need to uninstall an earlier CodeWarrior version. Actually I always recommend to keep the previous version. I install the new CodeWarrior into new directory, and then I can switch back and forward between the two versions.
As a negative point: the installation takes a very, very long time: not sure what it is, but it took about one hour to install it on my Windows7 64bit machine, compared to less than 10 minutes e.g. for Code Red. Not sure if this is just my machine? I love to hear your comments if you see the same.
I see about the same installation time with MCU10.3, so this is nothing new. I suspect is has something to do that the installer is using the Eclipse ‘Install New Software’ (Eclipse Updater) technology. It seems to me that the Eclipse Updater way slows down things.
GCC
MCU10.3 has gcc 4.6.2, while MCU10.4 has 4.7.3. I compared the code size for my application with -Os (optimize size) set.
gcc 4.6.2 in V10.3 gives this:
text data bss dec hex filename 33076 88 12192 45356 b12c Freedom_Robo.elf
while gcc 4.7.3 in V10.4 gives this:
text data bss dec hex filename 32924 88 12192 45204 b094 Freedom_Robo.elf
So this is not that big of a difference, just a few bytes less. More important: I have run several of my projects with the new compiler, and no issues found.
But the big plus with the MCU10.4 GNU integration is that it passes now the options to the linker by file: this means that the Windows command line length of 8191 characters is bypassed, and I’m able now to build a full CMSIS library with MCU10.4
.
The other good thing is: gcc 4.6.2 has issues with the generated debug information if optimizations were enabled. Basically often local variables were not displayed correctly. This is now fixed in the new gcc 4.7.3 which makes debugging optimized code a better experience.
The problem I have described here is solved now too: the ARM gcc integration has an extra option to disable the generation of the listing file:
Debugger
In the debugger I noticed that the Registers view is now easier to read. In MCU10.3 I have this for hexadecimal and binary format:
MCU10.3 Registers in Hex
MCU10.3 Registers in Hex
Now with V10.4, the values are padded with leading zeros:
MCU10.4 Registers View Hex
MCU10.4 Registers View Binary
The debugger features now an option to restore watchpoints:
Processor Expert
With MCU10.3 or earlier, it was not possible to ‘freeze’ the code generation for the CPU component:
Integration of Processor Expert with C++ is easier now, as extern "C" is added:
CDE
The Component Development Environment now works at the ‘community’ level free of charge: this means no license file is required any more, so the extra step to copy a license file as described here is not needed any more
.
Performance: IDE, Build and Debug
Eclipse is probably not the fastest IDE in the world, for many reasons (maybe it is just too powerful
). What I noticed is that compared to V10.3, it is ‘snappier’. Startup time, build time and the time to launch the debugger were noticeable faster. So I decided to do a simple comparison (all numbers in seconds).
First, starting up a workbench with Eclipse:
That’ already good news, but I do not need to start-up IDE as much as I do need to build my projects. So I compared to rebuild my Zumo projects which can be considered as a ‘medium’ size project (~200 source files):
Wow! Now this now much faster
. Next, to start the debugger for that project:
So an improvement here as well
Ease-of-Use: Highlighting of Active Project
CodeWarrior marks now the active project with a bold font. If I’m in a source file, then the project where this source file belongs to is marked with a bold font:
highlight of active project
That’s a very useful feature, as this tells me which project I will debug if I press the debug button:
Debugging Active Project
Processor Expert
My Processor Expert components work without changes in V10.4, and the components are shared between 10.3 and 10.4, so both installation are using the same user components.
Summary
I decided to move on to MCU10.4, mainly for the performance reasons. The improvements in debugging and build time were obviouse when I switched back and forward between MCU10.3 and MCU10.4. I have used MCU10.4 for a few days, and tried many of my existing MCU10.3 projects, and no issues found. I would not switch versions if I’m in the middle of a critical project. This is not the case for me, so I can take the risk. As I still can keep my earlier 10.3 installed, I always can go back (just in case). The other features and ease-of-use things were not that important at the first look, but now as I have moved them more and more and explore new things, I definitely do not want to go back. Otherwise, you will hear from me, promised

















