How to get cross CIF for building LiteOS » History » Version 5
Evgeny Novikov, 08/12/2020 11:39 AM
1 | 1 | Evgeny Novikov | h1. How to get cross CIF for building LiteOS |
---|---|---|---|
2 | |||
3 | 5 | Evgeny Novikov | Instructions below are for Ubuntu 18.04. You may need some changes for other versions of Ubuntu. |
4 | |||
5 | Install prerequisites: |
||
6 | 2 | Evgeny Novikov | <pre> |
7 | $ sudo apt-get install autoconf automake libtool libexpat1-dev libncurses5-dev bison flex patch texinfo build-essential gawk gperf help2man libtool-bin |
||
8 | 1 | Evgeny Novikov | </pre> |
9 | |||
10 | 5 | Evgeny Novikov | h2. Build cross CIF |
11 | 1 | Evgeny Novikov | |
12 | 5 | Evgeny Novikov | You can either get an archive with CIF prepared in advance from "here":https://forge.ispras.ru/attachments/download/7802/cif-894b1b3-for-liteos.tar.xz or follow the next steps. |
13 | |||
14 | Build CIF as usual. Below it is assumed that CIF sources and build files are within directory _<notextile>~/cif</notextile>_. |
||
15 | |||
16 | Build _crosstool-ng_. Download the ZIP archive from https://github.com/stephanosio/crosstool-ng/tree/newlib_nano_variant to the home directory. At the moment of writing this document the corresponding pull request was not accepted yet. Extract the ZIP archive. After that go to directory _<notextile>~/crosstool-ng-newlib_nano_variant</notextile>_ and execute the following commands: |
||
17 | 1 | Evgeny Novikov | <pre> |
18 | $ ./bootstrap |
||
19 | $ ./configure --enable-local |
||
20 | 2 | Evgeny Novikov | $ make |
21 | 1 | Evgeny Novikov | </pre> |
22 | |||
23 | 5 | Evgeny Novikov | Build cross CIF: |
24 | 2 | Evgeny Novikov | <pre> |
25 | 1 | Evgeny Novikov | $ mkdir ~/cif/build/cross |
26 | 2 | Evgeny Novikov | </pre> |
27 | 3 | Evgeny Novikov | Download file _.config_ attached to this page into _<notextile>~/cif/build/cross</notextile>_. Replace username _novikov_ with your one if necessary within _<notextile>~/cif/build/cross/.config</notextile>_. |
28 | 2 | Evgeny Novikov | <pre> |
29 | 1 | Evgeny Novikov | $ ~/crosstool-ng-newlib_nano_variant/ct-ng build |
30 | 2 | Evgeny Novikov | </pre> |
31 | 1 | Evgeny Novikov | |
32 | h2. Get and build LiteOS |
||
33 | 2 | Evgeny Novikov | |
34 | <pre> |
||
35 | 1 | Evgeny Novikov | $ git clone https://github.com/LiteOS/LiteOS.git |
36 | $ cd ~/LiteOS/targets/Cloud_STM32F429IGTx_FIRE/GCC |
||
37 | 2 | Evgeny Novikov | </pre> |
38 | 3 | Evgeny Novikov | Perhaps you need to replace username _novikov_ with your one. |
39 | 2 | Evgeny Novikov | <pre> |
40 | 1 | Evgeny Novikov | $ export PATH=$PATH:/home/novikov/x-tools/arm-unknown-eabihf/bin |
41 | $ make |
||
42 | </pre> |
||
43 | 4 | Evgeny Novikov | |
44 | h2. Notes |
||
45 | |||
46 | At the moment this manual does not describe how to get cross CIF but just how to get cross Aspectator (GCC) for building LiteOS. There is little sense to get cross CIF without integration it within Clade or/and Klever since CIF has a specific API that does not allow to use it as a compiler replacement. |