User Tools

Site Tools


Sidebar

Go Back

Refresh

You are not allowed to add pages

Direct Link

library:liteos:compile

Compiling LiteOS

1. Build on Linux

1.1 Get LiteOS Sources

git clone https://gitee.com/LiteOS/LiteOS.git or
git clone git@gitee.com:LiteOS/LiteOS.git or
download from https://gitee.com/LiteOS/LiteOS

1.2 Prepare Linux Building Toolchain

Install the following tools if necessary(@Ubuntu 20.04.4).

# ssh server
sudo apt install openssh-server

#
sudo apt-get install git
sudo apt-get install make
sudo apt-get install gcc-arm-none-eabi

# python
cd /usr/bin
ln -s python3.8 python
sudo apt install python3-pip

# python module
pip install kconfiglib

# qemu
#sudo apt install qemu
#sudo apt install qemu-system

# Share
vmware-hgfsclient
sudo mount -t fuse.vmhgfs-fuse .host:/ShareFolder ~/share/ -o allow_other

1.3 Pick up required files

arch/
components/cmsis/
kernel/
targets/

Make
http://www.equation.com/servlet/equation.cmd?fa=make

2. Build with Keil

2.1 Create an hello project

Make sure that the project is workable.

2.2 Take a Branch of LiteOS

git clone https://gitee.com/LiteOS/LiteOS.git
git checkout tag_LiteOS_V200R001C50B037_20181226

2.3 Add necessary files to project

$(LiteOS_ROOT_PATH)\kernel\include

#include “los_sys.h”

$(LiteOS_ROOT_PATH)\targets\Mini_Project\cortex-m4_without_driver\OS_CONFIG\los_builddef.h

library/liteos/compile.txt · Last modified: 2022/05/02 00:32 (external edit)