freertos项目在linux编译总结
程序员文章站
2022-03-09 08:13:36
freertos项目编译总结安装必要的编译环境。1.1 安装arm-gcc :sudo apt-get install gcc-arm-none-eabi g++1.2 安装cmake:版本不能低于3.13.0 $ cd /opt $ sudo wget https://cmake.org/files/v3.15/cmake-3.15.0.tar.gz $ sudo tar -zxv -f cmake-3.15.0.tar.gz $ cd cmake-3.15....
freertos项目编译总结
- 安装必要的编译环境。
1.1 安装arm-gcc :sudo apt-get install gcc-arm-none-eabi g++
1.2 安装cmake:版本不能低于3.13.0
$ cd /opt
$ sudo wget https://cmake.org/files/v3.15/cmake-3.15.0.tar.gz
$ sudo tar -zxv -f cmake-3.15.0.tar.gz
$ cd cmake-3.15.0
$ sudo ./bootstrap
---------------------------------------------
CMake 3.15.0, Copyright 2000-2018 Kitware, Inc. and Contributors
Found GNU toolchain
C compiler on this system is: gcc
C++ compiler on this system is: g++ -std=gnu++1z
Makefile processor on this system is: make
g++ has setenv
g++ has unsetenv
g++ does not have environ in stdlib.h
g++ has stl wstring
g++ has <ext/stdio_filebuf.h>
---------------------------------------------
$ sudo make
$ sudo make install
1.3 cmake --version 查看版本号 看是否安装上
- 拉去源代码:
git clone https://github.com/aws/amazon-freertos.git --recurse-submodules
- 进入源代码目录:
cd amazon-freertos
- 在amazon-freertos目录下创建:
mkdir build
文件 - 然后:
cp CMakeCache.txt build
- 再执行:
cmake -DVENDOR=st -DBOARD=stm32l475_discovery -DCMAKE_C_FLAGS=-std=gnu11 -DCOMPILER=arm-gcc -S . -B build
- 进入build 文件:
make
本文地址:https://blog.csdn.net/weixin_50923296/article/details/109642525