Freescale Codewarrior MCU 10.2 on Debian Jessie (amd64)

These are largely notes to self. So, dont sweat. Go elsewhere for entertainment.

Freescale Codewarrior MCU 10.2 requires a 32bit environment to work. So, you need to first set that up.
$dpkg --add-architecture i386
$apt-get update
$apt-get install gcc-multilib g++-multilib
$apt-get install libexpat1:i386
$apt-get install libxt6:i386
$apt-get install libswt-gtk-3-jni:i386
$apt-get install libswt-gtk-3-java:i386
$apt-get install gnome-themes-standard:i386
Codewarrior looks for "", so we need to create a link for it.
$ln -s /lib/i386-linux-gnu/ /lib/i386-linux-gnu/
Run the installer as root and install the IDE into /opt/Freescale. After the installer is done, replace the contents of "/etc/udev/rules.d/25-pemicro.rules" with:
SUBSYSTEM!="usb", ACTION!="add", GOTO="kcontrol_rules_end"

ATTRS{idVendor}=="15a2", ATTRS{idProduct}=="0035", GROUP="plugdev", MODE="0664"
ATTRS{idVendor}=="15a2", ATTRS{idProduct}=="0042", GROUP="plugdev", MODE="0664"
ATTRS{idVendor}=="15a2", ATTRS{idProduct}=="0058", GROUP="plugdev", MODE="0664"
ATTRS{idVendor}=="15a2", ATTRS{idProduct}=="005E", GROUP="plugdev", MODE="0664"
ATTRS{idVendor}=="15a2", ATTRS{idProduct}=="005F", GROUP="plugdev", MODE="0664"
ATTRS{idVendor}=="1357", ATTRS{idProduct}=="0001", GROUP="plugdev", MODE="0664"
ATTRS{idVendor}=="1357", ATTRS{idProduct}=="0503", GROUP="plugdev", MODE="0664"
ATTRS{idVendor}=="1357", ATTRS{idProduct}=="0504", GROUP="plugdev", MODE="0664"

The above rules are required to make your USB-multilink programmer work. Your 'user' should be part of the 'plugdev' group. Launch "/opt/Freescale/eclipse/cwide" and all should be well :)



Balachandran S said...

Can you do an
ls -l /opt/Freescale/eclipse/cwide

and show us that it is really not a softlink to emacs ;)

Joe Steeve said...

I use 'cwide' to generate Makefiles, which I eventually call from Emacs :D I am not crazy to use that joke of an IDE.

The codewarrior toolchain is proprietary and has its own set of quirks. I am still figuring out the details. Once I figure that out, I'll eliminate the cwide from the scene.

However, debugging could still be an issue. Making SDCC and tools to dance with this micro-controller is too time consuming at the moment. But, has to be done eventually :)