Difference between revisions of "KDevelop"
Line 41: | Line 41: | ||
KDevelop allows to document project with the integrated [http://en.wikipedia.org/wiki/Doxygen Doxygen]. Currently [http://elphel.cvs.sourceforge.net/elphel/elphel353-7.1/prep_kdevelop.php?revision=1.6&view=markup prep_kdevelop.php] creates Doxyfile that lists all the files created or modified for Elphel project (as listed in the [http://elphel.cvs.sourceforge.net/elphel/elphel353-7.1/src.list?view=markup src.list], you may customize it by editing Doxyfile. | KDevelop allows to document project with the integrated [http://en.wikipedia.org/wiki/Doxygen Doxygen]. Currently [http://elphel.cvs.sourceforge.net/elphel/elphel353-7.1/prep_kdevelop.php?revision=1.6&view=markup prep_kdevelop.php] creates Doxyfile that lists all the files created or modified for Elphel project (as listed in the [http://elphel.cvs.sourceforge.net/elphel/elphel353-7.1/src.list?view=markup src.list], you may customize it by editing Doxyfile. | ||
− | '''Build -> Build API Documentation''' in KDevelop runs Doxygen and creates project Documentation. '''Tools -> Preview Doxygen | + | '''Build -> Build API Documentation''' in KDevelop runs Doxygen and creates project Documentation. '''Tools -> Preview Doxygen Output''' generates documentation for the currently selected file. |
Among several documentation formats generated by Doxygen there is the [http://docs.elphel.com/elphel353-7.1/ HTML one] | Among several documentation formats generated by Doxygen there is the [http://docs.elphel.com/elphel353-7.1/ HTML one] |
Revision as of 20:55, 7 August 2008
Contents
Using KDevelop with Elphel cameras software
It is now possible to use KDevelop (Integrated Development Environment) with Elphel cameras software. KDevelop provides graphical user interface to what was console environment only.
Installing
In order to use this feature you first need to install Elphel software - either the latest release from the Sourceforge (not yet released) or from CVS (i.e. downloading, unzipping and runningelphel353_install_from_cvs.sh).
After the software is installed (it takes some time to run ./install_elphel) you may navigate to the project root directory and run
./prep_kdevelop.php --strict
This script will require several pieces of the software to be installed - the first one is PHP (>=5.0.0) itself (including php5-cli). If PHP is installed in other than
/usr/local/php
directory, you may run the script with the following command:
php prep_kdevelop.php --strict
With the '--strict' option this script will terminate if any of the required programs is missing (and output what exactly is needed to be installed). If all dependencies are satisfied the script will continue and create/modify several files:
- elphel353.kdevelop - KDevelop project, you may open it with KDevelop application by mouse-clicking this file in the file manager
- tags - ctags index file, used by KDevelop to locate where the current name is declared or defined
- ctags_excludes - list of directories (with wildcards) to exclude from ctags indexing (i.e. drivers for other architectures)
- Doxyfile - Doxygen configuration (including the list of the subdirectories to scan) - used to generate documentation
- templates - directory for custom file templates (headers for the new files)
- templates/c - template for the C source files
- templates/cpp - template for the C++ source files
- templates/h - template for the C/C++ header files
- templates/php - template for the PHP files
- templates/v - template for the Verilog HDL source files
- templates/tf - template for the Verilog HDL test fixture files
- templates/ucf - template for the user constraint files (used with Verilog files)
- ~/.kde/share/config/kdeveloprc - KDevelop configuration file.
Usage
KDevelop itself is documented on the KDE web site so below are only Elphel-specific notes.
Building Firmware
The complete firmware for the camera can be created with Build -> Build Project, it is the same as running
. ./init_env make
from the project top directory, the difference is that in KDevelop you can click on the error/warning message and jump to the source code.
Building camera applications
If you need to (re)build just a single application in the camera, not the whole image - you may (while the source file is selected in the editor) use Build -> Compile - it is similar to running
make install
in the directory of the source file. After successful completion of this command you may ftp (or scp) the produced binary to the camera file system.
Creating Project Documentation
KDevelop allows to document project with the integrated Doxygen. Currently prep_kdevelop.php creates Doxyfile that lists all the files created or modified for Elphel project (as listed in the src.list, you may customize it by editing Doxyfile.
Build -> Build API Documentation in KDevelop runs Doxygen and creates project Documentation. Tools -> Preview Doxygen Output generates documentation for the currently selected file.
Among several documentation formats generated by Doxygen there is the HTML one
Using Ctags
Ctags indexes names in the source file tree and KDevelop uses this index to find definitions/declarations from the source code editor (appears in the context menu for the selected name). Ctags program is ran by the prep_kdevelop.php, you may also recreate the index from KDevelop by selecting Ctags tab in the bottom and pressing Regenerate button.
prep_kdevelop.php also creates ctags_excludes (in the project top directory) with a wildcard list of directories excluded from indexing - i.e. some names appear in the files for each architecture - that makes it difficult to find the relevant one (in arch/cris). You may additionally limit (or expand) the scanned tree by modifying ctags_excludes file.
Note: there is a known but unresolved issue - on some installations Ctags works with Verilog (as it is supposed to), on others - Ctags items do not appear in context menu for names in Verilog files.