RTEMS 編譯流程

2021-08-18 19:13:11 字數 1373 閱讀 3794

原文:

rtems 編譯流程

notices:

1),編譯 rtems-source-builder、rtems、examples-v2 這三個專案時,必需先統一切換到某個目標分支,比如 origin/4.11,git checkout -t origin/4.11

2),修改 rtems 核心**後,重新配置 rtems (即 ../../rtems/configure 命令)前,先將之前編譯好的的**刪除;

3),修改 examples-v2 **時,直接進入目標路徑,執行裡面的 makefile 命令就可以生成對應的目標檔案;

build-up steps:

1,rtems-source-builder

即 rtems 交叉編譯工具鏈,arch-rtemsversion-,類似於 linaro 編譯好的 arm-linux-gnueabi-,arch: 即目標架構; version: rtems 版本

$ git clone 

$ cd rtems-source-builder

$ git checkout -t origin/4.11

$ source-builder/sb-check

$ cd rtems

$ ../source-builder/sb-set-builder --list-bsets

$ ../source-builder/sb-set-builder \

--prefix=$home/rtems/4.11/i386 \

4.11/rtems-i386

2,rtems

$ git clone 

$ cd rtems

$ git checkout -t origin/4.11

$ cd ../

$ mkdir -p rtems-build/pc386

$ cd rtems-build/pc386

$ ../../rtems/configure --target=i386-rtems4.11 --prefix=/home/gimcuan/git/rtems-build/pc386 --enable-rtemsbsp=pc386 --enable-tests

$ make

$ make install

3,examples-v2

設定 rtems_makefile_path 指向第 2 步編譯好的目標 bsp 目錄,例如,在 ~/.profile裡面加入:

export rtems_makefile_path=$home/git/rtems-build/pc386/i386-rtems4.11/pc386

cd 到目標目錄執行

make

1,原文:

rtems交叉編譯工具的安裝

自己只需新建 binutils build gcc buildmpc build mpfr build gmp build目錄即可。binutils 2.20.1 gcc 4.81 newlib 1.18.0 目錄是解壓時自動得到的目錄。bin i386 rtems4.10 incude lib l...

康奈爾rtems筆記(1)

目標依賴檔案 為了最大化復用 rtems目標相關 分為三個層次 cpu相關 板子相關 外設相關 2.1 cpu相關 具體 在cpukit score cpu,可以把no cpu作為起點來學習,裡面有詳細的注釋和介紹。這個部分只關心在gcc編譯時會有區別的部分,儘管有很多cpu,但是實際上cpu核心 ...

康奈爾rtems筆記(2)

在bootstrap階段會根據configure.ac makefile.am來生成相應的檔案 在configure階段會根據host target目標板子來生成更多的檔案,其中包括編譯和生成rtems的makefile 在build階段會生成o檔案和庫檔案 在install階段會把庫檔案等複製到目...