CHDK Wiki
Register
Advertisement

Requirements[]

If you want to modify the existing CHDK sources to build your own version, you need:

  • Knowledge of the programming language C. (online tutorials and resources)
  • A simple text editor to modify the source code or an advanced texteditor with syntax highlighting (for example Notepad++) or a C development environment.
  • The source code (How to get it).
  • Instructions how to compile the CHDK, which can be found here: Linux, Windows and Mac OS X.
  • A SVN-client may be useful if you want to participate in the CHDK development or if you want to keep your own version always up-to-date (see here).

Procedure[]

The procedure itself is pretty straightforward: Try to figure out what the source code does, apply modifications as you see fit, compile it and test it on your camera.

Don't be afraid to change anything! From a safety point of view you can modify any files. There is no code in the sources which allows to update (rewrite) the original firmware (read here). So, the worst thing which can happen is just that the new code wont work. If that happens, turn off the cam or remove the batteries, and everything should be fine again.

Source Guide[]

The Source Code in the assembla subversion repository. As of late June 2022, assembla requires a login to access SVN repositories. You can use guest/guest (details).

Notice

CHDK source was split into two main streams effective Dec 26,2011. A stable stream was created as a branch and the main trunk became the development or unstable stream.


SVN Link : Stable branch

SVN Link : Development trunk

trunk - This is where the latest CHDK development version is built from. It may contain in-development features or undergo significant changes.

    • bin - Binaries. Normally empty. You will find your binaries here after compiling the source.
    • CHDK - Files intended for CHDK directory on the SD card.
    • core - The core of the CHDK. If you like to add something or modify the existing functionality, this is probably the only folder you need to look into. (Maybe also modules, 'lib' and 'include'.)
    • doc - Documentations. Not necessarily needed for compiling your own version.
    • fonts - Fonts. Not needed for compiling your own version.
    • include - Header files. Also see 'core'.
    • lib - Libraries: some math and standard C functions, uBASIC, fonts, other "separate" stuff. Also see 'core'.
    • loader - Initial code ran by camera. Sets up various things. No need to modify anything here (except perhaps if you want to port the CHDK onto a new camera model).
    • modules - CHDK loadable modules. Used for features are only loaded at certain times, to reduce memory requirements.
    • platform - Camera-/Firmware-dependent code. You only need to modify anything here if you want to add new references to functions of the original firmware.
    • platform/generic - Camera-/Firmware-independent code. You only need to modify anything here if you want to add new references to functions of the original firmware.
    • tools - Tools to make life easier :). You only need to modify anything here if you want to add new references to functions of the original firmware.

branches - Branches are used for both stable version(s) of the CHDK tree and for special development versions.

  • release-1_N - Where N is a version number. These branch hold stable releases. The highest N is the stable release available from the CHDK stable autobuild. The only changes made to this branch are bug fixes and possibly addition of new ports.

historical-branches Archived versions of very old branches and some branches which have since been merged into the main branches.

Links[]

Advertisement