注:本文档为《从0学x86操作系统》课程配套的学习文档,提供相应的辅助学习资料和答疑勘误。 有关该课程的信息,请点击这里访问:https://study.163.com/provider/1017884735/index.htm 在阅读本文档时,如有疑问和建议,欢迎在下方留言或者直接联系我。

GCC编译器和CMake

需要安装的工具有:i686-elf-gcc、i386-elf-gdb、cmake,安装方式如下:
$ brew install x86_64-elf-gcc
$ brew install x86_64-elf-gdb
$ brew install cmake
整个安装过程会比较长。安装包完后,请按照课程视频所示进行测试,确保安装正确。

注:安装过程中,可能会出现以下问题。请自行搜索如何更换brew的包源,或者使用翻墙工具。 curl: (7) Failed to connect to raw.githubusercontent.com port 443: Operation timed out Error: x86_64-elf-gdb: Failed to download resource “gdbm—patch” Download failed: https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-big_sur.diff

qemu模拟器

$ brew install qemu

安装包完后,请按照课程视频所示进行测试,确保安装正确。

Visual Studio Code

安装包下载地址:https://code.visualstudio.com,点击下载。
image.png
安装完成后,点击【扩展】按钮,安装一些扩展。
image.png其中有些扩展是必要的,有些则是方便进行开发,建议都安装上去。安装完成之后,重启visual studio code。
image.png:微软提供的C/C++扩展开发包
image.png:C/C++智能提示
image.png:提供as汇编的语法高亮
image.png:提供文件夹和文件的显示主题
image.png:提供链接脚本的语法高亮
image.png:十六进制编辑器

附注:brew的安装和配置

安装brew

/usr/bin/ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”“)

配置成国内源

由于brew默认从 国外官网下载软件,下载速度很慢、易报错,只需要把 brew 源配置成国内源。依次在终端中执行以下命令。

cd “$(brew —repo)” git remote set-url origin https://mirrors.ustc.edu.cn/brew.git cd “$(brew —repo)/Library/Taps/homebrew/homebrew-core” git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git cd “$(brew —repo)/Library/Taps/homebrew/homebrew-cask” git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-cask.git echo ‘export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles’ >> ~/.bash_profile brew update

[

](https://blog.csdn.net/lijing742180/article/details/120643558)