summaryrefslogtreecommitdiffstats
path: root/user/start/index.rst
blob: 96388f2b70307351f1a4d6d413936548edbe16a2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
.. SPDX-License-Identifier: CC-BY-SA-4.0

.. Copyright (C) 2016 Chris Johns <chrisj@rtems.org>

.. index:: Quick Start

.. _QuickStart:

Quick Start
***********

Follow the sections of this chapter step by step to get started developing
applications on top of RTEMS.

.. toctree::
    :maxdepth: 5
    :numbered:

    host
    prefixes

The following is a quick start guide that provides a basic set of commands to
build the RTEMS Tools and Kernel. The quick start guide provides links to the
detailed sections if any problems are encountered.

The detailed procedure for installing an RTEMS Workspace and installing
all tools can be found in :ref:`installation`. This includes information
on installation points, developer versions, and the RTEMS kernel.

The short version of this procedure is as follows
(:ref:`posix-host-tools-chain`):

#. Create a workspace (:ref:`installation`),

#. Download the RTEMS Source Builder (RSB),

#. Build an RTEMS tool chain for a specific target architecture,

#. Download RTEMS, and then

#. Build RTEMS for a specific Board Support Package (BSP).

Each of these steps is described in a section in this guide.

Creating a Workspace
====================

Before beginning, the development host computer needs to be set up for
this quick start procedure to complete successfully. :ref:`host-computer`
details what is needed for the supported host operating systems. If
Windows is being used it is recommended following the procedure in
:ref:`microsoft-windows` first.

There are many ways and locations a suitable environment can be set up. A
common factor that defines the final location of tools and projects is the
place you have suitable storage. Another is permissions.  There is no
need to become root or the administrator and we recommend you avoid
doing this. You can build and install the tools anywhere on the host's
file system you, as a standard user, have read and write access too.
:ref:`Prefixes` and :ref:`ProjectSandboxing` provide detailed examples
of possible locations and set ups.

Simple Example
==============

.. code-block:: shell

  $ cd
  $ mkdir -p development/rtems
  $ cd development/rtems
  $ git clone git://git.rtems.org/rtems-source-builder.git rsb
    ...
  $ cd rsb
  $ ./source-builder/sb-check
    ...
  $ cd rtems
  $ ../source-builder/sb-set-builder \
      --prefix=/usr/home/chris/development/rtems/5 5/rtems-sparc
    ...

Build the RTEMS Kernel (:ref:`rtems-kernel-install`) by cloning the repository,
running the ``bootstrap`` procecure, building and finally installing the
kernel:

.. code-block:: shell

  $ export PATH=$HOME/development/rtems/5/bin:$PATH
  $ cd
  $ cd development/rtems
  $ mkdir kernel
  $ cd kernel
  $ git clone git://git.rtems.org/rtems.git rtems
    ...
  $ cd rtems
  $ ./bootstrap -c && $HOME/development/rtems/rsb/source-builder/sb-bootstrap
    ...
  $ cd ..
  $ mkdir erc32
  $ cd erc32
  $ $HOME/development/rtems/kernel/rtems/configure --prefix=$HOME/development/rtems/5 \
                     --target=sparc-rtems5 --enable-rtemsbsp=erc32 --enable-posix
    ...
  $ make -j 8
    ...
  $ make install

You can now build a third-party library or an application.