CHDK Wiki
(rewrite)
(→‎Source Guide: update stable trunk svn link)
(12 intermediate revisions by 8 users not shown)
Line 11: Line 11:
 
* A simple text editor to modify the source code or an advanced texteditor with syntax highlighting (for example [http://notepad-plus.sourceforge.net/uk/site.htm Notepad++]) or a C development environment.
 
* A simple text editor to modify the source code or an advanced texteditor with syntax highlighting (for example [http://notepad-plus.sourceforge.net/uk/site.htm Notepad++]) or a C development environment.
 
* The source code ([[Compiling_CHDK_under_Windows#The_sources|How to get it]]).
 
* The source code ([[Compiling_CHDK_under_Windows#The_sources|How to get it]]).
* Instructions how to compile the CHDK, which can be found here: [[Compiling_CHDK_under_Linux|Linux]], [[Compiling_CHDK_under_Windows|Windows]].
+
* Instructions how to compile the CHDK, which can be found here: [[Compiling_CHDK_under_Linux|Linux]], [[Compiling_CHDK_under_Windows|Windows]] and [[Compiling_CHDK_under_Mac_OS_X|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 [[Compiling_CHDK_under_Windows#The_sources|here]]).
 
* 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 [[Compiling_CHDK_under_Windows#The_sources|here]]).
   
Line 21: Line 21:
   
 
== Source Guide ==
 
== Source Guide ==
 
[https://tools.assembla.com/chdk/browser The Source Code] on SVN Trak.
   
  +
{{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.}}
[https://tools.assembla.com/chdk/browser The Source Code]
 
  +
* '''trunk''' - This is probably the one you are using on your camera and which you want to modify. this is the MAIN CHDK tree
 
  +
SVN Link : [http://subversion.assembla.com/svn/chdk/branches/release-1_1/ Stable trunk]
  +
  +
SVN Link : [http://subversion.assembla.com/svn/chdk/trunk/ Development trunk]
  +
  +
'''trunk''' - This is where the latest CHDK development version is built from. It likely contains code that is unstable and not well tested. It is NOT the source for the stable versions available from the CHDK autobuild server.
 
** '''bin''' - Binaries. Normally empty. You will find your binaries here after compiling the source.
 
** '''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 'lib' and 'include'.)
 
** '''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 'lib' and 'include'.)
 
** '''doc''' - Documentations. Not necessarily needed for compiling your own version.
 
** '''doc''' - Documentations. Not necessarily needed for compiling your own version.
Line 32: Line 39:
 
** '''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).
 
** '''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).
 
** '''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''' - 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.
 
** '''script''' - Example scripts. Not needed for compiling your own version.
 
** '''script''' - Example scripts. Not needed for compiling your own version.
 
** '''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.
 
** '''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.
There are few branches in there worth mentioning:
 
  +
:* '''release-1_0''' - the stable branch as of Dec 26, 2011. This branch holds the latest stable release available from the CHDK autobuild server. The only changes made to this branch are bug fixes and the addition of new cameras as they are ports.
 
* '''branches'''
 
** '''dataghost''' - DataGhost's experimental branch with LOTS of nice things he found out (mainly about the s5is) - see [http://chdk.setepontos.com/index.php/topic,1365.0.html here]
 
** '''grand''' - grAnds original branch
 
** '''juciphox''' - a quite new branch created by Jucifer and PhyrePhoX which then later was merged into the main CHDK
 
** '''old-trunk''' - well, the old trunk - before the merging of JuciPhoX
 
** '''vitalyb''' - backup of the original branch by the founder of CHDK - vitalyb
 
   
note that most of these branches are abandoned and discontinued now
+
:There are also a few older branches in there worth mentioning. Note that all of these branches are abandoned and discontinued now.
 
:* '''dataghost''' - DataGhost's experimental branch with LOTS of nice things he found out (mainly about the s5is) - see [http://chdk.setepontos.com/index.php/topic,1365.0.html here]
 
:* '''grand''' - grAnds original branch
 
:* '''juciphox''' - a quite new branch created by Jucifer and PhyrePhoX which then later was merged into the main CHDK
 
:* '''old-trunk''' - well, the old trunk - before the merging of JuciPhoX
 
:* '''vitalyb''' - backup of the original branch by the founder of CHDK - vitalyb
  +
:* '''Read more about it [http://chdk.setepontos.com/index.php/topic,2297.0.html here].'''
   
 
== Links ==
 
== Links ==
 
* [[Adding support of a new camera]]
 
* [[Adding support of a new camera]]
 
* [[PropertyCase|List of Propertycases]]
 
* [[PropertyCase|List of Propertycases]]
  +
* [[Params|List of Params]]

Revision as of 17:59, 28 July 2012

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 on SVN Trak.

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 trunk

SVN Link : Development trunk

trunk - This is where the latest CHDK development version is built from. It likely contains code that is unstable and not well tested. It is NOT the source for the stable versions available from the CHDK autobuild server.

    • 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 '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).
    • 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.
    • script - Example scripts. Not needed for compiling your own version.
    • 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_0 - the stable branch as of Dec 26, 2011. This branch holds the latest stable release available from the CHDK autobuild server. The only changes made to this branch are bug fixes and the addition of new cameras as they are ports.
There are also a few older branches in there worth mentioning. Note that all of these branches are abandoned and discontinued now.
  • dataghost - DataGhost's experimental branch with LOTS of nice things he found out (mainly about the s5is) - see here
  • grand - grAnds original branch
  • juciphox - a quite new branch created by Jucifer and PhyrePhoX which then later was merged into the main CHDK
  • old-trunk - well, the old trunk - before the merging of JuciPhoX
  • vitalyb - backup of the original branch by the founder of CHDK - vitalyb
  • Read more about it here.

Links