Project

General

Profile

How to get cross CIF for building LiteOS » History » Revision 6

Revision 5 (Evgeny Novikov, 08/12/2020 11:39 AM) → Revision 6/7 (Evgeny Novikov, 08/12/2020 04:05 PM)

h1. How to get cross CIF for building LiteOS 

 Instructions below are for Ubuntu 18.04. You may need some changes for other versions of Ubuntu. 

 Install prerequisites: 
 <pre> 
 $ sudo apt-get install autoconf automake libtool libexpat1-dev libncurses5-dev bison flex patch texinfo build-essential gawk gperf help2man libtool-bin 
 </pre> 

 h2. Get Build cross CIF 

 You can either download get an archive with cross CIF prepared in advance from "here":https://forge.ispras.ru/attachments/download/7802/cif-894b1b3-for-liteos.tar.xz or follow the next steps. 

 Build CIF as usual. Below it is assumed that CIF sources and build files are within directory _<notextile>~/cif</notextile>_. 

 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: 
 <pre> 
 $ ./bootstrap 
 $ ./configure --enable-local 
 $ make 
 </pre> 

 Build cross CIF: 
 <pre> 
 $ mkdir ~/cif/build/cross 
 </pre> 
 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>_. 
 <pre> 
 $ ~/crosstool-ng-newlib_nano_variant/ct-ng build 
 </pre> 

 h2. Get and build LiteOS 

 <pre> 
 $ git clone https://github.com/LiteOS/LiteOS.git 
 $ cd ~/LiteOS/targets/Cloud_STM32F429IGTx_FIRE/GCC 
 </pre> 
 Perhaps you need to replace username _novikov_ with your one (if you downloaded and extracted an archive with cross CIF somewhere outside _<notextile>~/x-tools</notextile>_, you need to fix the whole path appropriately): one. 
 <pre> 
 $ export PATH=$PATH:/home/novikov/x-tools/arm-unknown-eabihf/bin 
 $ make 
 </pre> 

 h2. Notes 

 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.