====== Compiling LiteOS ====== Reference: - [[https://www.huawei.com/minisite/liteos/cn/cooperation.html|Huawei LiteOS官网]] - [[https://www.bilibili.com/read/cv4309777|漫谈LiteOS之开发板-LiteOS移植(基于GD32450i-EVAL)]] ===== - Build on Linux ===== ==== - 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]] ==== - 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 ==== - Pick up required files ==== arch/ components/cmsis/ kernel/ targets/ Make http://www.equation.com/servlet/equation.cmd?fa=make ===== - Build with Keil ===== * Reference - [[https://blog.51cto.com/u_15284384/3050276|小白进阶之移植 LiteOS 到 STM32]] ==== - Create an hello project ==== Make sure that the project is workable. ==== - Take a Branch of LiteOS ==== git clone https://gitee.com/LiteOS/LiteOS.git git checkout tag_LiteOS_V200R001C50B037_20181226 ==== - 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