Ruben Laguna's blog

Feb 11, 2011 - 3 minute read

Compiling OpenChronos in Windows

I got the EZ430 Chronos some days ago and after play around a little with the Code Composer Studio v4 that comes with it (the free code size limited version) I got the TI firmware compiled and uploaded to the watch. Then I realized that what I compiled it was a stripped down version of the firmware called Limited as the code-size-limited CCSv4 cannot be used to compiled the Unrestricted firmware.

So now to get a decent firmware in the EZ430 I need either the full CCSv4 or another toolchain for the MSP430 MCUs with specific support for CC430F6137 which is the processor present in the eZ430-Chronos . CCSv4 is quite expensive: ~500USD so I started looking for other toolchains.

I tried mspgcc but it didn’t really work for me. I was getting compilation errors, and I didn’t feel like investigating those. Then I turn into OpenChronos which seems to be the TI firmware but just modified enough to be able to compile using the mspgcc4 toolchain so I started exploring that path.

I couldn’t get the Win32 port of mspgcc4 to work properly (seems to me that the Win32 has been updated in a while). So at the end I had to use it from Cygwin . These are the steps that I took:

  1. Install wget, patch, gcc 4 , make, python and perl in Cygwin

  2. Download the source distribution of mspgcc4

  3. Unpack it inside a Cygwin bash shell

    cd tmp
    tar xvjf /cygdrive/c/Users/xxxx/Downloads/mspgcc4-20110130.tar.bz2

  4. Build mspgcc

    cd mspgcc4-20110130

    Select gcc-4.4.5, no gdb, no insight, ti_20110130, and the rest of the defaults.

  5. After a long compile mspgcc4 should be installed in /opt/msp430-gcc-4.4.5/

  6. Add export PATH=$PATH:/opt/msp430-gcc-4.4.5/bin to ~/.bashrc

  7. Download OpenChronos

    cd ~
    git clone git://
    Cloning into OpenChronos...
    remote: Counting objects: 1485, done.
    remote: Compressing objects: 100% (550/550), done.
    remote: Total 1485 (delta 972), reused 1364 (delta 877)Receiving objects 93%
    Receiving objects: 100% (1485/1485), 666.11 KiB | 411 KiB/s, done.
    Resolving deltas: 100% (972/972), done.
  8. Configure the build cd OpenChronos make config

  9. Select the proper frequency (868Mhz if you are in Europe) and save

  10. Run make

    Assembling even_in_range in one step for MSP430...
    msp430-gcc -D_GNU_ASSEMBLER_ -x assembler-with-cpp -c even_in_range.s -o even_in_range.o
    Compiling main for MSP430...
    msp430-gcc -mmcu=cc430x6137 -Os -Wall -fomit-frame-pointer -fno-force-addr -finline-limit=1 -fno-schedule-insns -Wl, -o build/eZChronos.elf logi
    ronos.o gcc/intrinsics.o even_in_range.o
    Convert to TI Hex file
    python tools/ -i build/eZChronos.elf -o build/eZChronos.txt
    ELF section .text at 0x8000 32224 bytes
    ELF section .data at 0xfde0 150 bytes
    ELF section .vectors at 0xff80 128 bytes
    convert to TI Hex
  11. Upload the new compiled firmware build/eZChronos.txt using the Wireless update feature of Chronos Control Center (you have to have the USB access point connected, of course)

    1. Select the firmware file c:/cygwin/home/xxxxxx/OpenCronos/build/eZChronos.txt
    2. Click on Update Chronos Watch button
    3. In the watch, navigate to rFbSL (using the # button) and start it (by holding #). If everything goes at it should the download will start and you will see the percentage of firmware tranferred so far in the watch screen (also in Chronos Control Center).

If you think that there is something missing or not clear, leave a comment.