Geekmug/Compiling CHDK under Windows

Revision as of 12:05, May 17, 2009 by (Talk)

592pages on
this wiki

Presented here are instruction to build CHDK from scratch with GCC v4.x on Win32.

Get Cygwin

Obtain/update a copy with the Cygwin Setup.

Beyond the default install items, you will need to add the following packages:

  • Devel
    • binutils
    • gcc
    • make
    • subversion
  • Libs
    • libgmp-devel
    • libmpfr-devel


Building cross-compiling toolchain

Building binutils

Get the latest version of binutils and download it into "C:\cygwin\tmp". [Update: binutils 2.19 causes issues with chdk booting, 2.18 wouldn't compile on Vista, best to use 2.17]

Start the "Cygwin Bash Shell" from the Start Menu, and unpack binutils:

 > cd /tmp
 > tar -xjf binutils-2.18.tar.bz2
 > cd binutils-2.18

Configure, build, and install binutils:

 > mkdir build
 > cd build
 > ../configure --target=arm-elf --prefix=/arm-elf
 > make
 > make install

Building gcc

Get the latest version of gcc and download it into "C:\cygwin\tmp".

From the "Cygwin Bash Shell", unpack gcc:

 > cd /tmp
 > tar -xjf gcc-4.3.2.tar.bz2
 > cd gcc-4.3.2

Modify the ARM configuration for gcc by removing comments on the following lines in "gcc/config/arm/t-arm-elf":

 MULTILIB_OPTIONS    += mno-thumb-interwork/mthumb-interwork
 MULTILIB_DIRNAMES   += normal interwork

Configure, build, and install GCC:

 > mkdir build
 > cd build
 > ../configure --target=arm-elf --prefix=/arm-elf --enable-languages=c --disable-shared --disable-newlib --disable-libssp
 > make
 > make install

Building CHDK

Get the latest version of CHDK from the subversion repository:

 > cd /tmp
 > svn co chdk
 > cd chdk

Configure CHDK by editing "". Be sure to change the comments to enable your desired camera.

Build CHDK:

 > PATH=/arm-elf/bin:$PATH make fir

Dance like a child.

Around Wikia's network

Random Wiki