Skip to content

IntroductionToTheDevelopmentProcess

PavelKryukov edited this page Sep 30, 2015 · 1 revision

Introduction

This page contains some notes that might be useful for students that start the development of our project. It contains the overview of the SVN structure, the ways to build, test and run the code. Feel free to extend these notes if you think you have something to share.

Our SVN structure

svn:

  • branches -- a side-line of development
    • 2010 -- an archive
    • 2011
      • issues -- branches for feature development
      • sandbox -- a room for your experiment, you are free to create branches here
      • simmy -- development of a very simple education simulator
  • tags -- releases
  • trunk -- the main line of development
    • boost -- sources of the boost library
    • tests -- tests sources, binaries and scripts
    • sources -- the main sources
      • asm -- the mdsp assembler
      • funcsim -- sources of the functional simulator
      • perfsim -- sources of the performance simulator
  • wiki -- a storage for wiki pages
    • images -- all images in wiki must be placed into this folder
    • team-photos -- photos of project participants

Working with code

One can use any text editor of his preference to work with source code, be it Emacs, Vi, VIM, Notepad... But we suggest you to use an IDE (integrated development environment) as they provide convenient editing, navigation and debugging environment. Often an IDE is accosiated with a particular compiler/debugger set.

Supported IDEs

The following main IDEs are supported in our project:

Microsoft Visual Studio

Microsoft Visual Studio (abbreviated as "MS VS" or just "VS") is an integrated development environment from Microsoft. It is widely used in software development for Windows only.

Official site: http://www.microsoft.com/visualstudio/en-us/

We support x86 (32 bit) versions of MS VS 2008 Professional Edition (I am not sure if an Express Edition will be complete enough).

Note that MS VS 2010 can also be used for development, but be sure not to commit to SVN .VCPROJ or .SLN files modified by this IDE as they are backwards incompatible with 2008.

Eclipse CDT

Eclipse is an open source community whose projects are focused on building an extensible development platform.

The CDT Project provides a fully functional C and C++ Integrated Development Environment based on the Eclipse platform.

We will supoprt Eclipse of versions Galileo (3.5.x) and Helios (3.6.x) for both Linux (x86 and x86_64) and Windows x86. More recent versions, if they will come, can be used too. Official site: http://www.eclipse.org/cdt/

Not officially supported IDEs

It was reported that other developement environments can successfully work and build our project. Be aware that there is no support for them - you are on your own with them.

Installation and setup of an IDE

Microsoft Visual Studio

The installation CD image can be acquired from MSDNAA software program site if you are a participant of it (you can become one if you are a MIPT student, and you are). Or, you can ask mentors. Or, just use http://allter.mipt.ru/ to find one. Note that we don't need all .NET, MFC, C# or other additional technologies from Microsoft - just plain Visual C++, so don't install everything from that DVD - just components required for C++ development.

Eclipse CDT

One can download it from the official site, or find on MIPT LAN, or ask mentors for assistance. * Be sure to get CDT not just plain Eclipse! * Choose right OS and architecture as well. In some cases you'll also need Java Runtime Environment if you haven't installed one before.

Note that you'll need a GNU binutils port for Windows installed in order for Eclipse CDT to be able to build your code, either CygWin or MinGW (unsupported). It's recommended to install it before the Eclipse so the latter can automatically detect its presence and save your time on configuration.

Build

It should be possible to build our code with several compiler suites. If one finds that something is broken on does not build on a particular OS/compiler which we support he/she should file this as a bug.

Supported compilers

  • Microsoft Visual Studio 2008 (Windows x86), known as VC++9.

MS VS uses project files (*.VCPROJ) and solution files (MDSP.SLN) to store compiler settings, so one should point the IDE to such file and then build.

  • CygWin GCC (Windows x86)

To setup Cygwin, download setup.exe from the Cygwin's main page: http://www.cygwin.com/ Run setup.exe, find the gcc4 package in the list, install it. You'll have a new item on your desktop called "Cygwin shell". Run it, and from there you'll be able to build the code with command make in folder <svn_root>.

  • GCC (Linux x86 and x86_64)

Install a package called gcc (the name may vary depending on your distribution). Examples: * Ubuntu: sudo apt-get install build-essential gcc * Fedora (as root): yum install gcc After that gcc and make commands should be available from a command shell.

Note that the oldest supported GCC version is 4.1.x. on all platforms.

Not officially supported compilers

The main reason for us to support limited set of compilers is the necessity to ship the precompiled versions of a few Boost libraries, such as program_options, while Boost itself supports much wider range of OSes and compilers. So it is not guaranteed to properly link with these libraries. If you manage to get your own version of required libs and place them in proper places then the build should work for you. If someone is ready to provide support for other compilers then we may consider including them in our work.

  • MS VS 2010 aka VC++10
  • MinGW GCC (Windows x86) aka MSYS. You can download the installer from http://www.mingw.org/.

After that a command make and gcc should be available on your system from a command shell.

Compilation results

After your build has succeeded, in the folder Release or Debug one can find three binaries: asm - for assembler, funcsim - for standalone functional simulator, and test - for testing. Run any of them to watch what they do.

Test

Run test. If everything is OK, no output is shown - the program just finishes. If something is wrong, then certain messages are being printed.

Run

To run funcsim, type in your command shell (assuming you are in <svn_root> folder)

Release/funcsim ../tests/simple_test.bin

Assembler

You can also run asm. Watch what it requires from you and give it to it - the samples of source code are there!

Clone this wiki locally