Freescale has released this week 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.
💡 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:
After unpacking, all the files are that sub-folder, where the Setup.exe ist the installer:
💡 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:
Now with V10.4, the values are padded with leading zeros:
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:
That’s a very useful feature, as this tells me which project I will debug if I press the debug button:
So no further guessing 🙂
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 🙂
Happy Coding 🙂
Nice! I also installed it some days ago (also took a long time) but didn’t get a chance to play with it. Does USBDM still work?
Thanks
LikeLike
Hi Andrei,
so I’m not alone with this long installation time. About USBDM: I started looking into this. I see that USBDM installer knows about MCU10.1, MCU10.2 and MCU10.3, and MCU10.4 is not known to it. I need to find out what the installer does to enable USBDM in the wizard. I have not found it out yet.
LikeLike
I gave it a try. Using the Offline installer. Dell laptop with i5 CPU, Windows 7-64, about 3 years old. Took just about 30 minutes.
LikeLike
Hi Bill,
Thanks for the information. I have about the same machine, but yours is somehow much faster. Did you install all architectures, or only Kinetis? I installed the full set. Still I think 30 minutes is too long if this is just for Kinetis.
LikeLike
I installed Coldfire, S08, and Kinetis.
PC is i5 2.53 GHz, 4GB RAM. Normal laptop type hard disk drive. Not not a powerhouse by modern standards.
I will install it on my desktop and see how that does.
LikeLike
I have pretty much the same, except that it has 8 GB RAM. The have McAffee installed, maybe this is slowing down things.
LikeLike
I was going to time it on 32-bit Windows XP on my old 3 GHz Core 2 Duo desktop. Two tries, got a bluescreen of death near the end both times (on a system that is always rock solid otherwise).
LikeLike
Hi Bill,
that’s concerning. Not sure if this is related to XP. I do not have an XP machine any more, but I was assuming that MCU10.4 would have no issue with XP.
LikeLike
Windows XP 32bit is on the list of supported host OS (XP 32/64-bit (Business)), with 2 GByte of RAM. Maybe you have less RAM?
LikeLike
Nope, 4GB (but XP only can use 3). Didn’t have any problem installing 10.3 (which was fairly recently, in fact). With so many different drivers from so many sources, I’m not really all that surprised things don’t work.
Truth be told I’m still using CodeWarrior 6.3 for MCF51 and my S08 projects.
LikeLike
Yes, 10.3 is from Dec 12, so fairly recent. I’ll poke around, but your system configuration for sure should be supported.
LikeLike
I suspect it’s a problem with too many different drivers fighting over the same ground, vs. an actual bug in the Freescale installer. In theory, no user program can do anything to cause a bluescreen. You need buggy .sys level drivers to do that.
The last thing in the 10.4 install log is P&E Drivers install. And both times just before the bluescreen I heard the Windows “doo-deep” sound effect when something like a USB is being unplugged. I didn’t have any plugged in though. So I’m betting it’s related to those drivers.
I hope CW 6.3 is still working with USBDM after this exercise. Haven’t tried that yet.
LikeLike
What comes to my mind: we had old DELL laptops with XP on it, and we have seen blue screens with Eclipse and other applications. The problem seemed to be around the NVidia graphic drivers. Updating them to the latest and greates version solved the problem. Looks like old/outdated/buggy graphic drives really can bring a windows system down, and it looks like Eclipse is using graphic acceleration functions which might have issues in old drivers. Just a thought.
LikeLike
USBDM has been updated for CW 10.4
http://sourceforge.net/projects/usbdm/files/Version%204.10.5/
LikeLike
Hi Bill,
thanks, yes, received a notification too, I’m installing it right now.
LikeLike
Hi Andrei,
I have USBDM up and running with MCU10.4: https://mcuoneclipse.com/2013/05/05/adding-usbdm-to-codewarrior-for-mcu10-4/
The only thing which did not work is the Wizard XML patch, but I think this is not critical.
LikeLike
Great news. I also see USBDM was updated for 10.4! BTW, I just installed 10.4 on my home machine (AMD quad core, 8 GB, SSD, offline installer, only kinetis) and it took something like 7-8 mins.
LikeLike
Hi Andrei,
yes, I see USBDM 4.10.5 has been released, which is great news. I’m installing it right now. And your installation time is really fast! Ok, I have a normal harddisk, so this might be my problem. I’m still thinking that something in my system slows down the thousands of files the installer is writing. I think it might be the virus scanner, but I cannot switch it off on my machine as per the security policy of my IT departement. I need to find another machine where I have full control, maybe it makes a difference.
LikeLike
CW 10.4 Installation time… wow… After 2+ hours I had to cancel, as something is really amiss. Win 7 64 bit, i7, 8GB ram… this is really not good. I am trying it again and the sad part is that I immediately have two errors just starting to re-install… and get this… The installation program will not overwrite my cancelled install and so I am having to manually delete the 10.4 direction and all of the files… What a mess this is.
LikeLike
Hello,
are you using the online or offline installer? If using the online installer, then things might even take longer as the download times adds up. I recommend to use the offline installer.
LikeLike
Good day Erich,
I used both the online and offline installer. I tried 3 times with the online and bailed after several hours. I tried the offline installer and I had to bail on it after 2+ hours. All times I disabled my Antivirus and firewall. In fact, I really could not use my computer to do anything else, which I found odd considering it is an i7 and 8GB of Ram… I was finally able to install the offline version by booting to safe mode. Running in safe mode allowed me to install the offline version in less than 10 minutes!… although there was one driver install error… that I accepted and the installation continued.
Cheers,
Sam
LikeLike
Hi Sam,
this is really strange and interesting. So it looks something in Windows is slowign down things a lot.
Erich
LikeLike
I thought it was snappier too. Did they change the way the processor expert pull down menus function? They don’t take 5 clicks to change an option now! Perhaps this was a setting I missed in 10.3?
LikeLike
Hi Luke, I’m not sure what takes that 5 clicks? I did not realize a change around what you describe. Can you provide some details?
LikeLike
Erich, In 10.3 I had to click exactly on the down arrow in a component inspector selection box (eg Pin selection, baud rate etc) where as in 10.4 I can click anywhere in the box to get the component inspector pull down menu for that option.
LikeLike
Hi Luke,
now I see what you mean. In 10.4 it opens the drop down with the first click, nice!
But in 10.3 I have not to click on the down arrow: I click into the field once, then twice again, and it shows the list. I had no need to click on the arrow.
But as you say: less clicks now 🙂
Thanks!
LikeLike
Pingback: Switching Processor Package – Simplified in MCU10.4 | MCU on Eclipse
Pingback: Can MCU10.4 recover a bricked OpenSDA Freedom Board? | MCU on Eclipse
Pingback: Low-Level Coding with PDD (Physical Device Driver) | MCU on Eclipse
Pingback: Tutorial: Arduino Motor/Stepper/Servo Shield – Part 1: Servos | MCU on Eclipse
Pingback: Hacking the Heating System for Cooling – Geothermal Drilling with extra Benefits | MCU on Eclipse
Pingback: New CodeWarrior for MCU10.5 | MCU on Eclipse