wiki:prerequisite

Version 6 (modified by Sanahuja Guillaume, 6 years ago) ( diff )

--

Prerequisite

This page gathers some prerequisites. It is necessary to read and understand everything in this page before starting to work with Flair.

C/C++

Fl-Air is written in C++. To develop on this framework, you need to understand C and C++.

Here are lessons (in French):

Linux

Flair work on linux only. If you want to install it on your computer, one recommended distribution is Mint as it is popular, convivial and easy to install. All documentation in this wiki is based on Mint, but it should work with other distributions. Whatsoever the distribution you choose, install the 65 bit version of it. Flair only supports 64 bit hosts.

To use Flair, you have to know some basics about linux (how to launch a program, configure wifi, etc). Moreover a lot of operations are done through the command line.

To learn the command line, you can read this tutorial or any equivalent. Please note that on target (unlike on computer), the only user is the root one, without password by default. On the target, the default text editor are vi and nano. You can read this page for example to begin with nano.

In this wiki, commands that must be entered in a linux console on your computer (host) will be indicated as above with a $:

$ command

Commands that must be entered in a linux console on the target will be indicated as above with a #:

# command

But be careful, the target does not have any keyboard (nor screen!). So the command must be entered from your computer, on a terminal connected to the target, either by serial, or by SSH).

Serial console

Serial console allows to connect to the target to access the bootloader (u-boot), or to have a linux console. The console is also accessible through the network . Yet, if network does not work, serial console is the only way to talk to the target!

You can use gtkterm or cutecom.

SSH

Secure SHell (SSH) is both a program and a secured communication protocol. It can connect remotely to a computer through network. The computer we connect to is called the server, and the computer used to connect to the server is called the client.

To connect to a SSH server, the command is like this:

$ ssh user@server

where user is the user name we want to connect to the server. server field can be either the name of the server or its IP address. For example, to connect to storage as toto:

$ ssh toto@storage

To connect to a target (once netwok is configured, see this page):

$ ssh root@192.168.147.63

IP address as to be adapted to your case.

Note that the first time you connect to a SSH server, you will be asked a confirmation as this server is not a knwon hosts.

SCP

Secure CoPy (SCP) is a secured way to copy files between computer, it is based on SSH protocol. IT can be sued to send a file from your computer to the target.

To copy a file to another computer wih scp:

$ scp path_to_the_file user@server:/destination_path

where path_to_the_file is source file path, user the account to use on the server, and destination_path the directory to store the file on the server. For example, to copy the file test in our home directory, to the folder /home/root on the target:

$ scp ~/test root@192.168.147.63:/home/root

SVN

SVN or Subversion is a version control system.

It is generaly used through its command line (svn checkout, svn up, svn commit). You can also use a graphical interface as rapidsvn, rabitvcs, etc.

CMake

CMake is a project (makefile or IDEs) generator, using input configuration files called CMakeLists.txt. Its strength is to use the same configuration files(s) regardless of the IDE we want to use. Everyone can choose its preferred IDE. Moreover, it is also cross platform.

CMake is used through command line.

To know supported generators (kind of supported IDEs), execute:

$ cmake --help

Which gives the usage syntax of CMake. At the end you will find the generators list. On windows you will get for example:

The following generators are available on this platform:
  Unix Makefiles              = Generates standard UNIX makefiles.
  Ninja                       = Generates build.ninja files (experimental).
  CodeBlocks - Ninja          = Generates CodeBlocks project files.
  CodeBlocks - Unix Makefiles = Generates CodeBlocks project files.
  CodeLite - Ninja             = Generates CodeLite project files.
  CodeLite - Unix Makefiles    = Generates CodeLite project files.
  Eclipse CDT4 - Ninja        = Generates Eclipse CDT 4.0 project files.
  Eclipse CDT4 - Unix Makefiles
                              = Generates Eclipse CDT 4.0 project files.
  KDevelop3                   = Generates KDevelop 3 project files.
  KDevelop3 - Unix Makefiles  = Generates KDevelop 3 project files.
  Sublime Text 2 - Ninja      = Generates Sublime Text 2 project files.
  Sublime Text 2 - Unix Makefiles
                              = Generates Sublime Text 2 project files.

Thus, to build a project for CodeLite, you can use the following command:

$ cmake -G "CodeLite - Unix Makefiles"

Note that using Flair build system, you won't have to call cmake manually. Scripts are provided to generate all projects.

Note: See TracWiki for help on using the wiki.