Samuel Jacob's Weblog

Just another technical blog

CodeLite – IDE for C

with 4 comments

For my C projects I was using Notepad++ as my editor/IDE for some time. Although notepad++ is good, it is lacking the integration with a code browser, source control and debugger. I came to know about a new IDE – CodeLitewhen I was searching for ctags for windows. It has integrated support for Subversion, ctags, gdb.

codelite
Since it is advertised to have multi-platform GUI, I was little reluctant to install and try(I have tried lot of multi-platform GUI applications and never satisfied with the look and feel of them). But wxWidgets makes the CodeLite to look like native windows application. CodeLite has lot of features and it looks very similar to Microsoft VC++ IDE.

Code browsing is very easy with CodeLite. It is has a very light explorer and also workspace view through which you can browse your project “easily”. You can switch between header and c file “easily” using the “Swap Header/implementation file” in the context menu. Context menus “Goto declaration” and “Goto Implementation” are handy to browse through code quickly.

If you are using cygwin and custom makefile – you can use a script as custom build command – see Notepad++ as IDE post for more details.

I use the following command to build(because I use gcc cross compiler)
[shell]c:\cygwin\bin\bash -l -c ‘cd $ACE_ROOT/src;PATH=/usr/cross/i586-elf/bin/:$PATH:;make 2> err; sed -e “s@\(\/cygdrive\/\)\([a-zA-Z]\)@\2:@g” err; rm err’. [/shell]
And the following command to clean
[shell]c:\cygwin\bin\bash -l -c ‘cd $ACE_ROOT/src;PATH=/usr/cross/i586-elf/bin/:$PATH:;make clean’[/shell]

Codelite supports debugging through gdb; embedded and remote targets also supported. Since I am using a emulator to test my kernel, I have to use remote debugging in GDB to test my OS. Codelite integrates well with GDB remote debugging. I use the following GDB commands as startup gdb commands.
[shell]
set print pretty on
directory src/kernel

symbol obj/kernel.sys
source img/gdb/general.gdb

source img/gdb/stack.gdb
source img/gdb/vm.gdb
[/shell]

If SVN is configured, using codelite you can see difference between two versions of a same file.
By default codelite uses the default diff viewer. 
It can be changed from Plugins menu -> Subversion->Options and setting the value appropriately. 
I use WinMerge to see difference of source files and have the following settings:
External Diff viewer: C:\Program Files\WinMerge\WinMergeU.exe
Arguments : /dl %bname /dr %mname %base %mine 

Another good thing about CodeLite is it is under development and your bug report/feature requests are solved within short time frame.

You can download CodeLite from www.codelite.org. It has installer for Windows and Linux also.

Written by samueldotj

September 21st, 2008 at 11:33 pm

Posted in C,Softwares,Windows