seL4 源码阅读 from scratch

2022/4/27 14:12:42

本文主要是介绍seL4 源码阅读 from scratch,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

概述

环境配置

首先笔者使用的是 wsl linux也许适用,mac 不适用

工具链环境配置

首先按照官网配置把该安装的安装了,尤其是 python 的东西

https://docs.sel4.systems/projects/buildsystem/host-dependencies.html

python 安装遇到问题请使用国内源,例如

# https://mirrors.tuna.tsinghua.edu.cn/help/pypi/
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple some-package

拉代码目录

笔者看到的一篇教程如下
http://trialley.top/pages/6baa7b/
文中和官网不一样的是没有创建 tutorials 这样的缺点是构建出来的源码和 build 文件在项目的根目录,会影响代码的观感,我们按照官网的来,首先创建文件夹 tutorials 并进入其中
然后运行如下代码

../init --tut <tutorial exercise>

这里的 <tutorial exercise>projects/sel4-tutorials/tutorials 路径下的文件夹名比如 hello-world

源码出来之后,进入对应的 build 文件夹执行

ninja

构建源码即可

配置 vscode

笔者使用的 vscode + Microsoft C++ 插件,使用 shift + ctrl + p 选择

c/c++:编辑UI 选项,这样就会在目录下生成 .vscode/c_cpp_properties.json
里面会默认包含 includepath 路径

image

如果要使用 clangd 的话,笔者没有成功添加 include path,不过笔者在查找答案的过程中找到了一些可能有用的资源:

https://stackoverflow.com/questions/61206703/is-there-includepath-option-in-clangd

https://clangd.llvm.org/config

sel4 内在机制

友链:
sel4 详解 pdf https://gitee.com/tjopenlab/seL4-Programing-Guide-book/tree/master
Mr0cheng:sel4源码详解 https://blog.csdn.net/Mr0cheng/article/details/104338058



这篇关于seL4 源码阅读 from scratch的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!


扫一扫关注最新编程教程