Skip to content

EclipseCdt RetroBsd On Ubuntu

Sergey edited this page May 11, 2015 · 1 revision

How to build retrobsd on pic32 with eclipse CDT on Ubuntu

TODO

Eclipse CDT provide completion code navigation svn integration and other good things. Tanks to the Ant and makefile ; Retrobsd can be build with eclipse CDT. In this howto wi will use eclipse to checkout retrobsd, and build it with an ant task.

== Install eclipse ==

=== download eclipse CDT at eclipse.org === http://www.eclipse.org/cdt/

unpack it where you want on your system, and launch it

=== install subversion client in eclipse=== go to menu>help>eclipse marketplace in the searchBox paste "subclipse"; and when founded install it. When eclipse ask you to restart eclipse, do it it's important for eclipse health and you for you to. Subclipse allow you to create project from repository.

Subclipse need javaHL a kind of wrapper to talk from java to subversion API. You should install it : {{{ $ apt-get install libsvn-java }}} edit the eclipse/eclipse.ini file and add this behind "vmargs" {{{ ... -vmargs -Djava.library.path=/opt/CollabNet_Subversion/lib ... }}} You can tweak the eclipse.ini to allow more RAM to eclipse, it depend on the RAM you have got on your machine. Be aware that what you give to eclipse, eclipse use it...

On Ubuntu you should edit this file ~/.subversion/config and remove comment for "password-stores =" let password store empty. It's a workaround due to a bug in password keyring your file should look like that : {{{ ... [auth]

Set password stores used by Subversion. They should be

delimited by spaces or commas. The order of values determines

the order in which password stores are used.

Valid password stores:

gnome-keyring (Unix-like systems)

kwallet (Unix-like systems)

keychain (Mac OS X)

windows-cryptoapi (Windows)

password-stores = ... }}}

=== Install ant ===

Ant is a great utility it can be use for build automation. First of all you must install ant in eclipse because it's not bundle in eclipseCDT. let'go to eclipse market place menu bar>Help>eclipse market place. At the bottom of the window you have 2 icons used to select a market place. You must choose the second one because ant cant be found on the default market place. So click it and paste "Eclipse java development Tool" we will not develop in java but ANT is considered as a java tool. Install the founded "Eclipse java development tool". When eclipse ask you to restart eclipse, do it it's important for eclipse health and you for you too.

== checkout retrobsd ==

Open eclipse and choose : menu bar >file>import in the window there is a filter input box; type "svn" in it and click on checkout from svn repository. choose create svn repository location and paste the link to the Google svn repository. {{{ http://retrobsd.googlecode.com/svn/trunk/ }}} Choose next, select the trunk and choose next again. Choose check as a project in workspace, name the project retrobsd and click on finish. Subclipse will download the head revision of retrobsd.

== build retroBsd == on the menu bar select : window>show view >other. In the filter box type "ant" an ant view will be added to eclipse. In the project explorer, select the build.xml file, drag and drop it in the ant view.

Before use of ant task you need to install the mips compiler and some libs : On Ubuntu, you can install it by command: {{{ sudo apt-get install byacc libusb-0.1 libconfuse-dev libelf-dev libusb-dev }}}

Download GNU C compiler package:

  • [http://retrobsd.googlecode.com/files/gcc461-mips-linux.tgz gcc461-mips-linux.tgz] -- for Linux (21 Mbytes)

Unpack and install the compiler: {{{ tar xzf gcc461-mips-*.tgz -C /usr/local }}}

double click on the ant task named make, it will compile retrobsd. You can add some task in the build.xml file if they are in the makefile. On linux make load must be launch with the root privilege so launch it with command line.

references
sublcipse http://subclipse.tigris.org/wiki/JavaHL#head-3a1d2d3c54791d2d751794e5d6645f1d77d95b32

build retrobsd without Eclipse
http://code.google.com/p/retrobsd/wiki/How_To

create the build.xml http://www.ibm.com/developerworks/aix/library/au-unix-eclipse/index.html