
TechConficio
Castalia + Eclipse Juno
updated from http://castalia.npc.nicta.com.au/installationEclipse.php
Took these steps to get Castalia 3.2 working under Eclipse Juno on OS X 10.8.2:
1. Install Eclipse and CDT (C/C++ Dev Tools)
2. Download Castalia (latest, which for me is 3.2)
3. In Eclipse, create a new makefile-based C++ project (e.g., “CastaliaSim”)
• File/New/C++ Project
• Select Makefile project in Project Type, then select Empty Project
• Provide name of project, click Finish
4. Copy all of downloaded Castalia files into new project folder (i.e., into CastaliaSim)
• Don’t worry about missing config directory…
5. Refresh Eclipse project. All the copied files/directories should show up in Eclipse
6. Right-click Eclipse project (CastaliaSim) and select Make Targets/Create…
• Make three (3) targets
• all: type “all” at the “Target Name” and “all” at the “Make Target”
• clean: type “clean” at the “Target Name” and “clean” at the “Make Target”
• cleanall: type “cleanall” at the “Target Name” and “cleanall” at the “Make Target”
• For each, the Build command needs to be set to a script so that we can get around an OS X and Eclipse shortcoming for PATH variables (or my lack of knowledge and Google-fu)
• Create a bash script eclipseMake.sh with the following contents:
where the bash script “.pathsrc” contains bash commands to set and export your PATH variable, including the absolute path to the omnetpp/bin
• and make executable (“chmod +x eclipseMake.sh”)
7. The make targets are ready:
• The targets are ready and can be found in the Make Target view on the right
8. As suggested in the InstallationEclipse reference, a makemake script can be created
• Right-click Eclipse project (CastaliaSim) and select Make Targets/Create…
• Create the eclipseMakemake.sh with the following contents:
where the bash script “.pathsrc” contains bash commands to set and export your PATH variable, including the absolute path to the omnetpp/bin
• and make executable (“chmod +x eclipseMakemake.sh”)
• NOTE: so that Eclipse could find my $PATH, I had to take all my .bashrc PATH definitions and put them in a separate bash script that was sourced by eclipseMakemake.sh
9. You might try making a run configuration for simulations...
• Since it’s better to run the simulation in the specific Castalia/Simulations/ directory, I don’t recommend it.