# Installation instructions

This page provides installation instruction for BeRTOS open source version for Windows, Mac and Linux. If you have installation questions or need help troubleshooting BeRTOS, go to our support forum. Get answers about BeRTOS licensing and more in our list of Frequently Asked Questions (FAQ).

## Installing BeRTOS on Windows

#### Install BeRTOS in 5 minutes!

Instead of following the guide below, you can use BeRTOS SDK installer Trial, that will give you the following advantages:

• Completely configured environment in no time;
• Integrated IDE to develop BeRTOS projects;
• No conflicts with previously installed programs;
• Clean system after removing the SDK;
• No spyware, no adware.

### Setup the Wizard

The wizard is written in Python so you need to install the Python interpreter and all supporting libraries. Download and install the following packages:

• Qt library LGPL version. You can use Qt framework only, you won't need the full Qt SDK. You need to add the rcc program to your system path. Add the following line to your system Path variable:
C:\QT4\install\path\bin;other values here

• Python interpreter version 2.7
• PyQt4 libraries for Python 2.7. You can go for the minimal installation profile.
• Python Windows extensions

### Setup BeRTOS build system

Download and install Cygwin. After launching the setup program, you have to install at least the following packages:

• bash
• make

### Setup the toolchains for your CPU

Remember the installation path, as you will need to insert it into the Wizard.

Important: you need to modify the PATH system variable. Add the following value at the beginning of the variable:

C:\path\to\cygwin\bin;other values here


### Launching the Wizard

Now you can launch the Wizard and generate a new project. Look for the file wizard\bertos.py in your BeRTOS source code tree. Please follow the Wizard tutorial for further information on using the Wizard.

After creating a project, launch a cmd shell, go the project's directory and launch make:

> cd path\to\your\project
> make


You will find the binary files in the images directory.

If you want to modify an already existing project, you can pass the --edit parameter to the command line, as in the following example:

c:\.....\bertos\wizard> start bertos.py --edit ..\..\path\to\your\project\project.bertos


## Installing BeRTOS on Linux

This section was tested on Ubuntu, so the commands presented here may not work on other distributions. However all the programs needed are listed, so it can be easily adapted to other distributions. Help us improving this guide by writing updates on the forum!

### Setup the Wizard

You need to install PyQt4 and the rcc program that comes with Qt libraries. It's enough to install the pyqt4 and libqt4-dev package using your distribution's package manager. For example, on Ubuntu you can issue the following command:



### Setup the toolchains for your CPU

You can install the toolchains packaged with your distribution. For example, on Ubuntu you can install avr-libc.

Bear in mind that they can be quite old and, as such, they may not support newer CPUs. If you have problems in compiling your projects with your distribution's toolchain, you can download and build newer toolchains by hand:

### Launching the Wizard

Now you can launch the Wizard and generate a new project. Look for the file wizard/bertos.py in your BeRTOS source code tree. Please follow the Wizard tutorial for further information on using the Wizard.

After creating a project, launch a shell, go the project's directory and launch make:

$cd path/to/your/project$ make


You will find the binary files in the images directory.

If you want to modify an already existing project, you can pass the --edit parameter to the command line, as in the following example:

bertos/wizard $python bertos.py --edit /path/to/your/project/project.bertos  ## Installing BeRTOS on Mac ### Setup the Wizard You must install PyQt4 in order to use the wizard. You will need XCode installed to build some of the required packages. • Download and install Qt 4. Install the 32-bit version if you have a 32-bit OS and the 64-bit version on a 64-bit OS; • Donwload and build SIP. After decompressing the archive, open a shell and type: $ cd path/to/sip/sources
$python configure.py$ make
$sudo make install  • Download and install PyQt4 for Mac. After decompressing the archive, open a shell and type: $ cd path/to/pyqt4/sources
$python configure.py$ make
$sudo make install  You can quickly test if PyQt is working by running: $ python -c 'import PyQt4.QtGui'


If everything is ok, the command should immediately return to the shell.

### Setup BeRTOS build system

If you have installed XCode in the previous step you're done.

### Setup the toolchains for your CPU

You will need to build each toolchain by hand.

### Launching the Wizard

Now you can launch the Wizard and generate a new project. Look for the file wizard/bertos.py in your BeRTOS source code tree. Please follow the Wizard tutorial for further information on using the Wizard.

After creating a project, launch a shell, go the project's directory and launch make:

$cd path/to/your/project$ make


You will find the binary files in the images directory.

If you want to modify an already existing project, you can pass the --edit parameter to the command line, as in the following example:

\$ python bertos.py --edit /path/to/your/project/project.bertos