EclipseCDT

Table of contents
No headers

This is a mini-howto use Eclipse CDT to develop/debug Nios2 uClinux application.

First, follow DebugApps and install nios2 gdb.

Next, make use your Linux PC have a working JAVA runtime. Then download  Eclipse IDE for C/C++ Developers- Linux (63 MB) .

tar zxf  eclipse-cpp-europa-fall2-linux-gtk.tar.gz
cd eclipse
./eclipse

It will ask you for the path of work space. Then then eclipse front page window will come out, select workbench on the right. 

Create a new project with, File-->New-->C project
enter project name, eg. hello
project types, executable , Hello world ANSI C Project, (or empty project and add your source).
Finish.

Setup for nios2 toolchain,
Project-->Properties
C/C++ build --> Settings ,
  GCC C Compiler, command: nios2-linux-uclibc-gcc
  GCC C Linker,      command: nios2-linux-uclibc-gcc, miscellaneous Linker flag :  -Wl,-d -Wl,-elf2flt
Run/Debug Settings, New_configuration, Edit,
  Main, project: hello, C/C++ application: Debug/hello.gdb
  Debugger, Debugger: gdbserver Debugger,
      Debugger options, 
           Main - GDB Debugger : nios2-linux-uclibc-gdb
           Connection - type : TCP, Host name or IP address: 192.168.1.29, port number: 9999,
OK.

Now compile the application,
Project-->Build project

Copy from your workspace/hello/Debug/hello to romfs/bin in uClinux-dist or transfer it to nios2 target via ftp,nfs etc.
Build the image, start uClinux, and config the ethernet ip, eg 192.168.1.29 . The start the gdbserver listening on an unused port eg 9999,
gdbserver localhost:9999 /bin/hello
It will display,
Process /bin/hello created; pid = 20
Listening on port 9999

Start the debugger,
Run--> Debug as -....  or Open Debug dialog (make sure settings are correct), Debug, 

It will ask you to switch to Debug perspective, and you may view the soruce, set break points and step in.

If you got "out of memory" error, you need to enlarge the heap size from default 256M to a larger one. eg, 512M. You need this only once.
./eclipse -vmargs -Xmx512M

You may update the CDT with,
Help--> Software Updates --> Find and Install , Finish,  select the mirror and update.

Links,
http://www.eclipse.org/

Tag page
Viewing 1 of 1 comments: view all
The louis vuitton division was the best performer for its parent company, luxury lv bags on sale LVMH, in 2009.The Omega louis vitton Regatta will enable the all-Italian Azzurra team to fine tune their match racing skills and louis vuitton damier azur local knowledge before the start of the much awaited louis vuitton on sale Trophy, scheduled to run from ninth to 21st March 2010. Azzurra will try to defend its 2:0 victory of the previous louis vuitton Trophy event held in Nice last November against the local favourites Emirates Team New Zealand.
Posted 01:27, 9 Mar 2010
Viewing 1 of 1 comments: view all
You must login to post a comment.
SourceForge.net